tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.96k stars 1.7k forks source link

Keys not lining up based on keymap #750

Closed anthonygualandri closed 1 year ago

anthonygualandri commented 1 year ago

WHen I flash my hhkb pro3 using the usb to usb converter Several of the keys do not lie up with the tmk graphical interface placement I used in the hex file. For example I tried to make the space bar key a layer toggle and the one next to it is the layer toggle key. OR the delete key is the backtick from above it. Any idea what's going on here?

tmk commented 1 year ago

Not sure about your problem. can you sahre your hex file with the problem?

Did you check DIP switches setting for delete key?

anthonygualandri commented 1 year ago
Attached is the hex file. I had the dip switches set to have the delete key be backspace, but the hex file is making the pipe / backslash one u key above it the backspace. Can’t I just turn off all the dip switches and let the controller programming using the TMK editor control all the keys’ functionality? From: ***@***.***: Friday, December 16, 2022 6:45 PMTo: tmk/tmk_keyboardCc: Anthony Gualandri; AuthorSubject: Re: [tmk/tmk_keyboard] Keys not lining up based on keymap (Issue #750) Not sure about your problem. can you sahre your hex file with the problem?Did you check DIP switches setting for delete key?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 
anthonygualandri commented 1 year ago
Everything seems to be working now with this hex file except the pip/backslash, the back tick and the back space keys. Slash is still backspace, tick is nothing and the Delete key is backtick. From: ***@***.***: Friday, December 16, 2022 6:45 PMTo: tmk/tmk_keyboardCc: Anthony Gualandri; AuthorSubject: Re: [tmk/tmk_keyboard] Keys not lining up based on keymap (Issue #750) Not sure about your problem. can you sahre your hex file with the problem?Did you check DIP switches setting for delete key?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 
anthonygualandri commented 1 year ago
No matter what I set the backslash key to in the software, it’s always outputting the delete key action, the backtick is always nothing and the Delete key in the second row is always backtick. Sorry for the multiple email, but I can’t seem to figure this out! Do the dip switches need to be set to something specific for the converter. Changing them after flashing the firmware doesn’t seem to change anything though.  From: ***@***.***: Friday, December 16, 2022 6:45 PMTo: tmk/tmk_keyboardCc: Anthony Gualandri; AuthorSubject: Re: [tmk/tmk_keyboard] Keys not lining up based on keymap (Issue #750) Not sure about your problem. can you sahre your hex file with the problem?Did you check DIP switches setting for delete key?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 
tmk commented 1 year ago

Still not sure I can understand your problem.

You can type the key as expected with default layout of Keymap Editor firmware. Delete(Backspace) key should work as Delete(Backspace). Did that work for you?

First, physical key layout of HHKB and one of Keymap Editor is not completely coincident in terms of its placement, because HHKB layout is peculiar and USB-USB Keymap Editor has generic layout to support as many keyboards as possible.

You have to handle those keys(Delete, \ and `) with specific care in Keymap Editor. You can remap \ key on HHKB with \ key(one above Enter) on Editor(not JIS ¥), ` with `(one above Tab) or Delete(Backspace) with Delete(Backspace).

anthonygualandri commented 1 year ago

Attached is a screenshot of how I have the editor set. Everything is working as I want it to except the second to last key on the top row, which is set as the Grave key. When I flash the hex file this key acts as the Escape key and nothing else. If I change the editor mapping for that key to something like the letter A, it doesn’t type A, it just performs as Esc. Also, notice that to get the physical Delete key on the HHKB keyboard (last key of the second row) to function properly I have to set the last key on the first row to Backspace. Similarly, to get the second to last key on the first row on the physical device to map to the backslash key I have to map the Delete key in the editor to backslash. Both of these things you should be able to see on the screenshot I sent. I have the dip switches on the backside of the board set to the first and third one on and the rest off. I am using it on a Windows computer. Any idea why these things are happening this way and what I can do to get them to map in a more expected way with backspace and backslash and to work at all with the backtick key? Thanks!image

anthonygualandri commented 1 year ago

Oh there is one other weird thing with the fifth row functionality. The two keys on either side of the spacebar that are set I the editor as LGui and LCtrl and RGui and RCtrl are actually reversed in terms of which physical key does what when pressed. Also, on the fourth row the Fn key on the physical board next to right shift key does not map to anything either. Not sure how I get this key to map to something. There is another thing that’s not working come to think of it. The physical Control key can’t be mapped either. No matter what key I set it to in the editor, it doesn’t do anything.

tmk commented 1 year ago

Your comments look broken somehow.

Can you come this URL and edit your comments? https://github.com/tmk/tmk_keyboard/issues/750

anthonygualandri commented 1 year ago

I updated my previous two comments above.

tmk commented 1 year ago

Is this image what you want to attach? probably not.

You can share your keymap using URL keymap editor. Use 'Raw URL' button to get URL for your keymap. It is very long but you can post it here. (if 'URL shortener' button works you can use)

Yes, ALT and GUI are reversed. It is because HHKB default layout(SW5=OFF) is reversed in comparison with PC keyboard. Keymap Editor layout is based on PC keyboard(not HHKB or Mac). This is intended design of USB-USB converter and keymap editor, you have to grok and bear with unfortunately. Or just turn SW5 on, this will be resolved if this is problem for you.

As for Fn key USB-USB converter can not remap the key. The Fn key is processed completely inside of HHKB, it doesn't send any code to the converter.

tmk commented 1 year ago

If you want to remap Esc of HHKB to A you have to use Esc key on default layout of Keymap Editor. I mean a key at top left corner, not ` key.

Also let me remap Backspace(SW3=ON) to B, `(backtick) to C, \ to D and LControl to E.

See this Keymap Editor URL and pics below, hope this explains USB-USB converter idea clearly.

https://bit.ly/3wXc8Yk

Default layout of Keymap Editor: default_layout_keymap_editor_usb_usb

Remapped for HHKB: hhkb_keymap_editor_usb_usb_

For reference, HHKB layout:

,-----------------------------------------------------------.
|Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  `|
|-----------------------------------------------------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Backs|
|-----------------------------------------------------------|
|Contro|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Enter   |
|-----------------------------------------------------------|
|Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Fn |
`-----------------------------------------------------------'
      |Alt|Gui  |         Space         |Gui  |Alt|
      `-------------------------------------------'
anthonygualandri commented 1 year ago

Your most recent explanation clears everything up for me! Now I understand how the TMK editor works with the converter. I was trying to map the board with it like you do with a tool like VIA. Now it all makes sense. Thank you, and sorry for not getting it at first!