You are not logged in.

#1 2009-08-24 13:49:25

kronig
Member
Registered: 2009-05-25
Posts: 22

[SOLVED] Disable CTRL+Q hotkey

This CTRL+Q hotkey is applications driven, I guess, but I want it to be DEAD! I cant work with this Q near W and kill my windows on my tiny and cute notebook.

If someone has a hack, keylogger, or-something-else that might work, please post!


Thanks in advance, community

Last edited by kronig (2009-08-24 14:19:35)

Offline

#2 2009-08-24 14:03:54

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: [SOLVED] Disable CTRL+Q hotkey

Just bind Ctrl+q to do nothing (e.g. just run /bin/true) in your window manager or desktop environment.This should prevent Ctrl+q from reaching any application.

Offline

#3 2009-08-24 14:11:41

kronig
Member
Registered: 2009-05-25
Posts: 22

Re: [SOLVED] Disable CTRL+Q hotkey

living and learning,
thanks hbekel

Offline

#4 2009-08-24 14:12:59

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] Disable CTRL+Q hotkey

You could use xmodmap and map ctrl+q to NoSymbol. But this depends on the Q key having a xkb_type that has a separate entry for the ctrl+ binding. Which it probably doesn't. So then this strategy becomes much harder: instead of the xmodmap interface, you'd have to dig deeper and add your own symbols and type definitions in /usr/share/X11/xkb/ and use setxkbmap. Which is a long complex process. If you want to travel it, man setxkbmap and get familiar with the xkeyboard-config package, and be prepared to google a lot.

May be simpler:
I know there are daemons which bind keys to particular actions. One may be built into your desktop, e.g, if you use xfce or gnome or kde. Else you could investigate some of these:

extra/xbindkeys                                     Launch shell commands with your keyboard or your mouse under X
community/whitebox                                  blackbox wm menu/style/background/keybinding configuration tool
aur/e16keyedit                                      Standalone keybindings editor for enlightenment
aur/keylaunch                                       A small utility for binding commands to hot keys
aur/libgiigic                                       GII high-level key binding support
aur/makro                                           A simple KDE4 frontend for Xnee and Xbindkeys.
aur/python-keybinder                                keybinder is a python module for gtk-based applications registering global key bindings
aur/xbindkeys_config                                XBindKeys_Config is an easy to use gtk program for configuring Xbindkeys.

If you just want to disable the keys in gtk programs, you can probably do that globally. (I don't know how, though.) At worst, you could put this in your ~/.gtkrc-2.0:

gtk-can-change-accels = 1

That enables you to press any key while holding open any menu item in a gtk app, and it will change the key accelerator assigned to that menu item.

I'm not sure what key you need to press to delete the accelerator and leave it blank, with that method.

Offline

#5 2009-08-24 14:16:43

kronig
Member
Registered: 2009-05-25
Posts: 22

Re: [SOLVED] Disable CTRL+Q hotkey

Profjim wrote:

May be simpler:
I know there are daemons which bind keys to particular actions. One may be built into your desktop, e.g, if you use xfce or gnome or kde. Else you could investigate some of these:

yeah, was simpler big_smile. I use gnome, so was no mistery after the /bin/true thing

Offline

Board footer

Powered by FluxBB