Jump to content

xmodkeys


anand
 Share

Recommended Posts

I used the guide at http://mandrakeuser.org/docs/xwin/print/keys.html to configure the extra keys on my laptop keyboard which are basically for the Browser Back and Front keys. However no matter what i do it doesn't work.

 

I assigned letter "e" to test it, and it worked, however i tried to assign "Left" or "Right" which are keys for browser left and right, they don't work. I tried to assign "Caps_Lock" ( got furious of it not working so tried other keys as well) and it didn't work.

 

Can someone please tell me what i am doing wrong and how to go about his ?

Link to comment
Share on other sites

Don't you get a response when you press the key? Do you use KDE? Look in the KDE control center, region and accesibility, keyboardconfiguration.

 

There are many keyboard models mentioned there. Try some of the more likely.

 

Do you get a response? Go to the kde control center, region and accesibility, khotkeys and bind the keys to the action you want to perform.

 

Things have changed in 2 years :)

Link to comment
Share on other sites

Don't you get a response when you press the key? Do you use KDE? Look in the KDE control center, region and accesibility, keyboardconfiguration.

 

There are many keyboard models mentioned there. Try some of the more likely.

 

Do you get a response? Go to the kde control center, region and accesibility, khotkeys and bind the keys to the action you want to perform.

 

I went to KDE control center -> Keyboard Shortcuts, i see the keyboard combinations there, however i can't seem to find a way to define my own methods. Sorry if i sound stupid but been banging my head on this for some time now without any success.

 

Btw i am using 10.1 Community.

Link to comment
Share on other sites

There are many different keyboard models (some have more buttons, different buttons etc ect), however most are mentioned in KDE (look under keyboardconfiguration, not under khotkeys). You need to select the one you have. Than khotkeys can bind an action to that key.

 

If you had tried that an it didn't work, you have to edit some files. Be carefull with this.

 

1: run xmodmap and find the keycodes for the keys you want to use

2: go to /etc/X11/xkb/keycodes/xorg to look what alias is assocciated with the keycode

3 go to /etc/x11/xkb/symbols/inet, to the keyboard model you're using and change the value found in that file with the value looked up. If the values are not listed, add them yourself.

4: restartx

 

Good luck

Link to comment
Share on other sites

sorry couldn't reply sooner since i was out of town.

 

Now i tried to change the keyboard layout from KDE Control Center -> Accessibility -> Keyboard Layout. Even after i choose a different layout, where do i define the keycodes in X ?

 

Sorry if i sound too stupid on this, but i am certainly not able to find my way on this one. All i want is to enable the 2 extra keys i have on my R50 Thinkpad to emulate Alt+Left Arrow and Alt+Right Arrow while using firefox.

 

I choose to try the second method, running Xmodmap i get the following:

 

xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

 

shift Shift_L (0x32), Shift_R (0x3e)

lock Caps_Lock (0x42)

control Control_L (0x25), Control_R (0x6d)

mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)

mod2 Num_Lock (0x4d)

mod3

mod4 Super_L (0x7f), Hyper_L (0x80)

mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)

 

What to do now ?

 

Btw i don't have /etc/X11/xkb/keycodes/xorg.

Link to comment
Share on other sites

The command is xmodmap -pk. (xmodmap --help)

 

With the keyboard layout you tell X what buttons are available. To test if the keys are there do cat /dev/input/event0/1/2/3 and press the keys. If you see a result it works.

 

With khotkeys you bind the keys to actions.

 

If you use Mandrake10 (xorg came with mandrake 10.1) it's /etc/X11/xkb/keycodes/xfree86

Link to comment
Share on other sites

I checked the keycodes by running xev for the 2 extra keys, its 233 and 234.

 

Now i edited /etc/X11/xkb/symbols/inet, the microsoft keyboard section (yes i changed the keyboard to ms keyboard thinking it will help), defined a newline with reference to the same code in the /etc/X11/xkb/keycodes/xfree86, restarted X, still nothing :(

 

If i run khotkeys nothing comes up.

 

I know i am doing something stupid, but what is it ? And can u please take me step by step on this ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...