LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ThinkPad T60, Window Maker, and special Fn-keys (https://www.linuxquestions.org/questions/slackware-14/thinkpad-t60-window-maker-and-special-fn-keys-693318/)

w1k0 12-27-2008 02:46 PM

ThinkPad T60, Window Maker, and special Fn-keys
 
On my ThinkPad T60 so far I used Slackware 12.1 and now I try to configure Slackware 12.2. The problem I'd like to describe here concerns some special keys on my machine: so called ``multimedia keys'', ``browser's keys'', as well as ``Windows'' and ``Menu'' keys.

Slackware 12.1

With Slackware 12.1 I was able to use these keys with Window Maker thanks to the configuration of the system.

1. In ~/.Xmodmap I put a few keyboard modifiers:

.Xmodmap
Code:

keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 153 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 115 = F13
keycode 117 = F35
keycode 234 = F19
keycode 233 = F20

2. I installed ReMoot (see: http://remoot.sourceforge.net/).

3. I prepared key associations for ``multimedia keys'', ``Windows'' and ``Menu'' keys in ~/GNUstep/Defaults/WMRootMenu:

WMRootMenu
Code:

(
  Applications,
  ("Run...", SHORTCUT, "Shift+Mod1+r", EXEC, "%a(Run,Type command to run)"),
  ("xterm", SHORTCUT, "Shift+Mod1+x", EXEC, "/usr/bin/X11/xterm +sb -fg black -bg white -geometry 99x49+64+0 -fn 9x15"),
  ("Firefox", SHORTCUT, "Shift+Mod1+f", EXEC, "/usr/bin/firefox"),
  ("Thunderbird", SHORTCUT, "Shift+Mod1+t", EXEC, "/usr/bin/thunderbird"),
  ("OpenOffice.org", SHORTCUT, "Shift+Mod1+o", EXEC, "/usr/local/bin/soffice"),
  ("GIMP", SHORTCUT, "Shift+Mod1+g", EXEC, "/usr/bin/gimp"),
  ("Inkscape", SHORTCUT, "Shift+Mod1+i", EXEC, "/usr/bin/inkscape"),
  ("GQview", SHORTCUT, "Shift+Mod1+q", EXEC, "/usr/bin/gqview"),
  ("gMPlayer", SHORTCUT, "Shift+Mod1+m", EXEC, "/usr/local/bin/gmplayer"),
  ("Audacious", SHORTCUT, "Shift+Mod1+a", EXEC, "/usr/bin/audacious"),
  ("Wicd", SHORTCUT, "Shift+Mod1+w", EXEC, "/usr/bin/wicd-client -n"),
  ("Play/Pause", SHORTCUT, "XF86AudioPlay", EXEC, "/usr/local/bin/remoot playpause"),
  ("Next", SHORTCUT, "XF86AudioNext", EXEC, "/usr/local/bin/remoot next"),
  ("Prev", SHORTCUT, "XF86AudioPrev", EXEC, "/usr/local/bin/remoot prev"),
  ("Stop", SHORTCUT, "XF86AudioStop", EXEC, "/usr/local/bin/remoot stop"),
  ("WPrefs", SHORTCUT, "F13", EXEC, "/usr/lib/GNUstep/Applications/WPrefs.app/WPrefs"),
  ("WMakerconf", SHORTCUT, "F35", EXEC, "/usr/local/bin/wmakerconf"),
  ("Exit", SHORTCUT, "Shift+Mod1+F4", EXIT)
)

4. I set PrevWorkspaceKey and NextWorkspaceKey variables in ~/GNUstep/Defaults/WindowMaker file:

WindowMaker
Code:

.
.
.
  PrevWorkspaceKey = F19;
.
.
.
  NextWorkspaceKey = F20;
.
.
.

And in result I could use all these keys in Window Maker.

Slackware 12.2

With Slackware 12.2 it doesn't work. Window Maker doesn't see these keys. During start procedures it displays messages:

Code:

/usr/bin/wmaker warning: NextWorkspaceKey:invalid key in shortcut "F20"
/usr/bin/wmaker warning: PrevWorkspaceKey:invalid key in shortcut "F19"
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "XF86AudioPlay" for entry Play/Pause
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "XF86AudioNext" for entry Next
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "XF86AudioPrev" for entry Prev
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "XF86AudioStop" for entry Stop
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "F13" for entry WPrefs
/usr/bin/wmaker warning: WMRootMenu:invalid key in shortcut "F35" for entry WMakerconf

Slackware 12.2 uses Window Maker 20060427cvs so I downgraded it to Slackware 12.1 Window Maker 0.92.0 but it displays the same messages and doesn't see these keys too.

So I tried another method.

1. In ~/.Xmodmap I put the same keyboard modifiers:

.Xmodmap
Code:

keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 153 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 115 = F13
keycode 117 = F35
keycode 234 = F19
keycode 233 = F20

2. I installed the same ReMoot (see: http://remoot.sourceforge.net/).


3. In ~/.xbindkeysrc I put a few commands:

.xbindkeysrc
Code:

"remoot playpause"
XF86AudioPlay

"remoot stop"
XF86AudioStop

"remoot prev"
XF86AudioPrev

"remoot next"
XF86AudioNext

4. In ~/.xinitrc I put commands to run xbindkeys and Window Maker:

.xinitrc
Code:

xbindkeys
/usr/bin/wmaker

5. I put the same shortcuts as above in WMRootMenu and WindowMaker files.

In result when I run Window Maker it doesn't see any shortcut keys. For some reason xbindkeys forbids Window Maker to use shortcuts stored in WMRootMenu and WindowMaker files.

6. So I changed ~/.xinitrc to run KDE:

.xinitrc
Code:

xbindkeys
/usr/bin/startkde

In result when I ran KDE and Amarok I could use ``multimedia keys''.

Summary

Because usually I don't use KDE but Window Maker in the present situation I'm unable to use all these special keys as I did it with Slackware 12.1. I tried associate them to the desired actions using Window Maker configuration files as well as xbindkeys configuration file. Both these methods failed with the present version of Window Maker. I tried to downgrade Window Maker but the result was the same. I can't guess what should I do to make these keys usable with Window Maker. Any help will be welcomed.

sahko 12-27-2008 02:48 PM

Code:

keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 233 = XF86Forward
keycode 234 = XF86Back

Heres my T61 ones

edit: i use ratpoison. but these should work with any WM

w1k0 12-27-2008 03:09 PM

Quote:

Heres my T61 ones
This set is similar to the settings in my ~/.Xmodmap. In the above example you modify your keymap. Do you use Window Maker? How do you associate these keys to the concrete commands? Do you use WMRootMenu and WindowMaker configuration files from ~/GNUstep/Defaults/ directory or WPrefs application from /usr/lib/GNUstep/Applications/WPrefs.app/ directory?

sahko 12-27-2008 03:13 PM

Other than the .Xmodmap i posted above, i just source it in .xinitrc with

Code:

xmodmap ~/.Xmodmap

w1k0 12-27-2008 03:49 PM

I added xmodmap ~/.Xmodmap command to ~/.xinitrc file...

.xinitrc
Code:

xmodmap ~/.Xmodmap
/usr/bin/wmaker

...and now Window Maker sees all those shortcuts.

Thank you very much, sahko!

***

There is still question why xbindkeys disables all shortcuts in Window Maker.

sahko 12-27-2008 04:31 PM

I dont know about xbindkeys, I've never used it TBH, since xev+xmodmap work great.

w1k0 12-27-2008 04:42 PM

It really works great. I'm just curious. My problem is solved.


All times are GMT -5. The time now is 10:25 AM.