Author Topic: Truly-Ergonomic’s keycodes remapping  (Read 123902 times)

0 Members and 1 Guest are viewing this topic.

Offline Azteca

  • Posts: 29
Re: Truly-Ergonomic’s keycodes remapping
« Reply #150 on: Sat, 21 February 2015, 20:02:20 »
Basically the firmware Keypad codes works OK for PC  :thumb:
but it has a gotcha for Macs.

So for Macs, I tested setting hex code 59h directly into the layout designer, by typing “59h”, but it gets immediately translated by the layout designer into Keypad 1.

Is it possible to type another code that will just send hex 59h without getting translated into Keypad 1?

Is it possible to use/set one of the "23 special codes" like Media Control (MC) keys, so that the firmware will only send hex 59h without getting translated into Keypad 1 or without sending 53h (NumLock)?

Offline m-ou-se

  • Posts: 2
Re: Truly-Ergonomic’s keycodes remapping
« Reply #151 on: Sat, 07 March 2015, 15:45:45 »
If you're a Linux user: I made a command-line tool that can upload firmware to the keyboard: https://github.com/m-ou-se/teck-programmer

Offline caseyandgina

  • Posts: 54
Re: Truly-Ergonomic’s keycodes remapping
« Reply #152 on: Thu, 02 April 2015, 22:38:24 »
If you're a Linux user: I made a command-line tool that can upload firmware to the keyboard: https://github.com/m-ou-se/teck-programmer

Thank you, it works great!

Offline m-ou-se

  • Posts: 2
Re: Truly-Ergonomic’s keycodes remapping
« Reply #153 on: Thu, 16 April 2015, 12:58:08 »
If you're a Linux user: I made a command-line tool that can upload firmware to the keyboard: https://github.com/m-ou-se/teck-programmer

It also works on Mac now.

Offline caseyandgina

  • Posts: 54
Re: Truly-Ergonomic’s keycodes remapping
« Reply #154 on: Mon, 20 April 2015, 11:51:26 »
If you're a Linux user: I made a command-line tool that can upload firmware to the keyboard: https://github.com/m-ou-se/teck-programmer

It also works on Mac now.

So it does, awesome!  I am going to have to seriously consider using Node.JS for my own scripting...

Offline pw

  • Posts: 21
Re: Truly-Ergonomic’s keycodes remapping
« Reply #155 on: Sun, 10 July 2016, 08:12:43 »
I've spent some time working on the 8051 source files that Yuri provided, and have implemented the changes I really wanted:
* default modifiers for each layer, so you can (eg) put punctation symbols in the fn layer without needing to press shift as well.
* and a non-locking access to the num layer, so it can be used like the function layer (no numlock).

To use it (at your own risk, of course!!),
* edit the file 229_keymap.a51 to map your keys and modifiers
* assemble to hex using ASEM51 (I included the windows executable as its very small):
      >asemw main
* burn to keyboard as usual

I've only just finished, so it may contain bugs still. Please let me know if you find any. I've never had to hard-reset my TE keyboard, so it should be safe from that angle.
« Last Edit: Sun, 10 July 2016, 19:27:32 by pw »

Offline pw

  • Posts: 21
Re: Truly-Ergonomic’s keycodes remapping
« Reply #156 on: Sun, 10 July 2016, 22:25:02 »
And now the bad news, I've just bricked my keyboard :-(.

This morning, in a relaxed frame of mind I set about actually creating a map for myself.
Without thinking to much, I 'cleaned up' a few lines in main.a51, which was open in the editor.

I moved a code file to the top, and trashed the interrupt vectors.
So I wont be doing any more on this unless I decide to buy another TE. Arghh!

Offline Darkshado

  • Posts: 79
  • Location: Montréal
Re: Truly-Ergonomic’s keycodes remapping
« Reply #157 on: Mon, 11 July 2016, 00:53:28 »
Are there some provisions for in-circuit programming on that thing?

Offline pw

  • Posts: 21
Re: Truly-Ergonomic’s keycodes remapping
« Reply #158 on: Mon, 11 July 2016, 01:23:59 »
Whew, I'm back in business! Id assumed that the hard reset relied at least on the interrupt vectors, but it loads a bootstrap ISP code from a different portion of ROM altogether, untouched by usual ISP. Lucky me.

