Author Topic: [TMK] Keyboard Protocol Converter  (Read 81129 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #100 on: Fri, 27 April 2018, 03:25:44 »
[IBM4704]

Added IBM4704 50-key(6019273) support on keymap editor.

http://www.tmk-kbd.com/tmk_keyboard/editor/
https://goo.gl/95HRna
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline TheMilkmen

  • Posts: 4
  • Location: MD, USA
Re: [TMK] Keyboard Protocol Converter
« Reply #101 on: Mon, 28 May 2018, 08:34:00 »
Quick dumb question but can this converter be used on one of the ibm pingmasters? I'm just curious since I couldn't see anything other than a soarers converter for it. Thanks!

Offline Monarchial

  • Posts: 1
Re: [TMK] Keyboard Protocol Converter
« Reply #102 on: Mon, 28 May 2018, 12:44:35 »
Hi @Hasu

Is there any chance you're going to release an fc660m controller?

I'm working on one right now but running into some issues and was wondering if you had plans to do it.

Offline Somun

  • Posts: 2
Re: [TMK] Keyboard Protocol Converter
« Reply #103 on: Thu, 28 June 2018, 05:11:16 »
Just discovered this while looking to fix my Kinesis advantage, which does not work on a Windows 7 PC I have.

Hasu, can the firmware be configured to also include a PS/2 mouse interface? I am planning on adding some trackpad/touchpoint and get a composite usb device since the usb hub will be gone. Wondering if this is somehow achievable with maybe a custom TMK build? I don't need to change the keymap, btw.

Thanks.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #104 on: Thu, 28 June 2018, 22:03:10 »
Just discovered this while looking to fix my Kinesis advantage, which does not work on a Windows 7 PC I have.

Hasu, can the firmware be configured to also include a PS/2 mouse interface? I am planning on adding some trackpad/touchpoint and get a composite usb device since the usb hub will be gone. Wondering if this is somehow achievable with maybe a custom TMK build? I don't need to change the keymap, btw.

Thanks.

I think it is kind of possible but it won't be simple job like editting Makefile or config.h. You will have to write some code with looking into existent codes.


TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Somun

  • Posts: 2
Re: [TMK] Keyboard Protocol Converter
« Reply #105 on: Fri, 29 June 2018, 10:16:16 »
Just discovered this while looking to fix my Kinesis advantage, which does not work on a Windows 7 PC I have.

Hasu, can the firmware be configured to also include a PS/2 mouse interface? I am planning on adding some trackpad/touchpoint and get a composite usb device since the usb hub will be gone. Wondering if this is somehow achievable with maybe a custom TMK build? I don't need to change the keymap, btw.

Thanks.

I think it is kind of possible but it won't be simple job like editting Makefile or config.h. You will have to write some code with looking into existent codes.

Thanks for the reply. Would not mind writing code. From a brief look, my impression is that the converter works by imitating a keyboard matrix that feeds off of the data coming from the ps2 keyboard. I know that the TMK has support for a ps2 mouse but not sure if the converter is repurposing the same code for the ps2 or how hard it would be add handling for a second one. I also need to change the USB descriptors I guess? I would appreciate any pointers / suggestions.

Thanks again.

Offline Laser

  • Posts: 100
  • Location: euROpe
Re: [TMK] Keyboard Protocol Converter
« Reply #106 on: Sun, 01 July 2018, 10:32:38 »

Sorry if this was asked already, could you describe the steps needed to add two extra buttons to the ps2_usb tmk converter? Or is there some support already?

I mean, buttons connected directly to some pins of the atmega32u4.

Thanks!

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #107 on: Sun, 01 July 2018, 15:55:34 »

Sorry if this was asked already, could you describe the steps needed to add two extra buttons to the ps2_usb tmk converter? Or is there some support already?

I mean, buttons connected directly to some pins of the atmega32u4.

Thanks!


You can add your code in `matrix_scan()` function to scan the buttons.
https://github.com/tmk/tmk_keyboard/blob/master/converter/ps2_usb/matrix.c#L144

The function is called repeatedly every so often in main loop and would be good place to add your code in this case. TMK converters translate scancode got from keyboard into key stataus as a bit in array `matrix[]`.

I think you can add state of those buttons into the array `matrix[]` using scancodes unused in your keyboard, for example F13(0x08) and F14(0x10). Use 'matrix_make()` and `matrix_break()` to change status of the button, like `matrix_make(0x08)` when it is pressed.
https://github.com/tmk/tmk_keyboard/blob/master/converter/ps2_usb/matrix.c#L407-L423

EDIT:
This thread is basically intended to offer support for users of TMK made converters. Technical topic about converter modification like this would be more suitable to this PS/2 converter thread. Post in the thread if you need any further quetion, so that we can share info with community.
https://geekhack.org/index.php?topic=14618.0
« Last Edit: Sun, 01 July 2018, 16:13:35 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Laser

  • Posts: 100
  • Location: euROpe
Re: [TMK] Keyboard Protocol Converter
« Reply #108 on: Sun, 01 July 2018, 16:17:42 »
Thanks for the quick reply! I think I understand. One more question, could I also use mousekey key codes instead of F13 or F14, such as KC_BTN1 or KC_BTN2 instead (assuming I do enable mousekey functionality) ?

EDIT: sorry, I saw your edit only after posting. Next posts will be made in the other thread.

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #109 on: Sun, 01 July 2018, 16:22:30 »
Thanks for the quick reply! I think I understand. One more question, could I also use mousekey key codes instead of F13 or F14, such as KC_BTN1 or KC_BTN2 instead (assuming I do enable mousekey functionality) ?

EDIT: sorry, I saw your edit only after posting. Next posts will be made in the other thread.

Yes, you can remap the F13 and F14 to the mouse button in keymap definition.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Laser

  • Posts: 100
  • Location: euROpe
Re: [TMK] Keyboard Protocol Converter
« Reply #110 on: Sun, 01 July 2018, 16:30:57 »

Thanks again, Hasu! :)

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #111 on: Thu, 05 July 2018, 19:31:32 »
[USB-USB]
Updated firmware of USB-USB converter to fix startup issue. See this post for detail.

https://geekhack.org/index.php?topic=69169.msg2634041#msg2634041

Thanks
« Last Edit: Sat, 07 July 2018, 19:43:26 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline scotland

  • Posts: 1
Re: [TMK] Keyboard Protocol Converter
« Reply #112 on: Sat, 07 July 2018, 18:09:35 »
My USB to USB converter arrived quickly to the UK. My whole idea was to map a UK layout Apple aluminium keyboard to work in Windows. The reason being my work PC is completely locked down so a hardware based method of remapping the keys was preferable. Using hasu's converter I managed to swap:

Left alt to left Windows
Left CMD to left alt
F13 to print screen
F14 to volume down
F15 to volume up

Thanks again hasu. Great service and great piece of kit.
« Last Edit: Sat, 07 July 2018, 18:11:26 by scotland »

Offline hasu

  •  Moderator
  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [TMK] Keyboard Protocol Converter
« Reply #113 on: Sat, 07 July 2018, 19:51:32 »
Thanks for the feedback. Glad to hear that!
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt