[Glade-users] system wide hotkeys (keyboard shortcut)

Uri wrote:

after breaking my head and brosing the GTK api help and GNOME help and X11
help... i decided to ask here.
is there any way to create system-wide hotkeys (or keyboard shortcuts)?

for example, if the user wants to start or stop the application he only needs
to press CTRL-ALT-F11 (just an example) and then the program will stop/start

There are a few layers I think where one can register for keyboard

  - /sbin/init (/etc/inittab) owner of all terminals... responsable for 
    a shutdown script when cntl-alt-del is hit
  - X server: I dont know how... but there is certainly a mechanism here to
    recieve all keyboard events from the running server (assuming it's 
    is currently active)
  - The window manager usually has mechanisms to map shortcuts to common
    window manager stuff (i.e. here you might make alt-F4 kill your 
focused application).
  - The X client application... usually an X client's place is to only 
recieve keyboard
    events that are sent to its X windows.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]