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



On Thu, Dec 17, 2009 at 6:13 PM, Stephen Ronan <sronan-VmQCmMdMyN0AvxtiuMwx3w at public.gmane.org> wrote:
>
> I'm helping someone with a problem laptop. I've put
> Ubuntu-based Linux Mint on it, which is working well. The two
> major remaing problems are:
> 1) it's reporting lots of bad sectors on the hard drive
> 2) The "u" key doesn't work.
>
> In regard to 1), I'm planning to use Spinrite, but am curious as
> to whether there may be any free programs that similarly can help
> with bad sector problem?
>
> In regard to 2, is there a way to assign "u" to a function key?
> I'd be grateful for any advice on a good way to do that.

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