LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-14-2010, 08:32 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
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?
 
Old 02-15-2010, 02:30 PM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Maybe you should just change the keyboard mapping?

Have a look at /usr/share/X11/xkb.
 
Old 02-15-2010, 02:43 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
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.
 
Old 02-15-2010, 03:12 PM   #4
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
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).
 
Old 02-21-2010, 01:12 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by irmin View Post
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?
 
Old 03-01-2010, 01:12 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Original Poster
Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
I was trying to find some info on keymaps, but can't seem to find anything.

Do you know of any good explanations/tutorials?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hang on triggering udev events- is there a buildup of events? sonichedgehog Slackware 20 07-11-2008 03:49 AM
Laptop key press/release events question flsomerv Linux - Laptop and Netbook 2 10-08-2007 11:59 AM
Getting Key and Create events from all window children with Xt LonelyStar Programming 4 09-27-2007 08:27 AM
How to get key press and release events on kernel 2.6 for a application in C? abhijeet Programming 2 04-24-2007 01:37 AM
Java, Fedora Core 6, AltGr, and key events King V Linux - Software 2 04-12-2007 12:11 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration