You are not logged in.

#1 2011-03-09 14:41:38

spunkiie
Member
Registered: 2010-07-06
Posts: 15

Xorg Keybinding

Hi,

Here's the deal: I want to make the 'Escape' key an alias to: ALT + F4 under Xorg.

Simple.

But i need to do this under good old 'plain Xorg' (googled alot for a Xmodmap solution without success, i'm even considering source code editing here hmm)

No third party tools, no WM, no DE.

BTW:

1) I know any newer DE can easily do this. (That's not my case, i will only run Xorg without a WM nor DE)
2) I Know xbindkeys + xvkbd already (again.. i need to use legacy tools)

Anyone with a light here ?

Thank you in advance

Offline

#2 2011-03-10 02:31:10

codeRage
Member
Registered: 2011-02-20
Posts: 29

Re: Xorg Keybinding

Hi spunkiie,

I too am interested in this solution

Last edited by codeRage (2011-03-10 02:47:44)

Offline

#3 2011-03-10 10:54:40

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Xorg Keybinding

@codeRage: If you do not have the second requirement of not being able to use xbindkeys or xkill, you may be interested in the previous thread: https://bbs.archlinux.org/viewtopic.php … 68#p897968

Offline

#4 2011-03-10 21:33:38

codeRage
Member
Registered: 2011-02-20
Posts: 29

Re: Xorg Keybinding

@spunkiie
Well, it seems to me at the end of the day that Xorg isn't responsible for closing your application. That's left up to the WM or DE or even application itself. There is an XF86Close keysym, bound to keycodes 182 and 214. Remapping XF86Close to keycode 9 (Esc) didn't do anything for me however. I suspect Openbox might be responding to keycodes and not to keysyms.

Now, Procyon's solution of xbindkeys is a demon that runs in the background and trolls for unsuspecting key events, and when it finds an Escape it will execute the xkill command (if that is how you configured it).

Anyway, I don't know if this helps you but here is a solution for generating artibtrary key events like Alt+F4
http://lineakd.sourcearchive.com/docume … ource.html

Compile it with

gcc -o xsendkeycode xsendkeycode.c -lX11 -lXtst

Last edited by codeRage (2011-03-10 21:35:57)

Offline

Board footer

Powered by FluxBB