Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 7th, 2006   #1
brucehohl
Just Give Me the Beans!
 
Join Date: Mar 2006
Beans: 48
keyboard special keys

Mapping of special keys found on many keyboards has been covered a few times. Here's my version which is intended to be a quick and easy solution. Enjoy those fancy keyboards!

MY FILE: /usr/share/hotkey-setup/generic.hk
# Special key bindings via /usr/share/hotkey-setup/generic.hk
# Kernel key mappings for special keys can be set in this file
#
# STEP 1 - FIND SCANCODES
# When an unmapped special keys is pressed a message is written
# to /var/log/messages which indicates the "scancode".
# To find the scancode for an unmapped special key press the key
# then check /var/log/messages.
#
# STEP 2 - FIND UNUSED KEYCODES
# use "$ sudo dumpkeys" to find unused keycodes
# example of unused keycode: "keycode 120 ="
#
# STEP 3 - MAP SCANCODE TO KEYCODE
# format = setkeycodes scancode keycode
# example "setkeycodes e02a 120"
# add each mapping entry to this file
#
# STEP 4 - RESTART HOTKEY-SETUP
# after edit restarting the hotkey-setup service by:
# $ sudo /etc/init.d/hotkey-setup restart
#
# STEP 5 - MAP KEYCODE TO ACTION
# X11 mapping can be done with gnome-keybinding-properties
# which is System > Preferences > Keyboard Shortcuts
#
#
setkeycodes e02a 120 # gnome-keybinding-properties "Lock screen"
setkeycodes e023 121 # gnome-keybinding-properties "Home folder"
setkeycodes e015 122 # gnome-keybinding-properties "Launch help browser"
setkeycodes e026 123 # gnome-keybinding-properties "Launch calculator"
setkeycodes e06e 124 # gnome-keybinding-properties "Launch web browser"
brucehohl is offline   Reply With Quote
Old November 25th, 2008   #2
yoramdavid
Way Too Much Ubuntu
 
yoramdavid's Avatar
 
Join Date: Nov 2005
Location: Portugal, Baixo Alentejo
Beans: 254
Ubuntu 11.10 Oneiric Ocelot
Send a message via Skype™ to yoramdavid
Re: keyboard special keys

Hello,

That would be very nice although before I ad a program where I could choose my keyboard make and model and it would recognize all my hotkeys. But I cannot remember the name of this package...
So I was doing what you suggested but got an error on setting a keycode to an unused key, ie: setkeycodes e073 85
and got this error: [Couldnt get a file descriptor referring to the console]

Any idiea why?

Yoram
yoramdavid is offline   Reply With Quote
Old December 23rd, 2008   #3
linfidel
Way Too Much Ubuntu
 
linfidel's Avatar
 
Join Date: May 2007
Location: Pleasant Hill, California
Beans: 297
Ubuntu 11.10 Oneiric Ocelot
Re: keyboard special keys

Quote:
Originally Posted by yoramdavid View Post
Hello,

That would be very nice although before I ad a program where I could choose my keyboard make and model and it would recognize all my hotkeys. But I cannot remember the name of this package...
So I was doing what you suggested but got an error on setting a keycode to an unused key, ie: setkeycodes e073 85
and got this error: [Couldnt get a file descriptor referring to the console]

Any idiea why?

Yoram
A little late, but always try "sudo setkeycodes..." when something like this doesn't work. That error is what you would get without "sudo".
__________________
-- Marty Fried
ubuntu @ leftcoast-usa (.) com
Do Ubuntu
The Ubuntu Counter Project - user number # 14676
linfidel is offline   Reply With Quote
Old December 25th, 2008   #4
yoramdavid
Way Too Much Ubuntu
 
yoramdavid's Avatar
 
Join Date: Nov 2005
Location: Portugal, Baixo Alentejo
Beans: 254
Ubuntu 11.10 Oneiric Ocelot
Send a message via Skype™ to yoramdavid
Re: keyboard special keys

Quote:
Originally Posted by linfidel View Post
A little late, but always try "sudo setkeycodes..." when something like this doesn't work. That error is what you would get without "sudo".
Thank you.

Late but I will try since the problem is not yet solved.
I found the program I used before (keyTouch) but it does not work like before. I think I have tried so many different things that the keys must be assigned by something else and conflict.
I also used XbindKes....
I have tried uninstalling them all and reinstalling only one, but the settings are still there messed up somewhere...

Regards,
yoramdavid is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:41 PM.


vBulletin ©2000 - 2012, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry