You are not logged in.

#1 2024-04-04 20:04:31

lilikoi
Member
Registered: 2022-02-01
Posts: 23

[solved] Keyboard Input Issue: No Delay Between Accent and Letter

I recently performed a system update on my Arch Linux, and now I'm experiencing an issue with keyboard input when using Firefox, and other programmes too, such as web browsers, MousePad and other X programmes, but _not_ in the terminal XTerm nor in Vim.

To correctly input accentuated letters, I have to press the accent mark and the letter almost simultaneously. If there is a slight delay between the two key presses, the accent mark and the letter are entered separately instead of being combined into a single accentuated character.

Such as, if I type "`" and "e", it prints "´e", unless I press these almost simultaneously, which gives "é". When I press the accent mark, there is an underline which stays there for only some milliseconds.

This started happened since the update before the last I did, which was on the 1st March 2024.

Mind that my language setup is English for the wide system, but I type both in English and Portuguese-BR. My X interface (XFCE4) should also be in English.

Below is the dump of some commands that may help to debug it.

setxkbmap -print -query                   
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+br+inet(evdev)"     };
        xkb_geometry  { include "pc(pc104)"     };
};
rules:      evdev
model:      inspiron
layout:     br
 localectl                 
System Locale: LANG=en_US.UTF-8
    VC Keymap: br-abnt2
   X11 Layout: br
    X11 Model: abnt2
locale 
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME=pt_BR.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=pt_BR.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS=pt_BR.UTF-8
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT=pt_BR.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
 locale -a          
C
C.utf8
en_GB.utf8
en_US.utf8
POSIX
pt_BR.utf8

On XFCE4 System Settings > Keyboard > Layout, there is set:

Keyboard Model: Dell Inspiron 6000/8000 laptop

Keyboard layout: Layout: Portuguese (Brazil), variant is unset.



Could someone please help me troubleshoot and fix this problem? I would greatly appreciate any suggestions and assistance.


PS: it may also be related that (I just noticed it), the numerical keyboard is acting strangely *sometimes*, even with NumLock on, when some numbers or signs, such asterix are pressed, I need to type the same number twice to print it. Only in XTerm and Vim, no problem of such a type in X programmes...

Last edited by lilikoi (2024-04-05 00:52:09)

Offline

#2 2024-04-04 20:42:38

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [solved] Keyboard Input Issue: No Delay Between Accent and Letter

Brazilian seems to default to abnt2 which has

key <AD11> { [   dead_acute,     dead_grave,         acute,           grave ] };

So the dead keys (that requrie a second key to do something) are on the first two layers and the plain ones (that hit immediately) require you to press AltGr

You could try "setxkbmap -variant abnt2" but because it's the default I don't assume this is gonna do much.

xev -event keyboard

will tell you what symbols are produced when you press the key (grave or dead_grave)

The most relevant bit is probably

keyboard input when using Firefox, and other programmes too, such as web browsers, MousePad and other X programmes, but _not_ in the terminal XTerm nor in Vim

what hints at an https://wiki.archlinux.org/title/Input_ … figuration being the cause.

Your locale (language) settings aren't relevant to this.

Offline

#3 2024-04-04 21:18:52

lilikoi
Member
Registered: 2022-02-01
Posts: 23

Re: [solved] Keyboard Input Issue: No Delay Between Accent and Letter

seth wrote:

You could try "setxkbmap -variant abnt2" but because it's the default I don't assume this is gonna do much.

Did not do anything, as expected.


xev -event keyboard

will tell you what symbols are produced when you press the key (grave or dead_grave)

This is surprising. From the moment I run Xev, and also after typing any accent mark or letter, there are lots of keycode 77 being recorded spuriously.

Sometimes, the Num_Lock event stops being recorded, that is probably when typing an accentuated letter works and this seems to be stochastic.


KeyRelease event, serial 28, synthetic NO, window 0x5a00001,
    root 0x5f2, subw 0x0, time 625183, (117,262), root:(975,403),
    state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Has my laptop keyboard gone bad, or at least the Num_Lock button key gone bad? Can I disable/block/blacklist this button key from software? What can I further do?

The most relevant bit is probably

keyboard input when using Firefox, and other programmes too, such as web browsers, MousePad and other X programmes, but _not_ in the terminal XTerm nor in Vim

what hints at an https://wiki.archlinux.org/title/Input_ … figuration being the cause.

Did not explore this link very much, but just for the sake of it, I added the following to my ~/.profile (which is sourced by my shells), logged out and in again, to no avail:

export GTK_IM_MODULE=gtk-im-context-simple
export QT_IM_MODULE=simple

Last edited by lilikoi (2024-04-04 21:26:39)

Offline

#4 2024-04-04 21:28:47

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [solved] Keyboard Input Issue: No Delay Between Accent and Letter

So the xterm/FF separation isn't correct, but was just random luck?

Has my laptop keyboard gone bad

sudo evtest

If the spurious input shows up there, it's most likely the HW. You could try the LTS kernel to rule out a freak kernel bug.

Can I disable this button from software? What can I further do?

You could xmodmap the key away, eg. to XK_VoidSymbol and, if you want, turn the caps lock into the numlock

setxkbmap -o caps:numlock

Offline

#5 2024-04-05 00:48:10

lilikoi
Member
Registered: 2022-02-01
Posts: 23

Re: [solved] Keyboard Input Issue: No Delay Between Accent and Letter

OK, so the Num_Lock event does appear in "evtest".

I tried changing Num_Lock to VoidSymbol in my ~/.xmodmap, but even though VoidSymbol appears in "xev" for the event 77 after the ~/.xmodmap configuration, the accentuation problem still persisted.

I disconnected the laptop keyboard cables and connected a USB keyboard, and by the short test I did, "xev" did not record any Num_Lock event anymore.

After reconnecting the laptop keyboard cables, the problem appears to have ended... However, I did see a couple spurious Num_Lock events just after I launched the display manager, but then it appears to have subsided...

I reckon its is a HW problem, not sure yet if I can completely solve it by cleaning & reconnecting the keyboard cables... There are two cables, one is for the keyboard backlight, and I don't know if that interferes with the accentuation problem or not..

This is not the original keyboard, and it is low quality, and getting old..

I will leave it as is for now because I can type in Portuguese already, and will try cleaning the cables and connections & pin point the problem with more free time during the weekend!

Thanks, already! This will be marked as solved.


Update: HW was bad. A replacement laptop keyboard is now working and no more strange problems appeared.

Last edited by lilikoi (2024-04-26 23:00:39)

Offline

#6 2024-04-05 07:19:02

seth
Member
Registered: 2012-09-03
Posts: 51,731

Re: [solved] Keyboard Input Issue: No Delay Between Accent and Letter

If the VoidSymbol still interrupts the dead key behavior and you cannot fix this in hardware (obviously the preferred solution) you'll have to disable it in evdev, https://wiki.archlinux.org/title/Map_sc … isable_key

Offline

Board footer

Powered by FluxBB