Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xmodmap trouble! Two keys report the same keycode!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Thu Dec 26, 2013 1:47 am    Post subject: xmodmap trouble! Two keys report the same keycode! Reply with quote

So, after configuring my keyboard (a laptop keyboard, a Lenovo IdeaPad Z370 keyboard, I bought on ebay to change its layout from br-abnt2 to us_intl) I found out that my right control key is not working correctly.
I've used xev to get the keycode generated and map it to the Control_R keysym. I followed this answer on Ask Ubuntu: http://askubuntu.com/questions/93950/cant-remap-ctrl-key-with-xmodmap

So now, I have this ~/.Xmodmap file:

Code:
~ $ cat .Xmodmap
keycode 97 = Control_R
clear control
add control = Control_L Control_R


The "problem" is that when I run xmodmap, it tells me that I have two Control_R keys.

Code:
~ $ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x61),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3     
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)


Now, while I was typing this forum post I realised that my End | Break key (Break activate by comboing the Fn key) reports keycode = 37 just like my left control key, but only when I try hitting Break (Fn + End). Without fn, the keycode is 115 and it's correctly mapped to End, but with Fn, instead of getting Break, I get keycode = 37 mapped to Control_L.

Is there anyway to separate the keycodes? Does the problem happen because this is a laptop keyboard with non-standard key layout and mapping?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Dec 26, 2013 1:01 pm    Post subject: Reply with quote

Just my opinion.

Keyboards have hard wired up keys. Means not every key will be independently configureable in software.
As you already tried xev, you have bad luck in this regard. Only desctop gamer keyboards have all keys independent and software configureable in Windoze ofc, which you can ofc than use in linux too, as it writes a rom in the keyboard. notebook keyboards are usually hard wired.

There may be a slight chance that you will get it working in software but the chances are very small for it.

Another way is to exchange your keyboard if you dislike your layout.

E.g. for my old 4 years ASUS g70sg notebook, there are several keyboard layouts available. Different languages and different enter key configurations which are slight different. Exchanging a keyboard is one of the easier tasks dealing with notebooks.

There could be a hardware issue with your keyboard too. OR you just use the wrong keyboard layout.
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Thu Dec 26, 2013 1:57 pm    Post subject: Reply with quote

I do think I'm using the wrong layout. But I don't know which one to use. I'm currently on "us acentos" (basically us dead keys).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
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