letter "x" typed automatically and how to disable hotkeys?
Jeremy C. Reed
reed at reedmedia.net
Mon Sep 29 09:49:07 PDT 2014
I don't think this is a X specific problem, but maybe someone here has
some hints.
Often when my Dell Inspiron 14z laptop tilts or if the display lid
moves, a letter "x" is typed to my terminal or window that is in focus.
I am pretty sure it is not the lid switch.
This is frustrating as I use vi and it deletes characters or attempts to
expunge emails or send email in my mail clientx (depending on mode)x.
Often when I type content I have many typos due to added "x" characters.
This happens in xterm and other X terminal emulators, pidgin, xedit,
libreoffice, and other X11 clients. But I never see the "x" in any
firefox input box or textarea box or gui input boxes. I can trigger
this anytime I want by simply moving my laptop. But it also happens
randomly without any movement.
If I press shift or have caps-lock enabled, a capital "X" is entered
instead.
For example, the following is when I run xev and move my display lid a
few times. See the KeyPress and KeyRelease events below.
Outer window is 0x2600001, inner window is 0x2600002
PropertyNotify event, serial 8, synthetic NO, window 0x2600001,
atom 0x27 (WM_NAME), time 11639332, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x2600001,
atom 0x22 (WM_COMMAND), time 11639332, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x2600001,
atom 0x28 (WM_NORMAL_HINTS), time 11639332, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x2600001,
parent 0x2600001, window 0x2600002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x2600001,
atom 0x130 (WM_PROTOCOLS), time 11639333, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600002, override NO
ConfigureNotify event, serial 20, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, (0,0), width 178, height 178,
border_width 0, above 0x1a044ae, override NO
ReparentNotify event, serial 20, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, parent 0x1005f4c,
(4,19), override NO
MapNotify event, serial 20, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, override NO
VisibilityNotify event, serial 20, synthetic NO, window 0x2600001,
state VisibilityUnobscured
Expose event, serial 20, synthetic NO, window 0x2600001,
(0,0), width 178, height 10, count 3
Expose event, serial 20, synthetic NO, window 0x2600001,
(0,10), width 10, height 58, count 2
Expose event, serial 20, synthetic NO, window 0x2600001,
(68,10), width 110, height 58, count 1
Expose event, serial 20, synthetic NO, window 0x2600001,
(0,68), width 178, height 110, count 0
PropertyNotify event, serial 20, synthetic NO, window 0x2600001,
atom 0x138 (_NET_WM_DESKTOP), time 11639339, state PropertyNewValue
PropertyNotify event, serial 20, synthetic NO, window 0x2600001,
atom 0x15d (WM_STATE), time 11639339, state PropertyNewValue
PropertyNotify event, serial 20, synthetic NO, window 0x2600001,
atom 0x13e (_NET_WM_STATE), time 11639339, state PropertyNewValue
PropertyNotify event, serial 20, synthetic NO, window 0x2600001,
atom 0x135 (_NET_FRAME_EXTENTS), time 11639339, state
PropertyNewValue
PropertyNotify event, serial 20, synthetic NO, window 0x2600001,
atom 0x1c3 (_NET_WM_ALLOWED_ACTIONS), time 11639339, state
PropertyNewValue
ConfigureNotify event, serial 20, synthetic YES, window 0x2600001,
event 0x2600001, window 0x2600001, (188,230), width 178, height 178,
border_width 0, above 0x0, override NO
FocusIn event, serial 20, synthetic NO, window 0x2600001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 20, synthetic NO, window 0x0,
keys: 4294967265 0 0 0 16 0 0 0 0 0 0 0 0 0
0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 28, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11639385, (100,-36), root:(288,194),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
XLookupString gives 1 bytes: (0d) "
"
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11641941, (100,-36), root:(288,194),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11641942, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11641943, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11641946, (100,-36), root:(288,194),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11643190, (100,-36), root:(288,194),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11643190, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11643192, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11643195, (100,-36), root:(288,194),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11644441, (100,-36), root:(288,194),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11644441, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11644443, (100,-36), root:(288,194),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0xb1, subw 0x0, time 11644446, (100,-36), root:(288,194),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
ClientMessage event, serial 31, synthetic YES, window 0x2600001,
message_type 0x130 (WM_PROTOCOLS), format 32, message 0x12e
(WM_DELETE_WINDOW)
In firefox has a different behavior. I never see the "x". With google.
I will search and browse through searches, even multiple pages of
results, and then it will jump to top of the first page of the search
and a blank space is added to the search line (google's autocompletion
input box chages due to space added. I assume this is related even
though I don't think I can trigger it and no "x" is inserted but a space
instead.
Also if I switch to a console (no X11), it does a ^[ (escape 033)
followed by "x" instead. I don't see this "escape" first.
I cannot repeat the behaviour within the BIOS settings nor at the GRUB
editor.
I was running Ubuntu Linux 11.10 when I first noticed problem months
ago. I don't know if was a hardware failure if some software upgrade
triggered it. Now it is Ubuntu 12.04.5 LTS. The kernel is Linux
3.2.0-63-generic #95-Ubuntu SMP. While I don't think it is X.org
related, I do have libxkbfile1 1:1.0.7-1ubuntu0.1 installed.
I replaced the entire keyboard and the problem persists. (For what it is
worth, this laptop has the easiest method for replacing a keyboard that
I have ever seen or done.)
Now I see: keycode 133 (keysym 0xffeb, Super_L)
that is my "Windows" key on my left keyboard below the "z" and "x" keys.
I cannot see the Windows key in my console though but I can type it
using "showkey -s" (not under X11). I pressed the "Windows" key four
times and I moved my laptop lid four times and got:
0x9c
0xe0 0x5b
0xe0 0xdb
0xe0 0x5b
0xe0 0xdb
0xe0 0x5b 0xe0 0xdb
0xe0 0x5b 0x2d 0xad 0xe0 0xdb
0xe0 0x5b 0x2d 0xad 0xe0 0xdb
x0xe0 0x5b 0x2d 0xad 0xe0 0xdb
0xe0 0x5b 0x2d 0xad 0xe0 0xdb
The "0xe0 0x5b" is the Windows key pressed and the "0xe0 0xdb" is it
released.
I don't see "0x78" which is the "x" key. So I use "showkey -s" and
press the three special Dell keys on top right of my keyboard. Maybe
they are called "hot keys".
The first button does:
0xe0 0x5b 0x2d 0xad 0xe0 0xdb
The other two buttons don't appear to do anything. The first button
is identified with a large and small gear.
Now I see this lights up when ever a "x" is typed automatically.
So it is not my "x" key but is the special Dell keys not on keyboard
(and not replaced).
The thirf key identified with a star on left bottom side of box causes
this in dmesg:
[ 1046.655303] atkbd serio0: Unknown key pressed (translated set 2, code
0x60 on isa0060/serio0).
[ 1046.655314] atkbd serio0: Use 'setkeycodes 60 <keycode>' to make it
known.
So I ran xev and pressed the first special key a few times:
KeyRelease event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1397759, (172,-9), root:(245,106),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1397762, (172,-9), root:(245,106),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1399665, (172,-9), root:(245,106),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1399666, (172,-9), root:(245,106),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1399668, (172,-9), root:(245,106),
state 0x40, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 31, synthetic NO, window 0x1600001,
root 0xb1, subw 0x0, time 1399671, (172,-9), root:(245,106),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Note that I cannot get an "x" typed by pressing the special key though.
Maybe this is broken hardware but maybe there is someway in Linux or
Xorg to workaround it.
Any ideas from the X.org perspective to disable this from happening? How
can I disable this? (I don't want to disable the "x" key by itelf nor do
I want to replace "x" by using a different key to type it.)
I tried:
reed at work1:~$ xmodmap -e "keycode 133 ="
reed at work1:~$ xxxx
(That last line is from moving my lid a few times.)
I tried using evtest with:
/dev/input/event6: Dell WMI hotkeys
but didn't see anything.
Then I used evtest with
/dev/input/event4: AT Translated Set 2 keyboard
and pressing those hot keys did nothing but when I moved my lid I saw:
Event: time 1412009012.890035, -------------- SYN_REPORT ------------
Event: time 1412009019.956729, type 4 (EV_MSC), code 4 (MSC_SCAN), value
db
Event: time 1412009019.956737, type 1 (EV_KEY), code 125 (KEY_LEFTMETA),
value 1
Event: time 1412009019.956739, -------------- SYN_REPORT ------------
Event: time 1412009019.957321, type 4 (EV_MSC), code 4 (MSC_SCAN), value
2d
Event: time 1412009019.957327, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1412009019.957329, -------------- SYN_REPORT ------------
Event: time 1412009019.959318, type 4 (EV_MSC), code 4 (MSC_SCAN),
value 2d
Event: time 1412009019.959324, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1412009019.959326, -------------- SYN_REPORT ------------
Event: time 1412009019.962381, type 4 (EV_MSC), code 4 (MSC_SCAN), value
db
Event: time 1412009019.962388, type 1 (EV_KEY), code 125 (KEY_LEFTMETA),
value 0
Event: time 1412009019.962389, -------------- SYN_REPORT ------------
I am not sure yet how to map there evtest codes to X codes.
Thanks for any hints you may offer.
More information about the xorg
mailing list