To clarify the instructions given in previous posts, and on the TE site the hard reset/ISP requires:
1) Dip switch 5 in PROTECTED mode through all steps (ie NOT in the usual posn for ISP)
2) Plug in and keep in the USB port (it doesnt flash a bootstrap to the main ROM, it just waits for reprogramming)
3) Short the Reset pin to Vdda described by TE support or the posts above.
4) Burn firmware as usual, but KEEPING DS5 in the protected position.


« Last Edit: Mon, 11 July 2016, 02:29:00 by pw »

Offline zorglups

  • Posts: 25
Re: Truly-Ergonomic’s keycodes remapping
« Reply #159 on: Tue, 17 January 2017, 20:40:45 »
Dear pw,

Having a non locking numlock would be awesome for me.
My keyboard is a TECK 209 (instead of a 229).

What should I change before compiling it?

Does your code make the _TENUM not locking by default or should this be configured somehow?

Thanks.

Offline pw

  • Posts: 21
Re: Truly-Ergonomic’s keycodes remapping
« Reply #160 on: Wed, 18 January 2017, 18:34:05 »
I have not touched this for quite a while, but from memory:

* Yes I believe I made _TENUM non-locking by default.
* I don't believe there was any intrinsic difference for the 209, other than that the obvious one that the keyboard mapping itself is different. I think there were a couple of differences beyond the extra keys of the 229, too. So if you want the standard 209 mapping, you need to carefully check the differences, and carefully create another mapping in tabular format like the 229_keymap.a51. I think the remapper javascript code made the differences most apparent, or you could check the default key maps side-by-side on the TE remapper tool. But I think you could burn the 229 map as-is to your 209 just to test it's going to work for you, then modify progressively.



Offline zorglups

  • Posts: 25
Re: Truly-Ergonomic’s keycodes remapping
« Reply #161 on: Thu, 19 January 2017, 08:41:23 »
Thanks. I may give it a try.
I was afraid to screw up my TECK by uploading the wrong firmware on it.

I thought that the only difference between the 209 and 229 was that the 209 was featuring Cherry switches.
I'll check it carefully with the configurator.

Have a nice day.

Offline SnowBoy

  • Posts: 1
  • Location: Austria
Re: Truly-Ergonomic’s keycodes remapping
« Reply #162 on: Mon, 16 October 2017, 00:36:41 »
Hi!

I've took the hacked firmware from 'pw' and tried to use it for my needs.
For who will need this, and if it's not clear, there're several layers in the 229_keymap.a51. For each of them 'pw' made a main layer and a mod layer, that contains the modifier keys that will be sent together with the key pressed in the main layer.
So, given the two layers PCTOP and PCTOPMOD, if I want to send just the key for the number 2 I would write _2 in PCTOP; if instead I want to send the @, that's 2 with shift, I would write _2 in PCTOP and 0010B in PCTOPMOD for the same row of the key that I want to modify. The organization of the keys is obvious, every row of keys of the Tek is grouped in a contiguous block.
The modifier keys, when used in the *MOD layer are:
 - 0001B for CTRL
 - 0010B for SHIFT
 - 0100B for ALT
 - 1000B for GUI
This are NOT the same codes that the keyboard uses for the mod keys, because the way they work I suppose it's different.

At the end, for my needs (don't have to press the shift key in the Fn layer to send special keys) this hack works.
Thanks PW.

Offline pw

  • Posts: 21
Re: Truly-Ergonomic’s keycodes remapping
« Reply #163 on: Thu, 03 October 2019, 21:35:56 »

This may be too late to be of interest, but I have recently put together a start on C firmware for the TEK using SDCC. This uses usb code from the Megawin development kit, and a version of their EasyPod library (which they kindly provided me upon request!) which provides the code for device firmware upgrade. It has basic layers and another feature I wanted, dual-function combination keys. But it does not have working media keys, mac/PC layers, or even lights as yet. Ill probably do a bit more over the next week or two, but it would be great if others could provide more.

See https://github.com/Paul-Wray/tek

 

Offline clickclack123

  • Posts: 357
  • Location: Australia, Mate!
Re: Truly-Ergonomic’s keycodes remapping
« Reply #164 on: Tue, 08 March 2022, 17:45:37 »
I really want to have a key to minimize the current window in Windows 10, using Fn+a keypress.

I've tried the "AC Minimize" key from "Application Control - Window" in Yuri Khan's configurator https://yurikhan.github.io/teck/, but the key doesn't seem to do anything.

At work I use a TECK, but unfortunately I can't install ahk or autoit.

On my mouse I have a macro for Alt-Space then N, but I don't see a way to set a macro like this on the TECK.

Anyone have any ideas how I can have a single key to minimize the current window?