LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Filter key events (https://www.linuxquestions.org/questions/programming-9/filter-key-events-789114/)

MTK358 02-14-2010 07:32 PM

Filter key events
 
I remember that once was a thread about a user that wanted TouchCursor in Linux. I liked the idea and thought about implementing it for X, but no-one replied.

Now I am myself getting annoyed with reaching for the cursor keys and I would really like to know how to do this. The problem is that I do more and more work in the command line now, and I would like this to work here, too.

Would this be too hard to implement?

irmin 02-15-2010 01:30 PM

Maybe you should just change the keyboard mapping?

Have a look at /usr/share/X11/xkb.

MTK358 02-15-2010 01:43 PM

I don't want to remap keys, I want to make the spacebar a mod key that makes I, J, K and L act like arrow keys.

And I would like it to work without X, too, if that, not extremely hard.

irmin 02-15-2010 02:12 PM

keymaps(5) says:
Quote:

The keyboard driver supports 8 modifiers. These modifiers are labeled (completely arbitrarily) Shift, AltGr, Control, Alt, ShiftL, ShiftR, CtrlL and CtrlR.
The only possiblity I see is to get rid of one of the modifiers and define the space key to take its position. Then you can define that space+J=left or similar things. See keymaps(5).
At the moment I do not see an easier solution than creating a custom keymap and load it with loadkeys(1).

MTK358 02-21-2010 12:12 PM

Quote:

Originally Posted by irmin (Post 3864743)
keymaps(5) says:


The only possiblity I see is to get rid of one of the modifiers and define the space key to take its position. Then you can define that space+J=left or similar things. See keymaps(5).
At the moment I do not see an easier solution than creating a custom keymap and load it with loadkeys(1).

So will this work without X?

And will the spacebar still print a space when you press and release it?

MTK358 03-01-2010 12:12 PM

I was trying to find some info on keymaps, but can't seem to find anything.

Do you know of any good explanations/tutorials?


All times are GMT -5. The time now is 09:09 AM.