NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: That DEL key thing...



On Sat, 8 Mar 2025, Van Ly wrote:

RVP writes:

Is the kbd-type correct? What does `setxkbmap -query` print?

 $ setxkbmap -query
   rules:      base
   model:      pc105
   layout:     us
   options:    ctrl:swapcaps

I don't know how to find the kbd-type.  The ThinkPad interoperates with
the external Apple USB narrow body keyboard.


Been away from home for the past few months, so all NetBSD experiments are
in a VM, and that's no good for this sort of stuff...anyway:

xkeyboard-config(7) has the list of things you can pass to setxkbmap(1). There
are a few apple* and mac* (and an applepro, too, which isn't documented) Models
you could try to see if xev(1) then recognizes the eject key. Be careful with
this: have an ssh session handy to put back the orig. keymap (xmodmap -pke).

If the keys do show up in xev, but, just haven't been assigned to any X keysym,
like on my current work laptop, then you can just assign them after correlating
the keycodes from xev and the keysyms from `/usr/X11R7/lib/X11/XKeysymDB'

$ cat ~/.Xmodmap
!
! Swap Escape and Grave/AsciiTilde
!
keycode 9 = grave asciitilde
keycode 49 = Escape

keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
$

Those're mine, you would need to assign `BackSpace' (or Delete) to the keycode
produced by the Eject-key.

If no keycodes are produced at all, then it's what kre@ said, and you'll have
to read through usbhidctl(1) and usbhidaction(1) and run something like
`xdotool' from pkgsrc to inject a backspace like this:

```
#!/bin/sh

sleep .1	# XXX: need a little delay for this work.
xdotool key BackSpace
```

HTH,

-RVP


Home | Main Index | Thread Index | Old Index