Hi there,

I'm trying to remap the Print key to be Control_R, via wsconsctl, on one of the
new fangled chicklet ThinkPad(X230) keyboards. Print is now in the spot Menu
used to be (which was nice and easy to remap with "keysym Menu = Control_R").

However, I cannot, for the life of me, work out what the keycode is for this
key, and wsconsctl doesn't seem to support showing keycodes like xev does or
showkey does on the Linux tty, although I did find this old thread:

https://marc.info/?l=openbsd-tech&m=132794198221403&w=2

which led me to believe that it once did. Was this flag(-r) removed? Or am I
just being really stupid? I tend towards the latter! If so, does anyone happen
to know what the keycode is for this pesky key? I've tried all the keycodes
that seemed likely from doing:

$ wsconsctl keyboard.map | less

but to no avail. There are a couple of keycodes with the keysym Print_Screen
which I tried remapping with both:

$ wsconsctl keyboard.map+="keycode 170 = Control_R"
$ wsconsctl keyboard.map+="keycode 183 = Control_R"

but as with all the other keys I tried, the Print key remained stubbornly
useless.

Here are the results of wsconsctl keyboard.map with my kbd of choice -
uk.metaesc, in case that might be of any use:

keyboard.map=
keycode 1 = Cmd_Debugger Escape
keycode 2 = 1 exclam plusminus exclamdown
keycode 3 = 2 quotedbl twosuperior cent
keycode 4 = 3 sterling threesuperior threesuperior
keycode 5 = 4 dollar acute currency
keycode 6 = 5 percent mu yen
keycode 7 = 6 asciicircum paragraph paragraph
keycode 8 = 7 ampersand periodcentered brokenbar
keycode 9 = 8 asterisk cedilla ordfeminine
keycode 10 = 9 parenleft onesuperior diaeresis
keycode 11 = 0 parenright masculine copyright
keycode 12 = minus underscore hyphen ssharp
keycode 13 = equal plus onehalf guillemotleft
keycode 14 = Cmd_ResetEmul Delete
keycode 15 = Tab
keycode 16 = q Q
keycode 17 = w W
keycode 18 = e E
keycode 19 = r R
keycode 20 = t T
keycode 21 = y Y
keycode 22 = u U
keycode 23 = i I
keycode 24 = o O
keycode 25 = p P
keycode 26 = bracketleft braceleft
keycode 27 = bracketright braceright
keycode 28 = Return
keycode 29 = Cmd1 Control_L
keycode 30 = a A
keycode 31 = s S
keycode 32 = d D
keycode 33 = f F
keycode 34 = g G
keycode 35 = h H
keycode 36 = j J
keycode 37 = k K
keycode 38 = l L
keycode 39 = semicolon colon
keycode 40 = apostrophe at section Agrave
keycode 41 = grave grave agrave agrave
keycode 42 = Shift_L
keycode 43 = numbersign asciitilde sterling thorn
keycode 44 = z Z
keycode 45 = x X
keycode 46 = c C
keycode 47 = v V
keycode 48 = b B
keycode 49 = n N
keycode 50 = m M
keycode 51 = comma less
keycode 52 = period greater
keycode 53 = slash question
keycode 54 = Shift_R
keycode 55 = KP_Multiply
keycode 56 = Cmd2 Alt_L
keycode 57 = space
keycode 58 = Caps_Lock
keycode 59 = Cmd_Screen0 f1 F1
keycode 60 = Cmd_Screen1 f2 F2
keycode 61 = Cmd_Screen2 f3 F3
keycode 62 = Cmd_Screen3 f4 F4
keycode 63 = Cmd_Screen4 f5 F5
keycode 64 = Cmd_Screen5 f6 F6
keycode 65 = Cmd_Screen6 f7 F7
keycode 66 = Cmd_Screen7 f8 F8
keycode 67 = Cmd_Screen8 f9 F9
keycode 68 = Cmd_Screen9 f10 F10
keycode 69 = Num_Lock
keycode 70 = Hold_Screen
keycode 71 = KP_Home KP_7
keycode 72 = KP_Up KP_8
keycode 73 = KP_Prior KP_9
keycode 74 = KP_Subtract
keycode 75 = KP_Left KP_4
keycode 76 = KP_Begin KP_5
keycode 77 = KP_Right KP_6
keycode 78 = KP_Add
keycode 79 = KP_End KP_1
keycode 80 = KP_Down KP_2
keycode 81 = KP_Next KP_3
keycode 82 = KP_Insert KP_0
keycode 83 = KP_Delete KP_Decimal
keycode 86 = backslash bar Udiaeresis Udiaeresis
keycode 87 = Cmd_Screen10 f11 F11
keycode 88 = Cmd_Screen11 f12 F12
keycode 91 = f13 F13
keycode 92 = f14 F14
keycode 93 = f15 F15
keycode 99 = f16 F16
keycode 100 = f17 F17
keycode 101 = f18 F18
keycode 102 = f19 F19
keycode 103 = f20 F20
keycode 104 = f21
keycode 105 = f22
keycode 106 = f23
keycode 107 = f24
keycode 127 = Pause
keycode 156 = KP_Enter
keycode 157 = Cmd1 Control_R
keycode 160 = AudioMute
keycode 170 = Print_Screen
keycode 174 = AudioLower
keycode 176 = AudioRaise
keycode 181 = KP_Divide
keycode 183 = Print_Screen
keycode 184 = Cmd2 Alt_R Multi_key
keycode 199 = Home
keycode 200 = Up
keycode 201 = Cmd_ScrollBack Prior
keycode 203 = Left
keycode 205 = Right
keycode 207 = End
keycode 208 = Down
keycode 209 = Cmd_ScrollFwd Next
keycode 210 = Insert
keycode 211 = Cmd_KbdReset KP_Delete
keycode 219 = Meta_L
keycode 220 = Meta_R
keycode 221 = Menu

