Implement support for using key symbols in configuration file

Use "bindsym" instead of "bind". You have to use the names of keys
as in xmodmap. To get a list of currently bounud symbols, use
xmodmap -pke

Technical quirk: Xlib generated MappingNotify events upon
XkbMapNotify events (from XKB, as the name says). XCB does not yet
have support for XKB, thus we need to select and handle the event
by ourself. Hopefully, this will change in the future.
This commit is contained in:
Michael Stapelberg
2009-08-07 15:35:12 +02:00
parent 3bd724f08d
commit 7cdaa1b277
7 changed files with 211 additions and 28 deletions

View File

@ -44,6 +44,14 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn,
int handle_motion_notify(void *ignored, xcb_connection_t *conn,
xcb_motion_notify_event_t *event);
/**
* Called when the keyboard mapping changes (for example by using Xmodmap),
* we need to update our key bindings then (re-translate symbols).
*
*/
int handle_mapping_notify(void *ignored, xcb_connection_t *conn,
xcb_mapping_notify_event_t *event);
/**
* Checks if the button press was on a stack window, handles focus setting and
* returns true if so, or false otherwise.