Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 30 Jul 2014, 05:45
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Setting Special Keybindings in NOP
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Sun 01 Aug 2010, 06:00    Post subject:  Setting Special Keybindings in NOP
Subject description: Fn Keys etc.....
 

Most Laptops have an Fn key system to extend the range of their keyboards, and also some special keys, like the Windows menu keys, but these are often not recognised, or at least, not used in Linux.
This tutorial is intended to demonstrate how to do this in NOP, which uses the Xfce 4.4 desktop. Specifically QuirkyNOP, but other variants should be the same.
It consists of three steps: discovering the identity of the key as seen by X, binding that identity to a string that Xfce understands, then assigning a command to the key.
So. To begin, open a terminal window menu>utility>terminal, and simply type
Code:
xev
and hit 'enter'.
This will bring up a little target box and leave the terminal window open on the desktop. Watch the terminal window, and hit the key you want to use. For this example, we will use the Windows Menu key.
Assuming X can recognise this key, this will bring up a bunch of text in the terminal window. Look for the keycode, usually 115, and make a note of the number.
OK, so now we have the key identity.
Next, we need to bind that identity to a string that Xfce understands.
So. First, create a text file in your root directory called .Xmodmap Note the dot at the start of the file name is important. Leave this (so far) blank file open. Now we need to find a suitable string that Xfce understands. These strings are all held in a text file at /usr/share/X11/XKeysymDB. Open this file and look for a suitable string, in this case its XF86MenuKB.
Then add the entry to .Xmodmap. This is the syntax:
Code:
 keycode 115 = XF86MenuKB

and save the file. Now you have to 'bind' this so that Xfce will use it. Again open a terminal window and type
Code:
 xmodmap .Xmodmap
and hit enter. Job done.

All that remains now is to tell Xfce to use this key with the command of your choice. In this example, we will set it to launch Firefox.
So. Menu>Settings>Xfce Settings Manager, and launch the keyboard section by clicking the icon. Choose the Application Shotcuts tab. Click the + button to add a command, and use the Open button to find the command you want, in this case, /usr/lib/firefox/firefox, and click OK. That little window will close and another will pop-up asking for the key. Just hit the key you want to use, in this case, the Windows Menu key, and you are done.

From now on, just hitting the Windows Menu key will launch Firefox for you.

You can add as many bindings as you like to .Xmodmap, then run xmodmap .Xmodmap via the terminal to set it, but watch out for creating conflicts.

Good Luck..................

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0597s ][ Queries: 11 (0.0130s) ][ GZIP on ]