dmesg:

OpenBSD 5.7-beta (GENERIC.MP) #869: Sun Mar  1 02:26:37 MST 2015
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8237064192 (7855MB)
avail mem = 8013877248 (7642MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9c000 (68 entries)
bios0: vendor LENOVO version "G1ETA6WW (2.66 )" date 08/19/2014
bios0: LENOVO 2349VFV
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT ASF! 
UEFI UEFI POAT SSDT SSDT UEFI DBG2
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.58 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.11 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.11 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.11 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 2 (EXP1)
acpiprt3 at acpi0: bus 3 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpicpu2 at acpi0: C2, C1, PSS
acpicpu3 at acpi0: C2, C1, PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "45N1001" serial 28768 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2601, 2600, 2500, 2400, 2300, 2200, 
2100, 2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 3G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4000" rev 0x09
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1600x900
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82579LM" rev 0x04: msi, address 
28:d2:44:44:38:e9
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: msi
pci1 at ppb0 bus 2
sdhc0 at pci1 dev 0 function 0 "Ricoh 5U823 SD/MMC" rev 0x04: apic 2 int 16
sdmmc0 at sdhc0
ppb1 at pci0 dev 28 function 1 "Intel 7 Series PCIE" rev 0xc4: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6205" rev 0x34: msi, 
MIMO 2T2R, MoW, address 6c:88:14:d2:96:90
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel QM77 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Samsung SSD 850, EXM0> SCSI3 0/direct fixed 
naa.50025388a08bc171
sd0: 122104MB, 512 bytes/sector, 250069680 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <PLDS, DVD-RW DS8A8SH, KU54> ATAPI 5/cdrom 
removable
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 102406MB, 512 bytes/sector, 209727983 sectors
root on sd1a (78b43ce6c771db63.a) swap on sd1b dump on sd1b

If there's any other info I can provide please let me know.

Cheers,
Toby

--
(0x2b || !0x2b) == 0xff

Reply via email to