MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / KeycodeToKeysym

Function KeycodeToKeysym

include/keycodetokeysym.h:20–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20static KeySym KeycodeToKeysym(Display *dpy, KeyCode keycode, int index)
21{
22 KeySym ks = NoSymbol, *keysyms; int n = 0;
23
24 keysyms = XGetKeyboardMapping(dpy, keycode, 1, &n);
25 if(keysyms)
26 {
27 if(n >= 1 && index >= 0 && index < n)
28 ks = keysyms[index];
29 XFree(keysyms);
30 }
31
32 return ks;
33}
34
35#endif

Callers 1

handleEventFunction · 0.85

Calls 1

XFreeFunction · 0.85

Tested by

no test coverage detected