geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Wingklip on Mon, 06 March 2017, 08:19:29

Title: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Mon, 06 March 2017, 08:19:29
Everything seems to work in 1.12 until I press a lock key, and then the entire keyboard freezes up

When I plug anything else in however, I can "unlock" the still locked lock keys and then plug in the 5576 again

#needhalp
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Mon, 06 March 2017, 10:40:37
If you remap a lock key to something else do you then see proper behavior?

Code: [Select]
remapblock
    CAPS_LOCK C
endblock
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Mon, 06 March 2017, 17:23:47
How to remap....
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Mon, 06 March 2017, 18:38:15
I put the code in the block labeled, uh, "Code". Save the code to a text file - I'll choose the name "test.sc"

You should have the tools which are included in the Soarer's Converter package. With everything in the same directory the commands would be:

scas test.sc test.scb
scwr test.scb

To get back to normal edit the file to this:
Code: [Select]
remapblock
#    CAPS_LOCK C
endblock

and do the same steps above.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Thu, 09 March 2017, 00:43:13
I put the code in the block labeled, uh, "Code". Save the code to a text file - I'll choose the name "test.sc"

You should have the tools which are included in the Soarer's Converter package. With everything in the same directory the commands would be:

scas test.sc test.scb
scwr test.scb

To get back to normal edit the file to this:
Code: [Select]
remapblock
#    CAPS_LOCK C
endblock

and do the same steps above.

And then I assume that I need to flash it onto the converter pro micro? The converter inside the folder where the tools are? That hex file right? It works, but how exactly can I make caps lock work without killing itself? Am I able to directly map a scan code into the key it should press, Like the Xwhatsit is capable of?
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Thu, 09 March 2017, 01:10:45
I swear it's as if this thing sends a reset signal every time you press the lock keys. I came up with something like this but it says that there is an error in line 2 or something

A lot of keys also come up with r00 and the speaker driver doesn't seem to turn on without some function key that I can't seem to find lol.

Here is my potatocode
remapblock
   CAPS_LOCK ALT
   ALT CONTROL
   r00 CAPS_LOCK
endblock
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Thu, 09 March 2017, 07:15:55
I swear it's as if this thing sends a reset signal every time you press the lock keys.
HID_LISTEN was very useful when I was converting a keyboard from a piece of medical equipment which sent some very strange key combinations.

You can grab HID_LISTEN from here (https://www.pjrc.com/teensy/hid_listen.html) and see what's going on. Just run HID_LISTEN in a terminal and when you press a key you'll see just what codes are being sent. Look for the codes prefixed with "+" or "-". A plus is a code for a key being pressed and a minus is a code for a key being released.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Thu, 09 March 2017, 14:53:49
Yeah, caps lock sends a really long string following the initial caps code

I don't think Soarer's converter was able to handle a string code that long

How do I rebind directly to the scan code? Also, a lot of the terminal keys are recognised as +r00
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Fri, 10 March 2017, 08:15:18
Can you copy/paste the Caps Lock codes here?
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Mon, 20 March 2017, 18:36:02
Can you copy/paste the Caps Lock codes here?
[attachimg=1]
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Mon, 20 March 2017, 19:26:19
I don't have a lot of time right now but at a glance I see this is incorrect:

Code: [Select]
Here is my potatocode
remapblock
   CAPS_LOCK ALT
   ALT CONTROL
   r00 CAPS_LOCK
endblock

"CONTROL" should be "CTRL".

"ALT" works to detect either ALT key but I'm not sure that's the proper way to send. I think to send it should be "LALT" or "RALT" or "LCTRL" or "RCTL" - like that.

In your strings I see "+39 d39" for Caps and "+47 d47" for scroll lock. Those are correct. I don't know how to interpret the rest of the strings, though.

Anyway... gotta go for now.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Fri, 31 March 2017, 01:23:23
SO um..... is there any way to modify the scan code to include this? Or maybe there is another software I can use for converting the keyboard? I heard that Hasu has some but IDK how to install those on the pro micros that I have.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Fri, 31 March 2017, 02:03:10
To start with let's see if we can just turn them off:

Code: [Select]
remapblock
    CAPS_LOCK  UNASSIGNED
    SCROLL_LOCK UNASSIGNED
endblock
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Fri, 31 March 2017, 05:44:14
I've been able to remap the keys to others but is there a way to remap the key to be caps lock num lock and scroll lock otherwise?

Like proxy mapping perhaps :)
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Fri, 31 March 2017, 09:40:35
I've been able to remap the keys to others but is there a way to remap the key to be caps lock num lock and scroll lock otherwise?

Like proxy mapping perhaps :)

What does this do?

Code: [Select]
macroblock
    macro CAPS_LOCK
      PUSH_META CLEAR_META all
      press CAPS_LOCK
      POP_ALL_META
    endmacro

    macro SCROLL_LOCK
      PUSH_META CLEAR_META all
      press SCROLL_LOCK
      POP_ALL_META
    endmacro

endblock
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Sat, 01 April 2017, 15:52:38
But how do you activate the macro? Do you need to rebind the key to it?
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Tactile on Sat, 01 April 2017, 19:24:46
All you need to do is flash the Soarer's converter with the code above and then press Caps Lock and see if it works.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: invariance on Sat, 01 April 2017, 22:56:44
For some reason I think the macros only work with modifiers, eg shift + caps lock.
Anyway, suck and see.


Sent from my iPhone using Tapatalk
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Sun, 02 April 2017, 07:26:00
Looks good then, will give it a shot
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Mon, 10 April 2017, 21:00:26
All you need to do is flash the Soarer's converter with the code above and then press Caps Lock and see if it works.

The problem seems to be that the caps lock key being toggled causes the issue. Whenever it is on the system sends it to the converter and keyboard and disables them both somehow.

This happens when I'm toggling any lock key on another keyboard, in this case the xWhatsit converted IBM 3178

hm. The remap blocks do work though, I can verify that the key combinations bound to caps lock can assign it to say, c, or no key at all.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: invariance on Wed, 12 April 2017, 05:20:15
This happens when I'm toggling any lock key on another keyboard, in this case the xWhatsit converted IBM 3178
By this, do you mean that any keyboard plugged into this converter gives the same result of any lock key 'freezing' the keyboard and making it unresponsive?
hm. The remap blocks do work though, I can verify that the key combinations bound to caps lock can assign it to say, c, or no key at all.
So, just to confirm, when you have the 5576 plugged into this converter and you remap the caps_lock to c with:
Code: [Select]
remapblock
    caps_lock c
endblock
this works?  That would indicate the converter is picking up the caps_lock key correctly.


I noticed in tactile's code that his macro's are triggering the keys that are being pressed.  This may not help the converter or what is happening for you.
For testing purposes, try
Code: [Select]
macroblock
  macro CAPS_LOCK
    PUSH_META CLEAR_META all
    PRESS SCROLL_LOCK
    POP_ALL_META
endmacro


As an addendum, a correction to my own post earlier: a macro doesn't need a meta as per Soarer's definition:
    macro <hid> [[-][{l|r}]shift]......
It was his example in the docs that gave me the impression it was a prerequisite.
Title: Re: IBM 5576 KB1 Soarer's converter scan codes
Post by: Wingklip on Wed, 12 April 2017, 06:03:08
If I toggle the caps lock with another keyboard, the 5576 freezes too, but you can see the light continue toggling on the 5576 if you spam the caps lock on the other keyboard.

It can receive the data, just not send any after caps lock or any lock key toggles on or off.