Simon Johnson
Simon Johnson

Reputation: 7912

Mapping my custom keys in Debian

I have a Microsoft keyboard with a series of non-standard buttons such as "Mail", "Search" , "Web/Home" etc.

It would be nice to be able to bind these keys so they execute arbitrary programs.

Does anybody know how to do this in Debian Etch?

Upvotes: 3

Views: 6802

Answers (5)

HoboBen
HoboBen

Reputation: 3471

I can't say for certain because I'm not using Debian but if you're using Gnome the easiest way is to run gnome-keybinding-properties (System > Preferences > Keyboard Shortcuts)

Instead of typing a shortcut such as Ctrl+M, hit the button on your keyboard.

If you would prefer to do this via command line or with a different desktop environment, this may help: Unusual keys and keyboards

Upvotes: 2

Roch
Roch

Reputation: 22051

If you want to do it manualy you can edit ~/.xmodmap and use xmodmap ~/.xmodmap to apply the modifications

Upvotes: 0

Magus
Magus

Reputation: 577

Running Debian, I had the same issue. What I did is run xev and see what keycode those keys return. Microsoft likes to break standards a little, so some of the multimedia keys just won't work. But the ones that do will return a keycode. Then write a script with xmodmap to map those keys properly.

The Gentoo Wiki has excellent documentation on how to do these things.

I put my xmodmap script in ~/.kde/Autostart/ because I use kde, but you could just as easily put it in your home folder and have your .bashrc or .profile source it.

Once you've mapped the keycodes, you can assign those keys to specific actions in your desktop environment.

Upvotes: 1

jdd
jdd

Reputation: 4336

There's a few different ways to do so, the easiest generally being keytouch, which is probably available in the Debian repositories. The user manual is here. There is a chance that your keyboard won't work with it though.

Upvotes: 0

Matt McMinn
Matt McMinn

Reputation: 16311

I used Gizmo Daemon for my PowerMate under Debian - it supports fancy keyboard keys as well (although I haven't tried it for those keys). Hacking on gizmod to get it to do what I wanted was pretty easy.

Gizmo Daemon

Upvotes: 0

Related Questions