LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2014, 10:42 AM   #1
iscariot
LQ Newbie
 
Registered: Jun 2003
Posts: 9

Rep: Reputation: 0
Method for mapping a long key press to another key?


Is there something for linux that would allow you to map a long key press to another key? The reason I'm asking is because we are building a set of kiosks for a local community center, and they are using a limited keyboard to control the system. In this case, we don't have any function keys, ctrl, alt, home, etc. Is there some sort of way in linux to have someone hold down like the backspace key for 5 seconds and it would send an escape keypress?
 
Old 01-29-2014, 03:30 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991

Rep: Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890Reputation: 7890
I think: the keyboard handler counts the delay (length of keypress) and sends repeatedly the same key event, so you need to modify it to do something else.
 
Old 01-29-2014, 07:17 AM   #3
iscariot
LQ Newbie
 
Registered: Jun 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I see. Is there something out there that already does that or is that something that needs to be written? No sense reinventing the wheel.
 
Old 02-18-2014, 03:06 PM   #4
iscariot
LQ Newbie
 
Registered: Jun 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Anybody?
 
Old 02-18-2014, 03:34 PM   #5
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 472

Rep: Reputation: Disabled
Instead of a long key press, designate a few keys as a prefix keys. If you press the prefix key, the system waits for the second key. You can even chain these together so that you could type a whole word

How you do it will depend on the WM you are using. I use xbindkey to define the primary prefix key which then hands control over to my script, after which I am in control. the details after that are then very wm specific - I use ratpoison as my wm....
 
Old 02-19-2014, 12:07 PM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,228

Rep: Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345Reputation: 2345
I think they'll have to get a different keyboard. There are plenty of kiosk keyboards with a variety of configurations. e.g.
http://www.electronickeyboards.com/kiosk-keyboards.html

Of course it depends on their budget: the kiosk boards are all expensive and if the usage is not expected to be too heavy, it might make sense to get standard office-quality keyboards and replace every few years.
 
Old 02-28-2014, 12:40 PM   #7
iscariot
LQ Newbie
 
Registered: Jun 2003
Posts: 9

Original Poster
Rep: Reputation: 0
One of the things we have is that this is a limited key matrix, IE we have like 10 buttons, or "keys" on the kiosk. I was hoping we could just press and hold one to make it do a separate action.
 
  


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
Specified key was too long; max key length is 1000 bytes markings Linux - Server 0 01-03-2014 03:45 AM
Cannot sequentially press Alt key then menu accelerator, must press both concurrently Woodsman Slackware 1 03-21-2013 03:21 PM
Any other method of generating pub key attenuation other than rsa key sanjay87 Linux - Server 1 03-29-2012 09:21 AM
Keyboard mapping using xev see what key code, a key is bond to? NightSky Slackware 12 10-14-2011 03:03 AM
Mapping AltGr key to act as WIN key krisrao Linux - Newbie 3 02-11-2009 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration