Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Assigning a character to a function key (David Hummel)



I've tried to follow the directions below and feel like I've 
gotten part way there to a solution, but seem to be doing 
something wrong.
Given the xmodmap files I was able to locate on this 
Ubuntu-based Linux Mint 8, I did the following:
cd /usr/share/xmodmap
sudo gedit xmodmap.us
then replaced this line in the xmodmap.us file:
keycode 96 = F12 F12
with this
keycode 96 = u
and then did this:
xmodmap /usr/share/xmodmap/xmodmap.us
Much to my delight, when I then pressed the F12 key, it displayed 
a u.
But, much to my chagrin, 90% of the other keys started acting 
weirdly... most but by no means all of the numbers showed their 
as-if-Shift keyed symbol... many other keys either showed nothing 
or some kind of symbol.
When I rebooted all the keys reverted to normal behavior, 
including the F12 key though the xmodmap.us continued to be as I 
had edited it to be.
Have tried this several times with the same result.
Any suggestions as to what I may be doing wrong?

When I try stuff from this page:
http://linux.die.net/man/5/keymaps
like f'rinstance typing dumpkeys -l, I get error messages like this:
"couldn't get a file descriptor referring to the console"

    - Stephen Ronan



> From: David Hummel <lemmuh-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
> 
> First, determine the keycode for the function key using xev (man 1
> xev).  The code for the F12 key should be 96.
> 
> Next, determine the keysym name for the "u" using xev.  The name for
> this key is "u".
> 
> Next, map it in your ~/.Xmodmap file (man 1 xmodmap) with an entry like:
> 
> ! map f10 to u
> keycode 96 = u
> 
> Then execute the xmodmap program:
> 
> $ xmodmap ~/.Xmodmap
> 
> This will be executed automatically each time you start an X session.
> 
> It's more complicated if you want to control shift behavior (e.g.
> Shift-F12 = U).






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org