geekhack

geekhack Community => Keyboards => Topic started by: kelvinhall05 on Tue, 12 November 2019, 15:14:09

Title: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Tue, 12 November 2019, 15:14:09
I've converted my Terminal Model M to USB with a Pro Micro and everything is working fine, but I'm having one problem where some "special" keys like what would normally be Escape or basically all the keys above the arrow keys as well as some of the numpad keys (except the numbers themselves). How can I remap these to what they would be on a normal layout? Thanks!
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Thu, 14 November 2019, 07:26:08
This'll be brief 'cause I don't have much time right now:

You remap keys from [something] to [something_else]. Right now you don't know what those keys are outputting. Until you know the [something] you can't remap those keys to [something_else].

I'm guessing you are using Soarer's Converter. Read the doc's, especially the "Codes" and "Trouble" sections. The tool you need is called HID Listen and it can be found here (https://www.pjrc.com/teensy/hid_listen.html).

Using HID Listen you can see what codes those keys are outputting and then remap them to what you want.
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Thu, 14 November 2019, 14:50:56
This'll be brief 'cause I don't have much time right now:

You remap keys from [something] to [something_else]. Right now you don't know what those keys are outputting. Until you know the [something] you can't remap those keys to [something_else].

I'm guessing you are using Soarer's Converter. Read the doc's, especially the "Codes" and "Trouble" sections. The tool you need is called HID Listen and it can be found here (https://www.pjrc.com/teensy/hid_listen.html).

Using HID Listen you can see what codes those keys are outputting and then remap them to what you want.

Yeah, the hard part is that my output for the key where escape would be (setup/attn/exsel) is this (line 1 is pressed down, line 2 is released):

r08 +68 d68
rF0 r08 -68 u68

Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Thu, 14 November 2019, 15:34:00
This'll be brief 'cause I don't have much time right now:

You remap keys from [something] to [something_else]. Right now you don't know what those keys are outputting. Until you know the [something] you can't remap those keys to [something_else].

I'm guessing you are using Soarer's Converter. Read the doc's, especially the "Codes" and "Trouble" sections. The tool you need is called HID Listen and it can be found here (https://www.pjrc.com/teensy/hid_listen.html).

Using HID Listen you can see what codes those keys are outputting and then remap them to what you want.

Yeah, the hard part is that my output for the key where escape would be (setup/attn/exsel) is this (line 1 is pressed down, line 2 is released):

r08 +68 d68
rF0 r08 -68 u68

You can look that up in the "Codes" section of the Doc's for Soarer's Converter.

0x68 is F13

so to change that to escape you'd have this in your *.sc file:

Code: [Select]
remapblock
    F13    ESC
endblock

So, again, read the Doc's.
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 09:20:25
This'll be brief 'cause I don't have much time right now:

You remap keys from [something] to [something_else]. Right now you don't know what those keys are outputting. Until you know the [something] you can't remap those keys to [something_else].

I'm guessing you are using Soarer's Converter. Read the doc's, especially the "Codes" and "Trouble" sections. The tool you need is called HID Listen and it can be found here (https://www.pjrc.com/teensy/hid_listen.html).

Using HID Listen you can see what codes those keys are outputting and then remap them to what you want.

Yeah, the hard part is that my output for the key where escape would be (setup/attn/exsel) is this (line 1 is pressed down, line 2 is released):

r08 +68 d68
rF0 r08 -68 u68

You can look that up in the "Codes" section of the Doc's for Soarer's Converter.

0x68 is F13

so to change that to escape you'd have this in your *.sc file:

Code: [Select]
remapblock
    F13    ESC
endblock

So, again, read the Doc's.

Alright, I've created a remap file but I'm not sure how to flash it since I'm using Manjaro and the scaswr.bat program is written for Windows only. Here's my remap file...is this OK?
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Fri, 15 November 2019, 09:29:12
That file should be ok.

In a terminal window, in the same directory as the *.sc file you need to:

scas remap.sc remap.scb

scwr remap.scb

...and you're done

Just check out the "Tools" section of the docs
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 09:36:57
That file should be ok.

In a terminal window, in the same directory as the *.sc file you need to:

scas remap.sc remap.scb

scwr remap.scb

...and you're done

Just check out the "Tools" section of the docs

I tried the first command and I just get a bunch of "invalid instruction errors" on every line in the file (even the comment line at the top!). Am I doing something wrong? Lol


Thanks for helping me out btw, I've been trying to find answers for over a week now haha
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Fri, 15 November 2019, 09:48:15
Here's what happened when I did it:

Code: [Select]
C:\Users\Typical User\bin\Soarer\Soarer_Converter_v1.0\tools\Soarer_sctools_v1.0_windows>scas remap.sc remap.scb
No errors. Wrote: remap.scb
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 09:51:12
Here's what happened when I did it:

Code: [Select]
C:\Users\Typical User\bin\Soarer\Soarer_Converter_v1.0\tools\Soarer_sctools_v1.0_windows>scas remap.sc remap.scb
No errors. Wrote: remap.scb

I see...I'll try it in Wine CMD instead of a regular Linux console. I'll see if it works
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 09:53:16
Yup, that worked. Should I do the SCWR command now?
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 09:55:41
Unfortunately the SCWR command returned this error:

Code: [Select]
003d:err:module:import_dll Library rawhid.dll (which is needed by L"Z:\\home\\kelvin\\Downloads\\scwr.exe") not found
003d:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\kelvin\\Downloads\\scwr.exe" failed, status c0000135
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Fri, 15 November 2019, 09:56:23
Yup, that worked. Should I do the SCWR command now?

SCWR remap.scb

...and you should be finished
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Fri, 15 November 2019, 09:57:50
Unfortunately the SCWR command returned this error:

Code: [Select]
003d:err:module:import_dll Library rawhid.dll (which is needed by L"Z:\\home\\kelvin\\Downloads\\scwr.exe") not found
003d:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\kelvin\\Downloads\\scwr.exe" failed, status c0000135

What Linux distro?
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 10:01:09
Unfortunately the SCWR command returned this error:

Code: [Select]
003d:err:module:import_dll Library rawhid.dll (which is needed by L"Z:\\home\\kelvin\\Downloads\\scwr.exe") not found
003d:err:module:LdrInitializeThunk Importing dlls for L"Z:\\home\\kelvin\\Downloads\\scwr.exe" failed, status c0000135

What Linux distro?
Manjaro. I tried using the Linux SCWR program and I got an error that I was missing the libusb-0.1.so.4 library but trying to install it with Pamac doesn't work (libusb-0.1.so.4 not found).

Code: [Select]
/home/kelvin/Downloads/scwr: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 10:05:33
Looking in /usr/lib/ it seems that I do have the libusb-0.1.so.4 library but it still doesn't work. Tried with sudo and got the same error.
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 10:08:55
I tried one more thing which was to move scwr and remap.scb to the /usr/lib folder and running the command from there but I got the same error.
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: kelvinhall05 on Fri, 15 November 2019, 11:21:32
Figured it out. I had to install the 32-bit libusb-compat and then it let me flash it. Works great now. Thanks!
Title: Re: Set different layout on a terminal Model M (102 key)?
Post by: Tactile on Fri, 15 November 2019, 11:41:21
 :thumb: