Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: "Windows Key" binding?, something's missing< Next Oldest | Next Newest >
RoGuE_StreaK Offline





Group: Members
Posts: 418
Joined: Jan. 2004
Posted: Jan. 15 2006,00:45 QUOTE

OK, try to finally solve the issue of how to bind the windows key in DSL, need some help here.
I know that the key in fluxbox is "Mod4", and that commands should be put into .fluxbox/keys, eg "Mod4 e :ExecCommand emelfm"

1.  Does the default "us" keyboard include the windows key?  If not, which one does?

2.  According to this page, "xmodmap" in a term should give you somewhere in there "mod4        Super_L (0x7f)"
In my setup, mod4 only lists "Mode_switch (0x6c)".  Howto add Super_L in DSL?  (keycode 115 = Super_L)  The page mentioned says:

Quote
If you don't, you can create a $HOME/.xmodmaprc file. In that file put

keycode 115 = Super_L
keycode 116 = Super_R
keycode 117 = Menu

The last line enables you to use the Windows menu key as well.

Save this file in your home directory and then add the following to your .xinitrc (above the exec fluxbox line)

xmodmap .xmodmaprc

Will this work in DSL?

Hopefully resolving those two issues will give the ability to bind to the windows key, for shortcuts to pop up menus, launch emelfm, or a number of different things.  If the key's there, may as well use it!  (Might need a little penguin stuck on it, though...)


--------------
"I find your lack of penguin disturbing"
                                      - Darth Tux
Back to top
Profile PM WEB 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Jan. 15 2006,03:28 QUOTE

RoGuE_StreaK, dsl 1.4 came with a utility called xev that let you find the keycodes for keys.  That's been removed now.  I have no idea why, it was only 14K and really usefull.  Anyway, on my keyboard the keycodes were different but here's what you do (just use the correct keycodes for your keyboard, mine was a US version):

in an xterminal type:

Code Sample
xmodmap -e "keycode 133 = Super_L"
xmodmap -e "keycode 134 = Super_R"
xmodmap -e "keycode 135 = Menu"
xmodmap -e "add Mod5 = Super_R"


This set up the first part now edit /home/dsl/.fluxbox/keys and add lines like these:

Code Sample
Mod5 b :ExecCommand beaver
Mod5 f :ExecCommand firefox
Mod5 m :ExecCommand /usr/local/bin/mc


now choose window manager --> restart in the fluxbox menu and your macros should be all set up.  Hit the right windows key and f together (like shift f) and firefox starts up.

If you want both windows keys to to act like the same key enter this in a xterminal:

Code Sample
xmodmap -e "keysym Super_R = Super_L Super_R"


Now hitting either windows key and f will start up firefox.

I miss xev, I wish they would put it back, especially with all of the keyboard questions as of late.
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Jan. 15 2006,13:47 QUOTE

I should have added if you have a hard drive or are remastering and want this change permanent, you could make an .xmodmap file like the below and add the line xmodmap .xmodmap & to your .xinitrc file above the fluxbox line (like you said in your post):

Code Sample
keycode 133 = Super_L
keycode 134 = Super_R
keycode 135 = Menu
add Mod5 = Super_R
keysym Super_R = Super_L Super_R
Back to top
Profile PM 
RoGuE_StreaK Offline





Group: Members
Posts: 418
Joined: Jan. 2004
Posted: Jan. 15 2006,22:39 QUOTE

So far haven't got this to work, the xmodmap additions seem to show up in the table, but I think the problem now lies in what the keycode is, or whether any code is actually registering when the windows key is pressed.
I take it xev shows keycodes on keypress?  I tried to apt-get it, but can't find it anywhere, and it's been ages since I last used apt anyway, so have forgotten how to force a download of all dependancies...

Any thoughts on whether "us" keyboard should include this key, or whether I have to use another keymap?  I went through them all and didn't see one that sounded safe...
PS.  This is on a new laptop, though I doubt they would have a different keycode?


--------------
"I find your lack of penguin disturbing"
                                      - Darth Tux
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 15 2006,23:54 QUOTE

The us keyboard should include it...it does for me.  The problem is likely that your keyboard has different keycodes than clacker has for the windows keys.

Xev is part of xbase-clients.
If you have access to another linux system, you can copy /usr/X11R6/bin/xev from that...it has no dependencies beyond what is in DSL, as long as it wasn't built with a newer c lib.
If not, you can extract it from the xbase-clients debian package.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
7 replies since Jan. 15 2006,00:45 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: "Windows Key" binding?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code