Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eject, Volume, etc. and international symbols.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Wed Dec 14, 2005 2:31 am    Post subject: Eject, Volume, etc. and international symbols. Reply with quote

This technique does not use pbbuttons at all. All you need is xmodmap, xev, xbindkeys, and >=eject-2.1.0
This version of eject has a new feature 'eject -T' toggles a drive open/closed.

xev to find out what keycodes you need to modify. xmodmap to set those keycodes. Here is my example .Xmodmap
Quote:
keycode 10 = 1 exclam exclamdown onesuperior
keycode 11 = 2 at at twosuperior
keycode 12 = 3 numbersign sterling threesuperior
keycode 13 = 4 dollar EuroSign onequarter
keycode 14 = 5 percent onehalf cent
keycode 15 = 6 asciicircum yen fiveeighths
keycode 16 = 7 ampersand
keycode 17 = 8 asterisk guillemotleft
keycode 18 = 9 parenleft guillemotright
keycode 19 = 0 parenright degree
keycode 93 = F16
keycode 115 = Mode_switch
keycode 157 = KP_Equal
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 182 = F13
keycode 183 = F14
keycode 184 = F15
keycode 204 = F19

keycode 115 is the Left Apple key for me. So 115 + 18 = guillemotright
keycode 204 is the eject button for me. The rest are obvious.

Use 'xmodmap .Xmodmap' to set these keycodes. Then use xbindkeys to assign "eject -T &" to your eject key.
Start xbindkeys in daemon mode.

In KDE-3,4, kde overwrites the xmodmap settings, so you need to put a script in .kde/Autostart that reads in your xmodmap config file.

In GNOME, you may need to adjust some settings using gconf-editor -> apps -> metacity -> (keybindings + global_keybindings).

PS:
The international symbols fix is posted online, but I can't remember where or would supply credit.
My .kde/Autostart/Xmodmap
Quote:

#!/bin/sh
xmodmap ~/.Xmodmap
xbindkeys


Last edited by davidgurvich on Thu Dec 15, 2005 2:14 am; edited 1 time in total
Back to top
View user's profile Send private message
jedsen
Apprentice
Apprentice


Joined: 15 Oct 2004
Posts: 276
Location: Sacramento, California, USA

PostPosted: Wed Dec 14, 2005 11:12 pm    Post subject: Reply with quote

Thanks, it works great. I always hated pbbuttonsd. It was slow and crashed on me a lot.
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Fri Dec 16, 2005 2:53 pm    Post subject: Alternative without xmodmap or xbindkeys Reply with quote

Here is a method that works without xmodmap or xbindkeys. I had to modify slightly different files based on my xorg.conf.
[*]
1)Use xev to see what the keycode is
2)Get the value in /usr/X11R6/lib/X11/xkb/keycodes/xfree86
3)Modify your keymap. In my case:
/usr/X11R6/lib/X11/xkb/symbols/macintosh/us
4)Bind an action to that key using your window manager.
In e17 for eject
Code:
enlightenment_remote -binding-key-add ANY XF86Eject NONE 0 exec "eject -T &"

Code:
enlightenment_remote -binding-key-add ANY XF86AudioLowerVolume NONE 0 exec "amixer set Master 6-"

Not sure yet of how to adjust for other window managers.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum