File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,24 @@ MainView::MainView() {
34
34
}
35
35
}
36
36
37
+ for (int kp_key = GLFW_KEY_KP_0; kp_key <= GLFW_KEY_KP_EQUAL; kp_key++) {
38
+ int scan_code = glfwGetKeyScancode (kp_key);
39
+ if (scan_code) {
40
+ auto str = glfwGetKeyName (kp_key, scan_code);
41
+ if (str) {
42
+ glfw_str_keys.push_back (str);
43
+ glfw_keys.push_back (scan_code);
44
+ }
45
+ scancodes_to_glfw_[scan_code] = kp_key;
46
+ }
47
+ }
48
+
37
49
glfw_str_keys.push_back (" SPACE" );
38
50
glfw_keys.push_back (glfwGetKeyScancode (GLFW_KEY_SPACE));
39
51
40
52
for (auto key = GLFW_KEY_COMMA; key <= GLFW_KEY_GRAVE_ACCENT; key++) {
41
53
int scan_code = glfwGetKeyScancode (key);
42
- if (scan_code > 0 ) {
54
+ if (scan_code) {
43
55
auto str = glfwGetKeyName (key, scan_code);
44
56
if (str) {
45
57
glfw_str_keys.push_back (str);
You can’t perform that action at this time.
0 commit comments