Page 1 of 1

Detect Keyboard

Posted: Sun Jul 21, 2024 11:26 am
by Collier
Is there a way in which my PC can detect the physical keyboard I am using - current config is not working too well

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 11:45 am
by j2mcgreg
You need to post the output from the QSI utility. The Quick System Info (QSI) utility is located in MX Tools and its output is automatically formatted for use here in the forum. Run the QSI utility, click “Copy for Forum” at the bottom and then just paste it here in your thread.
Forum Rules

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 12:00 pm
by Collier
Thank you
I am not sure how this will help detect the keyboard but here it is

Code: Select all

System:
  Kernel: 6.1.0-23-amd64 [6.1.99-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-23-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.3_x64 Libretto May 19  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: Dell product: OptiPlex 780 v: N/A serial: <superuser required> Chassis:
    type: 3 serial: <superuser required>
  Mobo: Dell model: 0200DY v: A01 serial: <superuser required> BIOS: Dell v: A14 date: 08/21/2012
CPU:
  Info: model: Intel Core2 Quad Q6600 bits: 64 type: MCP arch: Core2 Merom level: v1 built: 2006-09
    process: Intel 65nm family: 6 model-id: 0xF (15) stepping: 0xB (11) microcode: 0xBA
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 8 MiB desc: 2x4 MiB
  Speed (MHz): avg: 2110 high: 2394 min/max: N/A cores: 1: 1596 2: 2394 3: 2115 4: 2338
    bogomips: 19150
  Flags: ht lm nx pae sse sse2 sse3 ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; STIBP: disabled; RSB filling; PBRSB-eIBRS: Not
    affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 4 Series Integrated Graphics vendor: Dell 4 driver: i915 v: kernel arch: Gen-5
    process: Intel 45nm built: 2008 ports: active: VGA-1 empty: none bus-ID: 00:02.0
    chip-ID: 8086:2e12 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: intel
    dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1280x1024 s-dpi: 96 s-size: 338x270mm (13.31x10.63") s-diag: 433mm (17.03")
  Monitor-1: VGA-1 mapped: VGA1 model: EIZO NANAO S1921 serial: <filter> built: 2009
    res: 1280x1024 hz: 60 dpi: 86 gamma: 1.2 size: 376x301mm (14.8x11.85") diag: 482mm (19")
    ratio: 5:4 modes: max: 1280x1024 min: 720x400
  API: OpenGL v: 2.1 Mesa 22.3.6 renderer: Mesa Intel Q45/Q43 (ELK) direct-render: Yes
Audio:
  Device-1: Intel 82801JD/DO HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:3a6e class-ID: 0403
  API: ALSA v: k6.1.0-23-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 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: Intel 82567LM-3 Gigabit Network vendor: Dell driver: e1000e v: kernel port: ece0
    bus-ID: 00:19.0 chip-ID: 8086:10de class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter type: USB driver: r8188eu
    bus-ID: 4-6:2 chip-ID: 0bda:8179 class-ID: 0000 serial: <filter>
  IF: wlan0 state: down mac: <filter>
RAID:
  Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 port: fec0 bus-ID: 00:1f.2
    chip-ID: 8086:2822 rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 465.76 GiB used: 31.36 GiB (6.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB
    block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: KC47 scheme: MBR
Partition:
  ID-1: / raw-size: 465.76 GiB size: 457.38 GiB (98.20%) used: 31.36 GiB (6.9%) fs: ext4
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 3 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 52.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2326 libs: 1227 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mxlinux.mirrors.uk2.net/packages/mx/repo/ bookworm main non-free
Info:
  Processes: 225 Uptime: 1h 44m wakeups: 1 Memory: 7.6 GiB used: 2.62 GiB (34.5%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 12:26 pm
by j2mcgreg
The first thing you have to do is try another keyboard. Either the problem will persist or it won't. If it does persist, then we will have to dig deeper. If it doesn't persist, then the original is the problem and it probably should be replaced.

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 12:55 pm
by Collier
So in answer to my question 'Is there a way in which my PC can detect the physical keyboard I am using' I presume the answer is no? ie the actual type layout of keyboard

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:10 pm
by siamhie
What does lsusb (or inxi -J) report in a terminal?

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:19 pm
by asinoro
Check if it is detected and configure it accordingly:

Code: Select all

sudo dpkg-reconfigure keyboard-configuration

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:22 pm
by Eadwine Rose
Not the question. User wants to see if the keyboard can be identified in MX, I wager something like setxkbmap? Mine gives the following on this line. Is that kind of what you mean with your question?

Code: Select all

 $ setxkbmap -query | grep layout
layout:     us

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:22 pm
by j2mcgreg
Collier wrote: Sun Jul 21, 2024 12:55 pm So in answer to my question 'Is there a way in which my PC can detect the physical keyboard I am using' I presume the answer is no? ie the actual type layout of keyboard
No, it's that a malfunctioning keyboard can be improperly detected. You are assuming that MX is the source of the problem, and while that is a real possibility, let's be sure and try to isolate the problem first.

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:30 pm
by rokytnji.1
Got xev installed?

Code: Select all

xev

Code: Select all

$  ls -l /dev/input/by-path/*-kbd
lrwxrwxrwx 1 root root 9 Jul 21 12:03 /dev/input/by-path/platform-i8042-serio-0-event-kbd -> ../event0

Code: Select all

$ sudo dmesg | grep keyboard
[sudo] password for harry: 
[    1.637899] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:35 pm
by fehlix
Collier wrote: Sun Jul 21, 2024 12:55 pm So in answer to my question 'Is there a way in which my PC can detect the physical keyboard I am using' I presume the answer is no? ie the actual type layout of keyboard
So it is about the Keyboard layout, not about detecting a connected keyboard, right?
The layout needs to be chosen by the user, b/c the physical
keyboard does not report how the keys are labeled, or have been re-labeled.

In MX Linux are 4 levels to choose a keyboard layout,
in case the default English US keyboard layout is not desired:

1) At LiveBoot menu, when going to install the system,
one can select the keyboard layout, together with language and timezone
which would be available for the Live-session.

2) When running the installer to install the system,
the first window offers keyboard-selection, in case the selection at LiveBoot menu was missed.

3) and even if this was not chosen,
one can run the system-keyboard selection tool to be fount within MX tools

4) And further, one can select instead of the system-keyboard layout another layout for
the user session, using the keyboard layout tool in Xfce settings.

Now tell us what is not working for you and why not?

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:37 pm
by rokytnji.1
Mlocate works pretty well also

Code: Select all

harry@antiX:~
$ locate keyboard
/boot/grub/i386-pc/at_keyboard.mod
/boot/grub/i386-pc/usb_keyboard.mod
/etc/acpi/asus-keyboard-backlight.sh
/etc/acpi/events/asus-keyboard-backlight-down
/etc/acpi/events/asus-keyboard-backlight-up
/etc/console-setup/cached_setup_keyboard.sh
/etc/default/keyboard
/etc/init.d/keyboard-setup.sh
/etc/rcS.d/S04keyboard-setup.sh
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/home/harry/.cache/jgmenu/icons/system-keyboard-qt
/usr/bin/system-keyboard-qt
/usr/include/X11/bitmaps/keyboard16
/usr/include/linux/keyboard.h
/usr/lib/calibre/calibre/gui2/keyboard.py
/usr/lib/calibre/calibre/gui2/__pycache__/keyboard.cpython-311.pyc
/usr/lib/calibre/calibre/gui2/preferences/keyboard.py
/usr/lib/calibre/calibre/gui2/preferences/__pycache__/keyboard.cpython-311.pyc
/usr/lib/console-setup/keyboard-setup.sh
/usr/lib/grub/i386-efi/at_keyboard.mod
/usr/lib/grub/i386-efi/usb_keyboard.mod
/usr/lib/grub/i386-pc/at_keyboard.mod
/usr/lib/grub/i386-pc/usb_keyboard.mod
/usr/lib/grub/x86_64-efi/at_keyboard.mod
/usr/lib/grub/x86_64-efi/usb_keyboard.mod
/usr/lib/modules/5.10.188-antix.1-amd64-smp/kernel/drivers/input/keyboard
/usr/lib/modules/5.10.188-antix.1-amd64-smp/kernel/drivers/input/keyboard/adc-keys.ko
<snip>

Re: Detect Keyboard

Posted: Sun Jul 21, 2024 1:41 pm
by fehlix
rokytnji.1 wrote: Sun Jul 21, 2024 1:37 pm Mlocate works pretty well also
To answer what question?
Collier wrote: ↑Sun Jul 21, 2024 11:55 am
So in answer to my question 'Is there a way in which my PC can detect the physical keyboard I am using' I presume the answer is no? ie the actual type layout of keyboard

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 7:24 am
by Collier
Eadwine Rose wrote: Sun Jul 21, 2024 1:22 pm Not the question. User wants to see if the keyboard can be identified in MX, I wager something like setxkbmap? Mine gives the following on this line. Is that kind of what you mean with your question?

Code: Select all

 $ setxkbmap -query | grep layout
layout:     us
Thank you that is exactly what I meant I need to know what the keyboard is so i can set MX to the correct layout - it is an older keyboard & Generic 105 etc do not work

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 9:22 am
by Eadwine Rose
Great! Did you manage to get it to work now? If so, please click the checkmark in the top right of the post (to the left of the user name/image) that holds the solution to mark the topic solved, thanks :)

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 10:13 am
by Collier
No sorry
Keyboard worked ok with MX19
I do not know what layout the keyboard is nor can I asceratin just by looking at it
I know what I have set the MX linux system to [UK 105 keys] but it does not work
Muy question is - is iit possible for the PC to see what type of keyboard I am using so I can then set MX to the correct settings for this keyboard
thanks

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 10:18 am
by j2mcgreg
Is there any branding on the keyboard that we could use to identify it?

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 10:51 am
by siamhie
Collier wrote: Mon Jul 22, 2024 10:13 am No sorry
Keyboard worked ok with MX19
I do not know what layout the keyboard is nor can I asceratin just by looking at it

Sometimes lsusb can tell you the brand but there maybe times it can't.

In my case it's reported as an Apple aluminum keyboard.
Image


but if I open Quick System Info, select the kern.log and search for " input: " it will show me the brand name.
Image

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 11:27 am
by Collier
Thank you Really helpful!!!!!!
I got Hewlett-Packard Company HP USB Smart Card Keyboard
but I can't see that as an option in set keyboard
Anyone know which option I could take [or if there isn't one]

Re: Detect Keyboard  [Solved]

Posted: Mon Jul 22, 2024 11:56 am
by siamhie
Collier wrote: Mon Jul 22, 2024 11:27 am Thank you Really helpful!!!!!!
I got Hewlett-Packard Company HP USB Smart Card Keyboard
but I can't see that as an option in set keyboard
Anyone know which option I could take [or if there isn't one]

This Amazon listing shows that it is a 104 key keyboard.

HP USB Business Slim Smartcard Keyboard
https://www.amazon.com/USB-Slim-Ccid-Sm ... roduct_top


You could open System Keyboard and try Generic 104-key PC
Image

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 12:14 pm
by Collier
Briliiant thank you!!!!! :number1:
That's sorted it!!

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 1:32 pm
by Charlie Brown
When I changed to this laptop I noticed that the right Ctrl key was not working. Keyboard was automatically set to Generic-105 key (as on the other laptop).

Then I decided to count all the keys one by one ( :biggrin: ) beginning from Esc on top-left , and it was actually 102. Changed the setting to Generic-102 and voila :)

If the thread was not solved I was going to suggest this :biggrin:

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 5:45 pm
by Eadwine Rose
I am now going to count my keys... 101.

Thing is from the era when WinXP was the latest greatest. :laugh:

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 6:14 pm
by siamhie
My keyboard is an 84 key Keychron K3 v2 TKL keyboard but the Generic 105 setting works.
With Linux you change it from a Windows keyboard to Mac keyboard using a switch on the backside so that the function keys work properly.

I then test it to make sure all the keys work as expected. https://en.key-test.ru/

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 6:15 pm
by Eadwine Rose
I was looking for something like that, thanks!

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 6:32 pm
by MXRobo
A very similar one, posted by someone recenty: https://shawon9324.github.io/apps/keytester/

Re: Detect Keyboard

Posted: Mon Jul 22, 2024 7:05 pm
by fehlix
To view and test your current keyboard layout, if you only have one layout:
Run this to show and test the keyboard layout

Code: Select all

gkbd-keyboard-display -g 1
In case you have more then one layouts enable, which can be done with up to max 4 layouts:
you can see the other layouts with changing number

Code: Select all

gkbd-keyboard-display -g 2
If you want to show a layout, which is not enabled but can be viewed with
e.g like this in German layout:

Code: Select all

gkbd-keyboard-display -l de
The tool gkbd-keyboard-display comes with the package gkbd-capplet.
To install run

Code: Select all

sudo apt install gkbd-capplet
HTH