Author Topic: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard  (Read 2041 times)

0 Members and 1 Guest are viewing this topic.

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« on: Sun, 31 January 2016, 01:48:34 »
Hello, I'm trying to convert my SMK-85 75% keyboard that currently uses PS2 to use USB. I figured I'd go the TMK route so I can re-program some of the keys.

I'm looking at the keymap_common.h where I'm trying to map the matrix. I see the example matrix maps as not going from K0->Kn, but rather have it go all over the place. The example mapped matrices are all full sized keyboards.

What I don't understand is that since I'm only using 4 pins from the ps2 connector, aren't the values I put in arbitrary?

How do I map a matrix that matches my Strongman SMK-85 for ps2_usb?

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #1 on: Sun, 31 January 2016, 16:38:53 »
Anyone familiar with the process? Any help would be appreciated.

Offline hasu

  • Posts: 3475
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #2 on: Sun, 31 January 2016, 18:58:49 »
If you use TMK ps2_usb converter you don't need to edit keymap_common.h.
Just ignore keys your keyboard doesn't have when you make your keymap file.

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #3 on: Sun, 31 January 2016, 19:18:29 »
Thanks for the reply hasu, so this is what I'm understanding from you.

1. I don't need to change the matrix map in keymap_common.h
2. In my keymap_smk85.c file I can just set the keys I want and put in "don't cares" in the other values?

If that is the case, that is so much easier than I made it out to be.

Offline hasu

  • Posts: 3475
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #4 on: Sun, 31 January 2016, 19:28:08 »
Yes, youre right.
You can start with copying keymap_plain.c to your keymap_smk85.c.
That keymap has full keyboard layout but you can just leave keys that you don't care safely, for example keypad area which SMK85 don't have in real.

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #5 on: Mon, 01 February 2016, 20:25:54 »
Ok I got it mostly working. The SMK85 has an actual FN key where the ctrl key is normally. How do I change the FN key to something else?

The following picture may help:
http://www.ergocanada.com/products/keyboards/dsi_smk85_compact.html

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #6 on: Tue, 02 February 2016, 21:03:59 »
Alright, I loaded up a hex file created using the regular keymap_plain hex file. All keys work as expected even the Fn key works.

I can also edit a copy of the plain keymap file and change any key I want, except for the Fn key.

So I guess I have two issues. I want to change the Fn Key to a LCTL, and the LALT to Fn. I don't know which key in keymap_plain.c represents the Fn key, and I don't know what the code for Fn is to change LALT.

Here's the image again of the exact keyboard for reference.
http://www.ergocanada.com/products/keyboards/dsi_smk85_u_sil_1220.jpg



Offline hasu

  • Posts: 3475
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #7 on: Thu, 04 February 2016, 15:23:43 »
most of keyboards don't spit out code for Fn key and you can't remap it with converter. as far as I know apple keyboard is only exception.

you need to swap controller to do that.

Offline merlin64

  • Thread Starter
  • Posts: 1273
  • Location: Seattle, WA
    • MechMerlin
Re: TMK Help: ps2_usb keymap_common.h for SMK85 keyboard
« Reply #8 on: Fri, 05 February 2016, 16:44:16 »
Oh that is unfortunate. But I guess that is no different than how a macbook's keyboard is laid out. I'll deal with it.