Somewhere between getting a double output (ie \4E +04 \4F +42 d04 d42) and configuring all the keys to suit the keyboard's layout, I re-read an important piece of information in the OP:
WY85 (non-gate array) requires a pull-up resistor between Data and +5V
With this installed, I was getting the correct output with hid-listen
[attach=1]
The configuration file I used:
#Wyse 85 keyboard configuration
remapblock
layer 0
INSERT HOME #set the "Find" key to become HOME
HOME INSERT #set the "Insert Here" key to become INSERT
PAGE_UP DELETE #set the "Re-move" key to become DELETE
DELETE END #set the "Select" key to become END
END PAGE_UP #set the "Prev Scrn" key to become PAGE UP
endblock
macroblock
macro EUROPE_2 shift
PUSH_META CLEAR_META all
SET_META shift
PRESS PERIOD #set SHIFT + "<>" key to become >
POP_ALL_META
endmacro
macro EUROPE_2
PUSH_META CLEAR_META all
SET_META shift
PRESS COMMA #set the "<>" key to become <
POP_ALL_META
endmacro
macro COMMA shift
CLEAR_META shift
PRESS COMMA #set SHIFT + ",," key to become ,
endmacro
macro PERIOD shift
CLEAR_META shift
PRESS PERIOD #set SHIFT + ".." key to become .
endmacro
endblock
Perfect. Now to get the lock leds working. I put the sample code supplied with the Wyse Converter (wyse_leds.sc) into the config..
#Wyse 85 keyboard configuration
led caps +PF5
led num +PF6
led scroll +PF7
remapblock
.
.
.
......
and assembled it with the XT/AT...to USB converter tools (scas v1.10) but it threw an error at line 1: invalid command.
Even just making a config file with the led commands created an error.
I tried looking around for a worked example of it being used but couldn't find a thing: nothing in the docs and I gave up looking when I got half way through the XT/AT.. to USB thread.
OK, so I thought I would try using the Keyboard Controller Firmware tools to see if they would work.
The led config file compiled; hooray!
Wrote the led commands into the main config file and compiled.
More
#Wyse 85 keyboard configuration
led caps +PF5
led num +PF6
led scroll +PF7
remapblock
layer 0
INSERT HOME #set the "Find" key to become HOME
HOME INSERT #set the "Insert Here" key to become INSERT
PAGE_UP DELETE #set the "Re-move" key to become DELETE
DELETE END #set the "Select" key to become END
END PAGE_UP #set the "Prev Scrn" key to become PAGE UP
endblock
macroblock
macro EUROPE_2 shift
PUSH_META CLEAR_META all
SET_META shift
PRESS PERIOD #set SHIFT + "<>" key to become >
POP_ALL_META
endmacro
macro EUROPE_2
PUSH_META CLEAR_META all
SET_META shift
PRESS COMMA #set the "<>" key to become <
POP_ALL_META
endmacro
macro COMMA shift
CLEAR_META shift
PRESS COMMA #set SHIFT + ",," key to become ,
endmacro
macro PERIOD shift
CLEAR_META shift
PRESS PERIOD #set SHIFT + ".." key to become .
endmacro
endblock
Error at line 14: invalid command. AAARRRGGGHHHH W! T! F!
So the error was at "endblock". I commented it out (thinking maybe it only needs one at the end of the file) and it compiled; hooray again!
Errors out of the road, it was time to investigate the leds as they weren't operating.
I decided I would use the Digital (PWM) pins as a continuation from the clock and data which fell on PWM 2 and PWM 3 respectively.
NumLock would be PWM 4 which is PD4 on the Atmega32u4
CapsLock would be PWM 5 which is PC6, and
ScrollLock would be PWM 6 which is PD7.
Made the changes to the config and set them to active high (ie +PD4, +PC6, +PD7) but still not working. Checked with a multimeter and confirmed they were going high (+5v) but still not lighting up the leds. :-(
Eventually I looked up how led's are set up on the arduino and they were from V+ -> resistor -> led -> pin. The pins are a current sink, not a current source. Ref Edit.
Rewired the leds and changed the config again to an active low (-PD4, -PC6, -PD7) and the lock leds are now working.
Edit: This is not totally correct. This is what I found:
NOTE: If you do not set the pinMode() to OUTPUT, and connect an LED to a pin, when calling digitalWrite(HIGH), the LED may appear dim. Without explicitly setting pinMode(), digitalWrite() will have enabled the internal pull-up resistor, which acts like a large current-limiting resistor.
https://www.arduino.cc/en/Reference/DigitalWrite (https://www.arduino.cc/en/Reference/DigitalWrite)
Also
Arduino (Atmega) pins default to inputs
https://www.arduino.cc/en/Tutorial/DigitalPins
Quite possibly the pinMode hasn't been set, but for some reason it was able to sink the current.
Anyway, I got it working for my situation.
To be able to have lock leds and a remapped navigation cluster, I realised that I would have come to a compromise.
Using scas.exe v1.20 from the Keyboard Controller Firmware, I configured the leds, then as the Prev Scrn key was locked into End, I made the Select key become Page Up just so the top row of nav keys more closely emulated what was printed on them.
Also to help with remembering which key does what when I next pull it out to use, I made up this nifty little key layout which I have printed and laminated to keep in the box I made for it.
[attach=1]
As you can see, I got a little carried away and created some macros to make the arrow keys act as media controls.
Here is the full configuration file I am running on an Arduino Leonardo.
More
#Wyse 85 keyboard configuration for use on an Arduino Leonardo
led num -PD4 #assign the NumLck led to PD4 (PWM 4, active low)
led caps -PC6 #assign the CapLck led to PC6 (PWM 5, active low)
led scroll -PD7 #assign the ScrLck led to PD7 (PWM 6, active low)
remapblock
layer 0
INSERT HOME #set the "Find" key to become HOME
HOME INSERT #set the "Insert Here" key to become INSERT
PAGE_UP DELETE #set the "Re-move" key to become DELETE
DELETE PAGE_UP #set the "Select" key to become PAGE UP and
#END PAGE_UP #the "Prev Scrn" key will remain as END as the assembler cannot remap END
end
macroblock
macro EUROPE_2 shift #set SHIFT + "<>" key to become >
PUSH_META CLEAR_META all
SET_META lshift
PRESS PERIOD
POP_ALL_META
endmacro
macro EUROPE_2 #set the "<>" key to become <
PUSH_META CLEAR_META all
SET_META lshift
PRESS COMMA
POP_ALL_META
endmacro
macro COMMA lshift #set SHIFT + ",," key to become ,
CLEAR_META lshift
PRESS COMMA
endmacro
macro PERIOD lshift #set SHIFT + ".." key to become .
CLEAR_META lshift
PRESS PERIOD
endmacro
macro UP lshift lctrl #Shift + Crtl + Up arrow for volume up
PUSH_META CLEAR_META all
PRESS MEDIA_VOLUME_UP
POP_ALL_META
endmacro
macro DOWN lshift lctrl #Shift + Crtl + Down arrow for volume down
PUSH_META CLEAR_META all
PRESS MEDIA_VOLUME_DOWN
POP_ALL_META
endmacro
macro LEFT lshift lctrl #Shift + Crtl + Left arrow for stop
PUSH_META CLEAR_META all
PRESS MEDIA_STOP
POP_ALL_META
endmacro
macro RIGHT lshift lctrl #Shift + Crtl + Right arrow for play/pause
PUSH_META CLEAR_META all
PRESS MEDIA_PLAY_PAUSER
POP_ALL_META
endmacro
endblock
And the final image.
[attach=2]
Some more random pics
More
[attach=3] [attach=4] [attach=5]
[attach=6] [attach=7] [attach=8]
[attach=9] [attach=10] [attach=11]
I hope some day what I have found might be useful some else.
Thanks for looking.