Make adding more printable keys slightly easier
When adding keys after `GLFW_KEY_UNDERSCORE`, one now needs to change a `#define` right below the last printable key instead of changing it elsewhere in the code. This commit now also marks `GLFW_KEY_PLUS` and `GLFW_KEY_UNDERSCORE` as printable characters.
This commit is contained in:
Generated
+1
-1
@@ -298,7 +298,7 @@ def update_encoding():
|
||||
for k in sorted(keys, key=lambda k: getattr(defines, k)):
|
||||
val = getattr(defines, k)
|
||||
name = symbolic_name(k)
|
||||
if val <= defines.GLFW_KEY_LAST and name != 'LAST' and val != defines.GLFW_KEY_UNKNOWN:
|
||||
if val <= defines.GLFW_KEY_LAST and name not in ('LAST', 'LAST_PRINTABLE') and val != defines.GLFW_KEY_UNKNOWN:
|
||||
if name not in ans:
|
||||
ans[name] = encode(i)
|
||||
i += 1
|
||||
|
||||
Reference in New Issue
Block a user