"Windows Key" binding?Forum: X and Fluxbox Topic: "Windows Key" binding? started by: RoGuE_StreaK Posted by RoGuE_StreaK on Jan. 15 2006,00:45
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:
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...) Posted by clacker on Jan. 15 2006,03:28
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:
This set up the first part now edit /home/dsl/.fluxbox/keys and add lines like these:
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:
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. Posted by clacker on Jan. 15 2006,13:47
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):
Posted by RoGuE_StreaK on Jan. 15 2006,22:39
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? Posted by mikshaw on Jan. 15 2006,23:54
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. Posted by RoGuE_StreaK on Jan. 16 2006,08:10
Damn, would you believe I had typed "ExeCommand emelfm", leaving out a "c"!? Found xev from a DSL1.1 that I had lying around, and yes it reports the left windows key as keycode 133. So after frustrations with "windows e" not working, I hit "windows b" and up popped beaver. "windows f", up pops firefox. As stated, I'd mis-typed the emelfm command! Oh, and I used Mod4, not Mod5, and "add Mod4 = Super_L". I use the left windows key, and on the laptop there is only the left windows key. I assume keycode 134, Mod5, and Super_R are for the right key? Either way, it's working fine now, thanks clacker and mikshaw! Posted by clacker on Jan. 16 2006,14:05
RoGuE_StreaK, as far as I understand, Mod4 and Mod5 can be set to anything you want them to be set to. The keycode lines set the keycode to a named key, the add lines set a modifier to a named key, and the keysym lines merge two named keys into one named key.
Posted by Grim on Jan. 17 2006,02:32
xev is part of the < xbase-clients >. iirc, installing it with apt with get you a fullblown X. Probably would be a good candidate for a .dsl |