PDA

View Full Version : Hotkeys for Multi-media keyboards


dracheflieger
03-04-2007, 11:50 PM
Not a specific request but I thought I'd throw this out and see what others think, maybe as an install option. It's a very small footprint, even with the OSD. It's found in /usr/ports/misc/hotkeys if anyone has one of these keyboards and they would like to install from ports and let us know how it works.

URL (http://ypwong.org/hotkeys/)

The following from the man pages

NAME
hotkeys - A hotkeys daemon for your Internet/multimedia keyboard in X

SYNOPSIS
hotkeys [options...]

DESCRIPTION
This program sits at the back and listens for the "special" hotkeys
that you won't normally use on your Internet/Multimedia keyboards. The
buttons perform their intended behaviors, such as volume up and down,
mute the speaker, launch applications, etc. The functions are com-
pletely programmable.

It has On-screen display (OSD) to show the volume, program that's being
started, etc. Most importantly it looks cool.

It features an XML-based keycode configuration file format, which makes
it possible to define the hotkeys to launch any programs you want.

Supported keyboards: (with corresponding options to --kbd-list or -l)
acerwl - Acer Wireless Keyboard
btc9000 - BTC 9000
eliteduo - Logitech Cordless iTouch/Internet/Cordless Desktop
hp5181 - HP 5181 Internet Keyboard
ibook - iBook Internal Keyboard
itouch - Logitech Cordless iTouch/Internet/Cordless Desktop
kb9930 - IBM Rapid Access II Keyboard
kb9963 - Compaq KB-9963 keyboard
kbp8993 - Chicony KBP-8993 keyboard
logitech-cfo - Logitech Cordless Freedom Optical Keyboard
logitech-ultrax - Logitech UltraX (USB) Keyboard
mck800 - Process MCK-800
msnatpro - Microsoft Natural Keyboard Pro
msnet - Microsoft Internet Keyboard
msnetpro - Microsoft Internet Pro Keyboard
mx1998 - Memorex MX1998 Keyboard
mx2500 - Memorex MX2500 Keyboard
mx3000 - Memorex MX3000 Keyboard
orktekusb - ORKTEK USB Hub/keyboard
pb5140w - Packerd Bell Model 5140W
polypix - Polypix Keyboard
sk2500 - Fujitsu/Logitech/Trust SK2500 Keyboard / Liteon-ak2500
sk2501a - Silitek SK5210A Keyboard
sk2505 - SK-2505 Keyboard
sk2800c - SK-2800C
sk7100 - Silitek SK7100 Keyboard
sk9925 - Silitek SK-9925 USB Keyboard


SUPPORTED KEYBOARDS
1. Acer Airkey III Wireless keyboard

2. Microsoft Internet, Internet Pro, and Natural Pro

3. Memorex MX1998, MX2500 and MX3000 keyboard

4. SK-2500, SK-2501a, SK-2505, SK-2800c, SK-7100, SK-9925 USB (par-
tial)

5. Logitech cordless iTouch, Internet, Cordless Desktop keyboard

6. Chicony KBP-8993

7. Compaq KB-9963

8. Polypix

9. BTC 9000

10. Process MCK-800

And more...

As I have only the Acer wireless keyboard, you can help me to support
other keyboards by sending me the list of keycodes of the hotkeys on
your keyboard. You can do this by using xev. Contact me for the
details.

CONFIGURATION FILE
The configuration file is named hotkeys.conf. By default it is
installed in /usr/local/etc (or /etc on Debian). You can also put one
into $HOME/.hotkeys/, which will override the settings in the global
file if one exists. In other words, the order of parsing is the global
file first and then the private one.

The syntax of the file uses the simple key=value pairs. Blank lines and
lines starting with # are ignored. The followings are the valid keys
and their default values (they are subjected to be changed without
prior notice =):

Key Default
--------------- ------------------------------------------
Kbd (no default)

# CDROM device
CDROM /dev/cdrom

# audio actions
PrevTrack xmms --rew
Play xmms --play
Stop xmms --stop
Pause xmms --pause
NextTrack xmms --fwd
Rewind (no default yet, suggestion welcome)

# applications
WebBrowser mozilla
Email mozilla -mail
Calculator xcalc
FileManager gmc
MyComputer gmc
MyDocuments gmc
Favorites gnome-moz-remote --remote=openBookmarks
Transfer gftp
Record grecord
Shell xterm -rv
ScreenSaver xscreensaver-command -activate
NewsReader mozilla -news
Communities mozilla -remote 'openURL(http://slashdot.org)'
Search mozilla -remote 'openURL(http://google.com)'
Idea mozilla -remote 'openURL(http://sourceforge.net)'
Shopping mozilla -remote 'openURL(http://thinkgeek.com)'
Go mozilla -remote 'openURL(http://linux.com)'
Print lpr

# OSD stuffs
osd_font lucidasanstypewriter-bold-24
(should be aliased to -*-lucidatypewriter-bold-r-normal-*-*-240-*-*-*-*-*-*)
osd_color LawnGreen
osd_timeout 3
osd_position bottom
osd_offset 25

NOTES
Do not disable the XKEYBOARD extension. For XFree86 3.x, make sure Xkb-
Disable is not set.

TerryP
03-06-2007, 10:00 PM
Hey I think I own one of those keyboards.

antik
03-06-2007, 10:19 PM
Wow! With on-screen display support.

pcbsdusr
03-06-2007, 10:28 PM
WOW! This is a must have!

DarkStarAeon
03-13-2007, 08:15 PM
Does this work with a Logitech S-510?

I'm confused :oops: is this something I can make work on my own?

I'd love to get my media buttons working on my keyboard.

dracheflieger
03-13-2007, 08:59 PM
Try it and let us know...cd /usr/port/misc/hotkeys && make install clean as root.

DarkStarAeon
03-14-2007, 01:08 AM
Try it and let us know... as root.

yeah that makes me nervous. lol

DarkStarAeon
03-14-2007, 01:37 AM
ok I just went to the folder in ports and used the terminal emulator like I normally do so that way I don't have to worry if I typed in the path right, lol.

Alright it installed, and I went to the hotkeys.conf file to edit it, but, I don't know what the hell I'm doing in there, lol. Not sure what to type in for what I want.

just when I start to think I know a system I have to do something I haven't done before. lol

dracheflieger
03-14-2007, 02:28 AM
hotkeys -t logitech-cfo or hotkeys -t logitech-ultrax from the terminal, you don't need to be root.

You may need an '=' sign between the -t and the keyboard def file name.

DarkStarAeon
03-14-2007, 01:28 PM
%hotkeys -t logitech-cfo
%hotkeys started successfully.

%hotkeys -t logitech-ultrax
%hotkeys started successfully.

Is something supposed to happen besides it telling me it started successfully?

dracheflieger
03-14-2007, 02:02 PM
Hmmm...sorry, you should only try one at a time with a reboot inbetween I would think. I got that information from man hotkeys
andhotkeys -l
and if your keyboard is supported then some of the special keys should start working.

DarkStarAeon
03-14-2007, 02:38 PM
Well I tired one, nothing happened, so then I tried the next one. lol

Hmm, to reboot or not to reboot, which will do the least damage? heh.

DarkStarAeon
03-14-2007, 03:10 PM
rebooted and nada.

Although I wonder if I screwed it up by using both of those commands?

dracheflieger
03-14-2007, 03:20 PM
Neither, it'll just reside in memory until you reboot or kill the process. I just checked, no '=' between the -t and the logitech keyboard. To find a process, ps aux | grep hotkeys and the first number on the line is the process id. Then you can kill <PID> or if that doesn't do it then you'll have to su to root and kill -9 <PID>
where PID is the process id and without the angle brackets ;-)

DarkStarAeon
03-14-2007, 03:31 PM
Ah, ok, I just looked, it's not running so I didn't have to do anything. I tried it without the '=' originally so no worries there.

Ah well, it was worth trying. 8)

dracheflieger
03-14-2007, 03:53 PM
You might try emailing Anthony Y P Wong <ypwong [at] ypwong [dot] org>, tell him you would like to use his program, tell him which keyboard you have and ask how you can help him get a definition file for it :D This was just updated last week so I think the development is active.