geekhack Projects > Making Stuff Together!
TMK USB to USB keyboard converter
qk6339zmdm:
Thanks Hasu, you're a wizard! Here's the output, the keyboard is accepting input now.
Waiting for device:...
Listening:
TMK:6a5741/LUFA:d6a7df/UHS2:13078c
USB configured.
Loop start.
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
Ci read:0012
left:0000
vid:04D9
pid:A293
klass:00
subklass:00
AC1
AC2
A2 driver:00
BM Init
Ci read:0008
left:0000
Addr:01
Ci read:0012
left:0000
NC:01
HID_PROTOCOL_KEYBOARD
[gC]Ci read:0009
left:0000
Cl:007B
Ci [xE1][xE1][xE++]read:0040
left:003B
read:003B
left:0000
bNumEP:02
Cnf:01
bIfaceNum:00
bNumIface:00
Interface:00
crST:05
PROTOCOL SET HID_BOOT rcode:05
crST:05
SET_IDLE rcode:05
Ci read:0040
left:0040
read:000F
left:0031
RPIPE rcode:00
BM configured
Init:00
AttemptConfig2:00
Configuring:00
host.Task: 2323
usb_state: 90
speed: full
Co
hasu:
Great.
Updated source code at github repository. Now you can download new firmware from Keymap Editor.
qk6339zmdm:
Thanks again Hasu! Your updated firmware works!
antony:
i use a computer that only accept a German keyboard! And I can't change to my favorite one, US ASCCI or ISO International After a year I am getting better at using DE keyboard. Still it feels slowing me down. I use vim, screen, tmux all day, think of [], {} with the Alt Gr combinations.
So I would like build a hardware keyboard mapping translator. Would TMK be able translate from a English keyboard to a German keyboard? Is there a TMK firmware or an examples of mapping a layout to a German keyboard layout?
Any pointers before I order the hardware?
hasu:
This is not trivial and you have to write C code to implement it.
You mean that you cannot change 'keyboard layout' setting on the computer and it is German, right?
Layout of your 'physical' keyboard is not that matter here, but let's assume it is US ASCII for sake of simplicity.
For example, when you press '[' on your US keyboard you will get 'ü' by default but you want to get '[' here.
To get '[' char on the computer the keyboard(conveter) have to send scan code for 'RAlt + 8'.
This can be done with `ACTION_MODS_KEY(MOD_RALT, KC_8)` relatively easily. See line 96 and 230.
And you want to get '{' char when pressing Shift + '[' on your US keyboard. This is more complex. The converter should send scan code for 'RAlt+9' but it have to cancel Shift before sending the code.
See line 146 and 240.
https://gist.github.com/tmk/70babc152e09f102396dc0a621c8d66a/332f76be59c95c9efc33bcfd9337f7de26ba9501
I implemented Default(0) and Shift(1) layer for trial, and it seems to work during my brief test on Linux. Note that keys tweaked with `CANCEL_*` function can't do key repeating.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version