mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[client] keybind: use physical keycodes for layout-independent hotkeys
Fixes #1298
This commit is contained in:
@@ -176,16 +176,15 @@ typedef void (*KeybindFn)(int sc, void * opaque);
|
||||
void app_showRecord(bool show);
|
||||
|
||||
/**
|
||||
* Register a handler for the <super>+<key> combination
|
||||
* @param sc The scancode to register
|
||||
* @param charcode The charcode to register (used instead of sc if non zero)
|
||||
* Register a handler for the configured escape key + key combination
|
||||
* @param sc The Linux keycode to register
|
||||
* @param callback The function to be called when the combination is pressed
|
||||
* @param opaque A pointer to be passed to the callback, may be NULL
|
||||
* @retval A handle for the binding or NULL on failure.
|
||||
* The caller is required to release the handle via `app_releaseKeybind` when it is no longer required
|
||||
*/
|
||||
KeybindHandle app_registerKeybind(int sc, int charcode, KeybindFn callback,
|
||||
void * opaque, const char * description);
|
||||
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque,
|
||||
const char * description);
|
||||
|
||||
/**
|
||||
* Release an existing key binding
|
||||
|
||||
@@ -206,9 +206,6 @@ struct LG_DisplayServerOps
|
||||
void (*capturePointer)(void);
|
||||
void (*uncapturePointer)(void);
|
||||
|
||||
/* get the character code for the provided scancode */
|
||||
int (*getCharCode)(int sc);
|
||||
|
||||
/* exiting = true if the warp is to leave the window */
|
||||
void (*warpPointer)(int x, int y, bool exiting);
|
||||
|
||||
@@ -286,7 +283,6 @@ struct LG_DisplayServerOps
|
||||
DEBUG_ASSERT((x)->ungrabPointer ); \
|
||||
DEBUG_ASSERT((x)->capturePointer ); \
|
||||
DEBUG_ASSERT((x)->uncapturePointer ); \
|
||||
DEBUG_ASSERT((x)->getCharCode ); \
|
||||
DEBUG_ASSERT((x)->warpPointer ); \
|
||||
DEBUG_ASSERT((x)->realignPointer ); \
|
||||
DEBUG_ASSERT((x)->isValidPointerPos ); \
|
||||
|
||||
Reference in New Issue
Block a user