You are not logged in.

#1 2014-02-12 16:04:05

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Bad scancode for one key

Hello,

The key between the keys [esc] and [tab] (view picture bellow) is recognized as a key tab.
1392213983.jpg

Before, I used an AZERTY layout, and on AZERTY this key is pretty useless (square exponent).
But I have switched to a BÉPO layout (french ergonomic layout, like dvorak) and I need this key (it's now dollar and sharp symbols).

After some tests, it's appear than this key and the tab key have the same scancode:

[killruana@fanstasmic ~]$ sudo showkey --scancodes
[sudo] password for killruana:
kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
    0x0f 0x8f
    0x0f 0x8f

the first "0x8f 0x0f" is pressing the Tab key, the second is pressing the dollar key.


And obviously, the two keys have the same keycode:

[killruana@fanstasmic ~]$ sudo showkey
kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
    keycode  15 press
keycode  15 release
    keycode  15 press
keycode  15 release

Again, first is the tab key and second is the dollar key.


The keyboard is the keyboard of my laptop (HP Pavilion DV6).

How I can fix it?

Last edited by killruana (2014-02-20 08:37:49)

Offline

#2 2014-02-12 16:08:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,802

Re: Bad scancode for one key

You did not mention it; have you seen this wiki article?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-02-12 16:18:08

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Re: Bad scancode for one key

I have seen it, and I don't found useful informations for my problem.

Offline

#4 2014-02-12 16:23:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,802

Re: Bad scancode for one key

I re-read your post more carefully.  You are right.  Sorry about that.  Take a look at the output of lsmod.  Do you have the following modules:

hp_wmi                  7595  0 
sparse_keymap           3146  1 hp_wmi

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2014-02-12 16:29:00

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Re: Bad scancode for one key

Yes, I have.

[killruana@fanstasmic ~]$ lsmod | grep hp_wmi
hp_wmi                  7595  0 
sparse_keymap           3154  1 hp_wmi
rfkill                 15651  4 cfg80211,hp_wmi,bluetooth
wmi                     8419  3 hp_wmi,mxm_wmi,nouveau

Offline

#6 2014-02-12 16:49:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,802

Re: Bad scancode for one key

I think you are missing a kernel module having to do with WMI, but I have to step away to a meeting that will take several hours.  I'll get back to you later..... sad


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2014-02-12 17:04:04

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Re: Bad scancode for one key

For information, other keys (including multimedia keys) are working properly.

Unfiltered lsmod:

[killruana@fanstasmic ~]$ lsmod 
Module                  Size  Used by
fuse                   74640  5 
uvcvideo               72836  0 
videobuf2_vmalloc       3280  1 uvcvideo
videobuf2_memops        2343  1 videobuf2_vmalloc
videobuf2_core         27963  1 uvcvideo
videodev              111332  2 uvcvideo,videobuf2_core
arc4                    2008  2 
media                  11751  2 uvcvideo,videodev
b43                   364837  0 
bcma                   36200  1 b43
intel_powerclamp        8642  0 
coretemp                6334  0 
kvm_intel             131095  0 
mac80211              468058  1 b43
btusb                  18632  0 
bluetooth             308988  2 btusb
kvm                   388517  1 kvm_intel
crc32c_intel           14257  0 
psmouse                85460  0 
serio_raw               5049  0 
cfg80211              412662  2 b43,mac80211
snd_hda_codec_hdmi     30162  4 
iTCO_wdt                5407  0 
iTCO_vendor_support     1937  1 iTCO_wdt
hp_wmi                  7595  0 
sparse_keymap           3154  1 hp_wmi
rfkill                 15651  4 cfg80211,hp_wmi,bluetooth
ir_mce_kbd_decoder      4830  0 
ir_lirc_codec           4803  0 
lirc_dev               11391  1 ir_lirc_codec
ir_sanyo_decoder        2869  0 
ir_sony_decoder         2387  0 
ir_jvc_decoder          2609  0 
ir_rc6_decoder          3569  0 
ir_rc5_decoder          2481  0 
ir_nec_decoder          3121  0 
rc_rc6_mce              1388  0 
ssb                    55507  1 b43
pcmcia                 45396  2 b43,ssb
pcmcia_core            14264  1 pcmcia
ac                      3332  0 
hp_accel               16528  0 
lis3lv02d              11291  1 hp_accel
input_polldev           2826  1 lis3lv02d
ene_ir                 14150  0 
rc_core                16611  12 lirc_dev,ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,ene_ir,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder,rc_rc6_mce
jmb38x_ms              11248  0 
memstick                7472  1 jmb38x_ms
pcspkr                  2035  0 
microcode              15216  0 
thermal                 8532  0 
battery                 7573  0 
lpc_ich                13376  0 
intel_agp              10880  0 
intel_gtt              12664  1 intel_agp
r8169                  58399  0 
mii                     4035  1 r8169
evdev                  11085  27 
snd_hda_codec_idt      37820  1 
i2c_i801               11277  0 
snd_hda_intel          37000  2 
snd_hda_codec         150305  3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
snd_hwdep               6340  1 snd_hda_codec
snd_pcm                77645  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7210  2 snd_pcm,snd_hda_intel
snd_timer              18726  1 snd_pcm
snd                    59109  11 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_idt,snd_pcm,snd_hda_codec,snd_hda_intel
soundcore               5450  1 snd
intel_ips              12500  0 
shpchp                 25465  0 
acpi_cpufreq           10779  1 
processor              24903  1 acpi_cpufreq
vboxdrv               264794  0 
uinput                  8316  0 
nfs                   192981  0 
lockd                  76910  1 nfs
sunrpc                233456  2 nfs,lockd
fscache                47028  1 nfs
loop                   18479  0 
ext4                  474699  3 
crc16                   1367  2 ext4,bluetooth
mbcache                 6082  1 ext4
jbd2                   83440  1 ext4
hid_generic             1161  0 
usbhid                 40577  0 
hid                    90742  2 hid_generic,usbhid
dm_mod                 82501  10 
sd_mod                 30821  3 
sr_mod                 14898  0 
cdrom                  34848  1 sr_mod
mmc_block              26409  0 
ahci                   23088  2 
libahci                21642  1 ahci
firewire_ohci          31813  0 
libata                171112  2 ahci,libahci
ehci_pci                4000  0 
ehci_hcd               59188  1 ehci_pci
firewire_core          52259  1 firewire_ohci
sdhci_pci              12146  0 
sdhci                  29084  1 sdhci_pci
mmc_core               95691  5 b43,ssb,mmc_block,sdhci,sdhci_pci
scsi_mod              130669  3 libata,sd_mod,sr_mod
crc_itu_t               1371  1 firewire_core
usbcore               180072  6 btusb,uvcvideo,ehci_hcd,ehci_pci,usbhid
usb_common              1656  1 usbcore
nouveau               904670  2 
button                  4677  1 nouveau
video                  11196  1 nouveau
mxm_wmi                 1475  1 nouveau
wmi                     8419  3 hp_wmi,mxm_wmi,nouveau
i2c_algo_bit            5399  1 nouveau
drm_kms_helper         36254  1 nouveau
ttm                    63475  1 nouveau
drm                   238206  4 ttm,drm_kms_helper,nouveau
i2c_core               24632  6 drm,i2c_i801,drm_kms_helper,i2c_algo_bit,nouveau,videodev

Offline

#8 2014-02-16 13:53:52

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Re: Bad scancode for one key

ewaller wrote:

I think you are missing a kernel module having to do with WMI, but I have to step away to a meeting that will take several hours.  I'll get back to you later..... sad

Still in meeting?

Offline

#9 2014-02-16 16:24:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,802

Re: Bad scancode for one key

Nope, and I have not forgotten about you either.  I have not come up with anything useful as yet sad


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2014-05-29 12:20:13

killruana
Member
From: France
Registered: 2014-02-12
Posts: 8

Re: Bad scancode for one key

I have found a hack: I have remapped my dollar key to the useless menu key.


/etc/systemd/system/keyboardfix.service

[Unit]
Description=Fix my stupid keyboard

[Service]
ExecStart=/usr/lib/systemd/scripts/keyboardfix
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

/usr/lib/systemd/scripts/keyboardfix

#!/bin/sh

# Map dollar key to menu key
setkeycodes e05d 41

Offline

Board footer

Powered by FluxBB