Mechanical keyboard spams keys instead of holding

Hello, I got a cheap mechanical USB keyboard for my laptop, but I have some issues where holding down any key doesn’t acknowledge it as a “long press” but instead keeps pressing / spamming the same key

For example, using the arrow keys to move in any game makes the character movement jerky instead of the normal walk you’d expect.

Laptop’s internal keyboard doesn’t have this problem, and changing the Delay and Rate settings only affect the Laptop’s internal keyboard and not the USB one ( activating Slow Keys or Bounce Keys on Settings > Accessibility > Keyboard Filters does affect the USB keyboard but doesn’t fix the problem )

> inxi --full --admin --filter --width

System:
  Kernel: 6.3.5-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.3-x86_64
    root=UUID=c3b6eb7e-c8fc-4def-870c-11c57c023d2c rw quiet
    resume=UUID=c8a5270a-f9d1-4482-90ed-fef5bf02b181
  Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Portable System: Dell product: Inspiron N5050 v: N/A
    serial: <superuser required> Chassis: type: 8 serial: <superuser required>
  Mobo: Dell model: 01HXXJ v: A01 serial: <superuser required> BIOS: Dell
    v: A01 date: 07/22/2011

CPU:
  Info: model: Intel Core i5-2430M bits: 64 type: MT MCP arch: Sandy Bridge
    gen: core 2 level: v2 built: 2010-12 process: Intel 32nm family: 6
    model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2073 high: 2194 min/max: 800/3000 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 2188 2: 2194 3: 1731
    4: 2182 bogomips: 19167
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
    vendor: Dell driver: i915 v: kernel arch: Gen-6 code: Sandybridge
    process: Intel 32nm built: 2011 ports: active: LVDS-1
    empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0116
    class-ID: 0300
  Device-2: Realtek Integrated Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 2-1.5:4 chip-ID: 0bda:58c0
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: intel dri: i965 gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: LVDS-1 mapped: LVDS1 model: Seiko Epson 0x5441 built: 2010
    res: 1366x768 hz: 60 dpi: 102 gamma: 1.2 size: 340x190mm (13.39x7.48")
    diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
  API: OpenGL v: 3.3 Mesa 23.0.4 renderer: Mesa Intel HD Graphics 3000 (SNB
    GT2) direct-render: Yes
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: Dell 6 driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1c20 class-ID: 0403
  API: ALSA v: k6.3.5-2-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000
    bus-ID: 05:00.0 chip-ID: 10ec:8136 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  Device-2: Broadcom BCM4313 802.11bgn Wireless Network Adapter vendor: Dell
    driver: wl v: kernel modules: bcma pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 09:00.0 chip-ID: 14e4:4727 class-ID: 0280
  IF: wlp9s0 state: up mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM2070 Bluetooth 2.1 + EDR driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 2-1.4:3 chip-ID: 0a5c:21bc
    class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: N/A rfk-block:
    hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 232.89 GiB used: 181 GiB (77.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: MBR
Partition:
  ID-1: / raw-size: 224.6 GiB size: 220.01 GiB (97.96%)
    used: 180.99 GiB (82.3%) fs: ext4 dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.29 GiB used: 9 MiB (0.1%) priority: -2
    dev: /dev/sda2 maj-min: 8:2
Sensors:
  System Temperatures: cpu: 67.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 3099
Info:
  Processes: 211 Uptime: 2h 8m wakeups: 3 Memory: available: 7.67 GiB
  used: 4.16 GiB (54.3%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 2016 libs: 491 tools: pamac,yay pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
  running-in: konsole inxi: 3.3.27

Hello,
Go to Settings > In put Devices > Keyboard and look for this option

image

Play around with the delays and repeat rate.
Might have to log out and back after applying the change. Being two different keyboard models might have some influence too.

Thanks for the reply, I tried both changing the delay and repeat rate to very high and very low values, it doesn’t affect the USB keyboard but does affect the internal laptop’s keyboard

Same thing after setting (and restarting the system): “When a key is held: Do nothing”, the laptop’s keyboard keys do no repeat when held down, but the USB keyboard ones keep repeating.

Here is the result of: xinput -list

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ USB usb keyboard Consumer Control         id=11   [slave  pointer  (2)]
⎜   ↳ Razer Razer Viper Mini                    id=13   [slave  pointer  (2)]
⎜   ↳ Razer Razer Viper Mini Keyboard           id=14   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=18   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ USB usb keyboard                          id=10   [slave  keyboard (3)]
    ↳ USB usb keyboard System Control           id=12   [slave  keyboard (3)]
    ↳ Razer Razer Viper Mini                    id=15   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=16   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=17   [slave  keyboard (3)]
    ↳ USB usb keyboard Consumer Control         id=19   [slave  keyboard (3)]
    ↳ Razer Razer Viper Mini Keyboard           id=20   [slave  keyboard (3)]

and here is the content of my /etc/X11/xorg.conf.d/00-keyboard.conf file:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fr"
        Option "XkbModel" "pc105"
EndSection

Fixed by buying a new AC adapter, must’ve been a grounding issue or some other electrical issue.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.