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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-28-2014, 10:42 AM
|
#1
|
LQ Newbie
Registered: Jun 2003
Posts: 9
Rep:
|
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?
|
|
|
01-29-2014, 03:30 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,991
|
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.
|
|
|
01-29-2014, 07:17 AM
|
#3
|
LQ Newbie
Registered: Jun 2003
Posts: 9
Original Poster
Rep:
|
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.
|
|
|
02-18-2014, 03:06 PM
|
#4
|
LQ Newbie
Registered: Jun 2003
Posts: 9
Original Poster
Rep:
|
Anybody?
|
|
|
02-18-2014, 03:34 PM
|
#5
|
Member
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 472
Rep: 
|
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....
|
|
|
02-19-2014, 12:07 PM
|
#6
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,228
|
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.
|
|
|
02-28-2014, 12:40 PM
|
#7
|
LQ Newbie
Registered: Jun 2003
Posts: 9
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:10 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|