Control DockStar with USB keypad November 19, 2010 03:51PM |
Registered: 13 years ago Posts: 9 |
apt-get install inputlirc apt-get install lirc
OPTIONS="-m 55 -r 300"This sets the minimal key code that inputlirc evaluates. "-m 55" enables all keys of a keypad. To use all keys of a regular keyboard you would have to lower the -m value until all needed keys work, "-m 0" should enable all keys.
/etc/init.d/inputlirc restartyou can check if it sends the right key codes with
irwThis should print one line for each key press and if you keep a key pressed it should increase the repeat counter like that:
52 0 KEY_KP0 event0 52 1 KEY_KP0 event0 52 2 KEY_KP0 event0 ...
# # LIRCRC for controlling the Seagate Dockstar using an USB Keypad # begin button = KEY_KP0 repeat = 0 prog = irexec config = echo "none" > /sys/class/leds/dockstar\:orange\:misc/trigger end begin button = KEY_KP1 repeat = 0 prog = irexec config = echo "default-on" > /sys/class/leds/dockstar\:orange\:misc/trigger end
/etc/init.d/lirc start
/etc/init.d/lirc restart
begin button = KEY_KP0 button = KEY_KP0 button = KEY_KPENTER repeat = 0 prog = irexec config = shutdown -h now end begin button = KEY_KP0 button = KEY_KP1 button = KEY_KPENTER repeat = 0 prog = irexec config = shutdown -r now end
apt-get install console-tools
# Flash Num Lock LED on every key press begin button = * repeat = 0 prog = irexec config = `setleds +num < /dev/tty0` && `sleep 0.01` && `setleds -num < /dev/tty0` end
Signal9
Re: Control DockStar with USB keypad November 23, 2010 11:22AM |
eppi
Re: Control DockStar with USB keypad December 27, 2010 02:28AM |
Re: Control DockStar with USB keypad December 28, 2010 06:08AM |
Registered: 13 years ago Posts: 9 |
Eppi
Re: Control DockStar with USB keypad December 29, 2010 02:32AM |
lenny14:~# /etc/init.d/inputlirc restart Restarting inputlirc configuration No /usr/sbin/inputlircd found running; none killed. /usr/sbin/inputlircd: invalid option -- r Unknown option!
lenny14:~# dmesg | grep input input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input0 generic-usb 0003:062A:3272.0001: input: USB HID v1.10 Keyboard [MOSART Semi. 2.4G Keyboard Mouse] on usb-orion-ehci.0-1.2/input0 input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input1 generic-usb 0003:062A:3272.0002: input: USB HID v1.10 Mouse [MOSART Semi. 2.4G Keyboard Mouse] on usb-orion-ehci.0-1.2/input1 input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input2 generic-usb 0003:062A:3272.0003: input: USB HID v1.10 Keyboard [MOSART Semi. 2.4G Keyboard Mouse] on usb-orion-ehci.0-1.2/input0 input: MOSART Semi. 2.4G Keyboard Mouse as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input3 generic-usb 0003:062A:3272.0004: input: USB HID v1.10 Mouse [MOSART Semi. 2.4G Keyboard Mouse] on usb-orion-ehci.0-1.2/input1
Re: Control DockStar with USB keypad December 31, 2010 08:20AM |
Registered: 13 years ago Posts: 9 |
Re: Control DockStar with USB keypad January 02, 2011 10:03PM |
Registered: 13 years ago Posts: 11 |
Re: Control DockStar with USB keypad January 03, 2011 03:15AM |
Registered: 13 years ago Posts: 9 |
asbo
Re: Control DockStar with USB keypad April 17, 2011 09:25AM |
# # LIRCRC for controlling the Seagate Dockstar using an USB Keypad # begin button = KEY_PLAYPAUSE repeat = 0 prog = irexec config = mplayer -ao alsa -msgcolor -cache 128 -playlist http://bbc.co.uk/radio/listen/live/bbcnorfolk.asx end begin button = KEY_STOPCD repeat = 0 prog = irexec config = "some command to quit mplayer" end
Re: Control DockStar with USB keypad April 17, 2011 11:22AM |
Registered: 13 years ago Posts: 28 |
asbo
Re: Control DockStar with USB keypad April 17, 2011 01:16PM |
killall -9 mplayer killall -KILL mplayer
mplayer -stop mplayer -quitetc. etc.
ST
Re: Control DockStar with USB keypad January 19, 2012 09:38AM |
45 0 KEY_NUMLOCK event1 47 1 KEY_KP7 event1 45 2 KEY_NUMLOCK event1 45 0 KEY_NUMLOCK event1 47 1 KEY_KP7 event1 45 2 KEY_NUMLOCK event1 66 0 KEY_HOME event1 69 1 KEY_LEFT event1 69 0 KEY_LEFT event1 66 0 KEY_HOME event1 69 1 KEY_LEFT event1 66 0 KEY_HOME event1
begin button = KEY_HOME repeat = 0 prog = irexec config = mpc play end begin button = KEY_LEFT repeat = 0 prog = irexec config = mpc stop end
ST
Re: Control DockStar with USB keypad January 19, 2012 06:59PM |
franko_
Re: Control DockStar with USB keypad March 22, 2012 04:04AM |
franko_
Re: Control DockStar with USB keypad March 22, 2012 03:00PM |
KLamont
Re: Control DockStar with USB keypad June 28, 2012 02:44PM |
Re: Control DockStar with USB keypad June 19, 2016 09:36AM |
Registered: 8 years ago Posts: 17 |
Re: Control DockStar with USB keypad June 19, 2016 05:20PM |
Registered: 9 years ago Posts: 1,037 |
Re: Control DockStar with USB keypad June 19, 2016 06:08PM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: Control DockStar with USB keypad June 20, 2016 07:09AM |
Registered: 8 years ago Posts: 17 |
Re: Control DockStar with USB keypad June 20, 2016 07:44AM |
Registered: 9 years ago Posts: 1,037 |
Re: Control DockStar with USB keypad December 01, 2019 03:22PM |
Registered: 8 years ago Posts: 17 |