LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2014, 09:41 PM   #1
actmnophn
Member
 
Registered: Mar 2008
Posts: 52

Rep: Reputation: 15
map keyboard keys to commands (headless server)


I have a headless computer that is running as a server I want to add a wireless remote that works as HID keyboard to run scripts and the like. The remote is connected via usb and is recognized. the question I have is how to check what the kernel receives on keypresses and how to do "stuff" with those keypresses.

Thanks.

edit: I know it is connected and working somewhat because if i "cat /dev/input/event1" i see something when i press buttons.

Last edited by actmnophn; 03-10-2014 at 10:01 PM.
 
Old 03-11-2014, 08:04 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,949

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
One suggestion would be to use lirc. (http://www.lirc.org/) It will do the decoding and can be configured to control the computer to do lots of stuff.
 
Old 03-11-2014, 11:06 AM   #3
heinblöd
Member
 
Registered: May 2004
Location: France
Distribution: Slackware Gentoo
Posts: 186

Rep: Reputation: 31
The command you can use is showkey .

The 'stuff' you could put in .bashrc or /etc/profile and define as aliases or have a look at this :
http://www.tldp.org/HOWTO/Keyboard-a...e-HOWTO-5.html
 
Old 03-11-2014, 08:05 PM   #4
actmnophn
Member
 
Registered: Mar 2008
Posts: 52

Original Poster
Rep: Reputation: 15
I am going to look into those ideas thanks. One point that I am wondering is that the console is not logged into so the keys are not going to work as aliases I imagine.
Thanks again
 
Old 03-12-2014, 12:12 AM   #5
actmnophn
Member
 
Registered: Mar 2008
Posts: 52

Original Poster
Rep: Reputation: 15
I got lirc setup but i still dont know how to run scripts based on key presses. I found xbindkeys but cannot run xbindkeys -k because i dont have x...
I am a little(?) lost...
Thanks
 
  


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
[SOLVED] How to match X keyboard layout with the the kernel keyboard map? Didier Spaier Slackware 11 03-24-2013 03:40 PM
[xkb, xmodmap] how to map keys to combos and combos to keys me-macias Linux - Software 0 08-21-2009 03:49 PM
USB keyboard function keys/numeric keys on boot raypen Linux - Hardware 4 04-17-2008 04:07 PM
Map Keys Under 3dDesktop michaeljh2000 Slackware 0 01-07-2005 03:38 PM
how to map extra keys on k/b need some help here! jollyjoice Slackware 1 07-24-2004 10:51 AM


All times are GMT -5. The time now is 12:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration