LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-27-2008, 02:46 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
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.

Last edited by w1k0; 12-28-2008 at 05:33 PM.
 
Old 12-27-2008, 02:48 PM   #2
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
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

Last edited by sahko; 12-27-2008 at 03:10 PM.
 
Old 12-27-2008, 03:09 PM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
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?
 
Old 12-27-2008, 03:13 PM   #4
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Other than the .Xmodmap i posted above, i just source it in .xinitrc with

Code:
xmodmap ~/.Xmodmap
 
Old 12-27-2008, 03:49 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
Old 12-27-2008, 04:31 PM   #6
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
I dont know about xbindkeys, I've never used it TBH, since xev+xmodmap work great.
 
Old 12-27-2008, 04:42 PM   #7
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
It really works great. I'm just curious. My problem is solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Contents of /etc/acpi for Thinkpad T60 statguy Slackware - Installation 2 12-22-2008 05:33 PM
ThinkPad T60 freezes while on battery statguy SUSE / openSUSE 3 01-14-2008 07:28 AM
ThinkPad T60 Suspend h3xis Linux - Laptop and Netbook 3 11-30-2007 09:12 PM
Slackware on ThinkPad T60 nsp Slackware - Installation 10 07-24-2007 09:01 AM
Special Fn-Keys on FC2 and Thinkpad R40 legolin Linux - Laptop and Netbook 0 07-20-2004 05:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration