Microsoft sculpt keyboard linux support

8

2

I have a microsoft sculpt keyboard that have double space. I want to use it on linux. I can't find document, hack etc. I want to remap one of space key to enter key. I don't idea where i can start digging for solving problem.

[Edit 1]

I used "showkeys -s" command that output "0x39 0xb9" value. But both of space are give same output. Is there a possible any other information that can be differ each other?

Thanks

http://www.microsoft.com/hardware/en-us/d/sculpt-comfort-keyboard

Erdinç Taşkın

Posted 2013-12-12T20:13:08.143

Reputation: 183

1Note: it depends on the Sculpt keyboard. Mine is a butterfly type where both sections of the spacebar are actually the same key. They are just split because that way they can move independently giving a better typing experience. Those will give you the same scancode, no matter what you do :( And yes, I asked Microsoft this (!) – Maarten Bodewes – 2018-10-23T02:25:35.673

1If you press a key, your kernel get a scan code. It is not ascii-code, but a highly architecture/hw-specific thing. This is the same everywhere. The OS has a table, which maps this scancodes to ascii codes. This table is, what you can modify. Please edit in your question, where do you want to change the keyboard mapping. There are good tools (both UI & command line) for this, and with this info you can alreadly better googling for one, if you don't get an enough good answer. – peterh - Reinstate Monica – 2013-12-12T20:21:36.997

Did you see any information that the keyboard should differentiate the two spaces? Normal PC keyboards have multiple scancode sets so it is possible that in one of the sets the two spaces can produce two different scancodes. See https://en.wikipedia.org/wiki/Scancode

– pabouk – 2013-12-12T22:12:34.297

Officially says, can be use one of space as an backspace but there is no technical details. – Erdinç Taşkın – 2013-12-12T23:47:51.373

Answers

9

The technical data sheet of the keyboard says this:

"Right side of space bar has typical space bar functionality; left side of space bar will toggle between backspace functionality and typical space bar functionality. To activate, depress and hold both sides of space bar for 3 seconds."

This suggests it is a built-in feature of the keyboard and does not require a driver. If you activate this feature, showkeys will most likely report the scancode for the backspace if you hit the left space bar (in which case you're still out of luck). If, on the other hand, the keyboard does happen to give off two different scancodes for the left space bar and the real backspace, you can map that keycode to an Enter. Keyboard mappings kan be manipulated with tools like xkbcomp or make your own mapping. Beware however, that the handling of keycodes by X is highly esoteric and documentation is ... rather terse. A start is the documentation of xkbcomp.

BTW, note that the reported keycodes "0x39 0xb9" are for the same key, the latter just has the high bit set to indicate key release. 0x39 is 57 decimal, which maps to the Space key in X for PC keyboards.

JvO

Posted 2013-12-12T20:13:08.143

Reputation: 883