macro keys in fluxboxForum: Other Help Topics Topic: macro keys in fluxbox started by: clacker Posted by clacker on May 23 2005,11:48
I was looking at replacing fluxbox with another window manager. Not so much because there is anything wrong with fluxbox, but because I was looking for something new and different. I was looking at keyboard binding, so I thought I'd give the keyboard binding in fluxbox a go and see what could be done.The two things I wanted to do were: 1) Using the "Print Screen" key on my keyboard to take a snapshot of the whole screen without having to select anything 2) set up the windows keys to act something like the alt and control keys do, so that I could type <Windows> B and have a beaver application open. The first thing I did was use a program called xev to find out if those keys were set to symbols already. When you type a character you get all sorts of info about a key, including it's name (if any) and its numeric value. You can see that the return key has the symble "Return" but the print screen and windows keys do not. Take a look at the output from the following to find unbound keys you can use: cat /usr/X11R6/lib/X11/XKeysymDB | more I chose SunPrint_Screen for my print screen button and IA1 and IA2 for the left an right windows keys. Next you need to make an input file for xmodmap, which will remap keys and set up the symbles for keys. Mine was called .Xmodmap and looked like this:
run xmodmap .Xmodmap (I did it from a terminal window in X). This sets the symble for 107 to SunPrint_Screen, and sets the two windows keys to return the symble mod5. Now the easy part is making the keybinding in fluxbox. I added these lines to the front of my ~/.fluxbox/keys file:
Choose restart from the window manager menu, and your keys are ready for use. Posted by mikshaw on May 24 2005,01:27
This should be added to the docs.
Posted by Woofydugfock on May 25 2005,13:21
Thanks for this Clacker - it'll be interesting to play around with this.
Posted by meo on May 25 2005,17:14
Hello clacker!Thanks a lot for this post clacker. Now I might be able to get my Alt Gr key to work in Firefox (perhaps). I have a swedish keyboard and it seems that all the scandinavian keyboard-layouts suffer from this problem. Have fun, meo Posted by clacker on May 25 2005,21:04
EDIT: changed it around to work and make sensemeo, perhaps you can! I got the umlaut to work on my american keyboard, so maybe something like this will work for you. Fist, I looked at the output of xmodmap -pke for Mode-switch which is the alt gr key. On my keyboard, it was mapped to the right alt key. Yours might be mapped there, somewhere else, or not at all. Then I made the following .Xmodmap file and pressing my right alt button and u gave me a ü in rxvt but not in firefox.
I think what happens in Firefox is that it grabs both alt keys. I made this .Xmodmap and now I could type a u with an umlaut in Firefox by hitting <right alt>u
You might not need the lines beside the two that move the Mode_switch. now you can umlaut till you drop. äÄüüöÖ Posted by meo on May 26 2005,07:12
Hi again!Thanks a lot clacker! I'll try it out asap. Have fun, meo Posted by clacker on May 29 2005,15:07
meo, any word on if running xmodmap .Xmodmap with the following .Xmodmap file works to give you umlauts in Firefox with a Scandinavian keyboard?
EDIT: added spaces per JO+'s observation |