|
|
|
@ -2792,6 +2792,7 @@ const char* _glfwPlatformGetScancodeName(int scancode) |
|
|
|
|
if (!_glfw.x11.xkb.available) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
const int key = _glfw.x11.keycodes[scancode]; |
|
|
|
|
const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display, |
|
|
|
|
scancode, _glfw.x11.xkb.group, 0); |
|
|
|
|
if (keysym == NoSymbol) |
|
|
|
@ -2801,12 +2802,12 @@ const char* _glfwPlatformGetScancodeName(int scancode) |
|
|
|
|
if (ch == -1) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
const size_t count = encodeUTF8(_glfw.x11.keyName, (unsigned int) ch); |
|
|
|
|
const size_t count = encodeUTF8(_glfw.x11.keynames[key], (unsigned int) ch); |
|
|
|
|
if (count == 0) |
|
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
_glfw.x11.keyName[count] = '\0'; |
|
|
|
|
return _glfw.x11.keyName; |
|
|
|
|
_glfw.x11.keynames[key][count] = '\0'; |
|
|
|
|
return _glfw.x11.keynames[key]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int _glfwPlatformGetKeyScancode(int key) |
|
|
|
|