Author Topic: Ducky Zero repair (something wrong with the switch matrix)  (Read 5925 times)

0 Members and 1 Guest are viewing this topic.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Ducky Zero repair (something wrong with the switch matrix)
« on: Sat, 08 November 2014, 13:15:37 »
*Not too sure where this topic should go so mods feel free to move it*

I bought a damaged Ducky Zero as a cheap intro to your world.  From the pics it looked like some of the switches would need replacing so before testing it I took it apart and replaced the broken switches - they all now work.  I have been assured that all the keys (except the now replaced ones) were working before it was sent to me and the package arrived with no obvious signs of abuse, but for whatever reason the 3, E, D, C and SPACE keys (and probably F2 - I know no easy way of testing it) do not work.

I've started to map the key matrix but it's not a very intuitive layout (4 keys in one group, 2 in another, then another 4 in the first group...) and the diodes aren't all near their switch so it's getting a bit confusing - I'm going to persevere but was wondering if anyone had any experience with repairing this model, or indeed any advice in general.

Thanks in advance
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #1 on: Sat, 08 November 2014, 23:32:29 »
Welcome to the wonderful world of keyboards! With a little help, I'm sure you can get your ducky zero working again.

It does sound like you have a column out. If you can post some PCB photos (or if you have a scanner that sometimes produces good results) we can probably help out.

I suspect there is a break or cold solder joint somewhere along that column. Before taking pictures, you may try reflowing the joints on the switches that aren't working and any switch you see on the "other" side of 3 (probably F2)

Best of luck!

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #2 on: Sun, 09 November 2014, 09:47:46 »
Thanks for the welcome dorkvader, and it's good to hear that someone thinks there is hope.

I've finished my "probing" as far as matching each switch to a diode and, as expected, the dead keys are all connected.  Touching the far end of any of the diodes (well, the ones I've tried) to the controller chip results in a continuity beep while the dead column does not.

Hopefully the pic is of some use, the joints look dodgy because they needed scratching a little before my multimeter worked and the perspective's odd because it's a dull day and I kept getting flash shine - let me know if you'd like me to try and again to capture the whole board?

I don't think it's a cold joint on the keys as I didn't replace any in the dead zone - I replaced R and `with complete success, and G which I'm not 100% sure of as the pad has lifted.  It is attached to space on the non diode side and it's diode on the other, so I'm hopeful, but if it needed to go through the board on the non diode side maybe not. 

I was thinking to worry about G once the rest work as it's probably a separate issue, but maybe it's important?

Anyway, pic of the section in question:


Thanks again!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #3 on: Sun, 09 November 2014, 11:52:48 »
hmm nothing jumps out at me so far from that picture other than the factory soldering on that board is really bad. you may have some success by reflowing each of the switches and diodes. It appears to be a 2 layer PCB with plated through holes (I bet desoldering it was fun!) so your "G" key probably fine.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #4 on: Sun, 23 November 2014, 09:57:15 »
What's wrong with the soldering?  Most of the components are straight and the joints looked good enough (not dull/cold) before I started scratching them repeatedly.  Have to say they don't look so good now though.

You're right that it's a two layer PCB which means I can't see all the connections to debug it, and reflowing didn't help :(

Short of buying another keyboard of the same model or finding someone else who has one and is willing to open it up and find the broken connection I think I my only option is to desolder all the switches and find myself a custom PCB to put them in.  Much cheaper than buying new switches, but I don't even know if I like Reds yet - it's hard to type anything without spaces and Es!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #5 on: Mon, 01 December 2014, 19:19:47 »
Yesterday I ordered a teensy++ to handwire as a replacement for the PCB in this board and today I was bored so decided to desolder some switches, but first I tried the "obvious" fix (well, it's obvious looking at the pretty coloured diagram I've drawn up) - connecting the dodgy G pin to the H next to it. 

The result?  Success!  Well, partial success - G and SPACE now work, so it's just the dead column to work out but that will have to wait 'til tomorrow.  Wonder if I'll beat the postman...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #6 on: Mon, 01 December 2014, 23:43:50 »
try "higher up" on the column, 5 connects via D26 and R via D101. I can't see where the trace goes after that though.

the very "end" of the column are GFV and possibly space.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #7 on: Tue, 02 December 2014, 19:08:54 »
Here's the matrix - columns are the non-diode pins and colours/rows are the diode ones.  Keys starting with "No " are the ones in the number pad and "NONE" is an unpopulated switch above Enter as I've got a UK board.

Not sure if there's a standard format for this?

MATRIX PIC REMOVED DUE TO ERRORS - WILL UPLOAD A BETTER ONE WHEN DONE

So it seems I'm missing F2, F3 and F4 which I had been unable to test as well as the obvious keys I knew about.

Now I have to work out how this connects to the controller chip.  I see 18 resistors so assumed that would be 1 for each row, but I can't find a connection on the three I've tried tonight.  I hope for better luck tomorrow...

I also see some capacitors of varying sizes - might they be relevant or are they purely for power/clock signals?
« Last Edit: Wed, 10 December 2014, 12:54:23 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #8 on: Tue, 02 December 2014, 22:54:36 »
Resistors are likely pull up/down resistors for the matrix columns I guess the chip doesn't have internal ones. Capacitors are likely not relevant to the switch matrix (you should be able to safely ignore them).

Also: wow you mapped out the whole matrix? That's amazing. excellent excellent work.

Ok so if the whole column is out then there's a break in the column trace somewhere between the controller and where the keys are. If only part of the column is out then there's likely a break elsewhere along the column.

If E F3 D F4 C F2 and 3 are all out then you can wire a jumper from a place on the column to the proper pin on the controller (or close to the controller, before the "break".


If you have the whole matrix mapped out, then you can just skip the controller, get a teensy++ for what looks like an 18*8 matrix and just wire it up to pins. Then your keyboard becomes programmable!

There isn't actually a standard way of mapping out a switch matrix. Your graphic is a lot nicer than some I've seen. You can contrast that to the matrix graphics WYSE put out in the mid 1980's
https://geekhack.org/index.php?topic=51079.msg1125090#msg1125090 Some you can't even read!

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #9 on: Wed, 03 December 2014, 03:10:03 »
Yeah I'm confident that's the whole matrix, it took many hours of listening for beeps!  The only thing I'm not 100% on is the left/right for control and shift keys - should the side be read looking at the keys or the back of the PCB?

Do you know of any program to test keypresses?  I've now realise I can test F4 (alt+F4 = close) but F2 and F3 are pretty useless.  Will take a lot more probing to work out how they connect to the controller to fix but the 18 columns 18 resistors thing can't be a coincidence so I will persevere, ignoring the caps.

As there is only one PCB in this board I can't disconnect the current controller, can I just get a microtorch and remove it?  I took the USB LAN chip off a Raspberry Pi using that method...   My Teensy should be here today, not sure I want to use it in this board though as I still don't know if I like the feel of the switches.  Programmable would be nice, I should type some rubbish and see how I like it.

Also out of interest, is there any reason they didn't put the Shift keys on the top row and Win and Fn on the green row in the middle?  Seems very strange having them all alone...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #10 on: Wed, 03 December 2014, 07:52:32 »
...

Do you know of any program to test keypresses? ...

Aqua Key Test! It intercepts the keypresses and shows you a nice graphic of the keyboard with the status of all the keys. Very handy tool :)

https://geekhack.org/index.php?topic=34670.msg641440#msg641440
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #11 on: Wed, 03 December 2014, 13:02:47 »
Thanks Oobly, Aqua detected all the keys apart from F11 (which maximised my browser) the calculator key (which, unsurprisingly, opened a calculator) and the suspected dead ones.  Not bad considering it was running in Wine under Linux :)

Food then back to the beeper...

[EDIT] Two resistors are between the USB connector and the controller so that's a dead end, and the first beep I got from matrix to controller was from a pin with no visible trace - I'll be using the Teensy.  It still isn't here :(
« Last Edit: Wed, 03 December 2014, 14:15:31 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline vvp

  • Posts: 887
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #12 on: Wed, 03 December 2014, 14:32:15 »
Wine? If you are running the keyboard with Linux then you can do possibly better:
  • xev will show you how the key press is interpreted by XWindow applications
  • usbmon/usbdump will show you the exact content of USB packets sent by your keyboard

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #13 on: Wed, 03 December 2014, 16:55:19 »
Yup, wine.  For all intents and purposes it's a Windows emulator, popular long before running a virtual machine was feasible on a PC and still the only option to run an exe on an old netbook.  xev is an even better option though - thanks!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #14 on: Fri, 05 December 2014, 02:56:53 »
*bump*

Can anyone help with these questions?  Hacking a keyboard is more fun than Christmas shopping so I should probably get this done tonight so I have no excuses for the weekend :))

As there is only one PCB in this board I can't disconnect the current controller, can I just get a microtorch and remove it?  I took the USB LAN chip off a Raspberry Pi using that method...
...
Also out of interest, is there any reason they didn't put the Shift keys on the top row and Win and Fn on the green row in the middle?  Seems very strange having them all alone...

120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Oobly

  • * Esteemed Elder
  • Posts: 3929
  • Location: Finland
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #15 on: Fri, 05 December 2014, 04:02:44 »
It may be okay to remove the controller chip like that, just be careful of not damaging the PCB too much. I assume you'll wire the Teensy to the matrix so don't need any of the old USB and controller circuitry.

It seems they put all the modifiers on almost empty rows, probably because it's easier to program the controller like that or that the controller chip has some limitations that force it to be done like that.
Buying more keycaps,
it really hacks my wallet,
but I must have them.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #16 on: Fri, 05 December 2014, 13:23:34 »

A couple of lifted leg-pads but not too bad.  Hopefully it works!

Sounds like I should read a bit before connecting the modifiers to the spaces in the matrix - thanks :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #17 on: Fri, 05 December 2014, 13:35:35 »
ok so you can wire up the teensy "spaghetti style" Run a wire from each row and column to a pin on the teensy, then you can load TMK_firmware or soarer's KB controller firmare or whatever. Then it's fully programmable as well as NKRO over USB.

Just make sure those lifted traces aren't shorting.

Sice you already know the matrix it'll be super easy to program the new controller.

Very impressive that you got the controller off so nicely.

8*18 matrix needs 26 pins, so I think you might need teensy++ or teensy3 and a different firmware. I forget how many pins normal teensy has.
« Last Edit: Fri, 05 December 2014, 13:37:06 by dorkvader »

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #18 on: Fri, 05 December 2014, 16:01:25 »
I have a ++ 2.0 here ready to go, I can see why they're called Teensy and this is the big model!  Just as well I went for the ++ as (I assume) the status LEDs will also need some pins and the original only has 25. 

The only thing I'm struggling for at the moment is wire.  Might have to sacrifice an Ethernet cable, there's a lot in one of them...

Given that I've never seen any arduino before this I don't even know which "pins" are the data lines so I have a little reading to do but you make it sound very simple, dorkvader :))
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #19 on: Fri, 05 December 2014, 18:09:49 »
I have a ++ 2.0 here ready to go, I can see why they're called Teensy and this is the big model!  Just as well I went for the ++ as (I assume) the status LEDs will also need some pins and the original only has 25. 

The only thing I'm struggling for at the moment is wire.  Might have to sacrifice an Ethernet cable, there's a lot in one of them...

Given that I've never seen any arduino before this I don't even know which "pins" are the data lines so I have a little reading to do but you make it sound very simple, dorkvader :))


Pins are "named" on the sheet you get with the Teensy++. I believe you can use all the ones down the sides and in the center. The three on the end are not data (they are ground, power and the reset button). Just pick a "named" pin and solder a wire to each. People have used ethernet cable successfully in the past.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #20 on: Sun, 07 December 2014, 07:20:14 »
I went with a headphone cable for wires and have now wired up all the keys and one LED.  Plugged it in and it registered as a VOTI and there was no smoke so I guess it's good(ish)

Then I tried it with a 2x2 matrix file and none of the keys registered, so I swapped the Strobe and Sense pins and still nothing typed.  Before I write out the whole matrix can someone tell me which is sense and which strobe?  The diodes are wired to allow voltage from the switch (not sure if that's normal...)

The matrix is below, it worked connecting the pins with tweezers before I'd connecting anything so it should be good.  I think?
Code: [Select]
matrix
   scanrate 1
   debounce 5
   blocking 0

   sense              PF7         PB6
   strobe   PF0        1           2
   strobe   PF1        q           w
end

120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline neverused

  • Posts: 572
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #21 on: Sun, 07 December 2014, 09:15:49 »
Headphone wires are typically coated so your soldering could be affected by that.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #22 on: Sun, 07 December 2014, 10:24:38 »
Headphone wires are typically coated so your soldering could be affected by that.
in a typical headphone, 2 of the wires are enamelled and usually the enamel comes off easily with heat or solder. The third wire is usually bare.

For sense / strobe, here's how it works:
voltage is sent down a "strobe" pin and a "sense" pin reads. When a key is pressed it flows from the strobe pin through the switch into the sense pin.

Practically it just matters which direction your diodes are facing. As long as it's regular it's pretty easy to transpose the matrix if you get the wrong direction the first time.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #23 on: Sun, 07 December 2014, 14:31:56 »
Headphone wires are typically coated so your soldering could be affected by that.
in a typical headphone, 2 of the wires are enamelled and usually the enamel comes off easily with heat or solder. The third wire is usually bare.
It was a nice headphone cable, two uncoated wires with "rubber jackets" each pair in a cloth covered rubber jacket padded with cotton, and the two jacketed pairs in another cloth jacket padded with more cotton - it might have been quicker to walk to town and buy some wire than to free it but I'd take either of those options over playing with enamelled wire so thanks (on behalf of anyone who didn't know about it) for the warning.

Quote
For sense / strobe, here's how it works:
voltage is sent down a "strobe" pin and a "sense" pin reads. When a key is pressed it flows from the strobe pin through the switch into the sense pin.

Practically it just matters which direction your diodes are facing. As long as it's regular it's pretty easy to transpose the matrix if you get the wrong direction the first time.
Perfect, thanks! 
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #24 on: Tue, 09 December 2014, 18:23:00 »
I'm typing this on my Ducky - nearly there :D

The matrix file is not complete though as I can't find a complete list of key names and I don't know what it would be called, and there are three options at the top that are nearly meaningless to me - does Soarer have a website somewhere with documentation?

When all the keys are tested I need to wire up the LEDs then I'll post a pic of my "spaghetti"
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #25 on: Tue, 09 December 2014, 22:14:23 »
I'm typing this on my Ducky - nearly there :D

The matrix file is not complete though as I can't find a complete list of key names and I don't know what it would be called, and there are three options at the top that are nearly meaningless to me - does Soarer have a website somewhere with documentation?

When all the keys are tested I need to wire up the LEDs then I'll post a pic of my "spaghetti"

all the documentation is in the html files distributed with the code.

The "main" documentation is with the converter code http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510.html
The KB controller firmware has "add on" documentation specific to it. http://deskthority.net/workshop-f7/soarer-s-keyboard-controller-firmware-t6767.html

What key names are you having trouble with?

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #26 on: Wed, 10 December 2014, 02:26:06 »

all the documentation is in the html files distributed with the code.

The "main" documentation is with the converter code http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510.html
The KB controller firmware has "add on" documentation specific to it. http://deskthority.net/workshop-f7/soarer-s-keyboard-controller-firmware-t6767.html
That explains why I couldn't find it!

Quote
What key names are you having trouble with?
Off the top of my head:

All the keys in the number pad
Volume controls
Calculator
Print screen
Break
`
'
[
]
alt gr (not that I know what it does...)


I also need to work out how to use the fn key, it's mapped and working, but useless.

Thanks again, I'll have a read tonight.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #27 on: Wed, 10 December 2014, 17:42:15 »
OK, I've had a read and got lots more keys including the numberpad, but num_lock doesn't work so it's only unusable as a second set of arrows.

There are a total of 15 keys still not working, I'll ignore the calculator and 3x volume for now as they are probably weird and not crucial, but the other 11 I remapped to random letters to check the matrix and they all work, so there must be something wrong with the names.  The keys are:

#
LEFT_BRACE
RIGHT_BRACE
PRINTSCREEN
RALT
SCROLL_LOCK
NUM_LOCK
PAD_SLASH
PAD_ASTERIX
BACKSLASH
AUX1 (guess at Windows key)

Does this have anything to do with me using a UK layout or is firmware operating on a lower level?  I tried a generic US layout before mapping to random letters but it didn't work so I assumed that wasn't the problem, but what else it can it be?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #28 on: Wed, 10 December 2014, 19:38:29 »
OK, I've had a read and got lots more keys including the numberpad, but num_lock doesn't work so it's only unusable as a second set of arrows.

There are a total of 15 keys still not working, I'll ignore the calculator and 3x volume for now as they are probably weird and not crucial, but the other 11 I remapped to random letters to check the matrix and they all work, so there must be something wrong with the names.  The keys are:

#
LEFT_BRACE
RIGHT_BRACE
PRINTSCREEN
RALT
SCROLL_LOCK
NUM_LOCK
PAD_SLASH
PAD_ASTERIX
BACKSLASH
AUX1 (guess at Windows key)

Does this have anything to do with me using a UK layout or is firmware operating on a lower level?  I tried a generic US layout before mapping to random letters but it didn't work so I assumed that wasn't the problem, but what else it can it be?
its lgui and rgui for the windows keys, aux is something different.

are you using hid_listen to make sure you're getting output? On mine I've tried those keys and they work for me (linux and windows)

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #29 on: Thu, 11 December 2014, 02:09:50 »
its lgui and rgui for the windows keys, aux is something different.
Thanks, I'll test it tonight :)

Quote
are you using hid_listen to make sure you're getting output? On mine I've tried those keys and they work for me (linux and windows)
No I'm using xev and Aqua as they are already installed.  xev output is pretty meaningless (none of the hex numbers seem to match Soarer's list) but if it registers nothing it definitely doesn't work.

Most of the broken ones are just printable characters anyway, I don't understand how they can work as a letter but not the character I want.
« Last Edit: Thu, 11 December 2014, 02:13:18 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #30 on: Thu, 11 December 2014, 21:54:59 »
What version of the soarer are you using?

Also host OS is *nix I assume from the use of xev ?

I will reprogram my soarer and test. maybe I can find something.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #31 on: Fri, 12 December 2014, 02:35:24 »
I'm doing most of this on a 32bit netbook running a Lubuntu 3.2 kernel, but I did test it in Windows before I added the extra keys and # wasn't working (I don't think any of the others were mapped...)

Version: Soarer_Controller_v1.20_beta4_at90usb1286.hex

I've attached the spreadsheet I'm using to create the matrix as it's easier to read with equal spacing - the yellow ones are dodgy and have been replaced by Xs (which work) in the second version.

Thanks :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #32 on: Sat, 13 December 2014, 18:27:30 »
I have some more strangeness to report after putting my programmers hat on.  Which characters can cause issues in config files?  Just the one that was present in my matrix - #

So I loaded a matrix without # mapped and it works.  Unfortunately my BACKSLASH key became a # key (it detected as backslash in Aqua)  Setting my layout to US has corrected the BACKSLASH key to print a backslash, but then I don't have a # key.

Help?!

EDIT:  Just had an insight - all I need to do is work out what the other key would be if my keyboard were American.  They're so similar yet so different...
« Last Edit: Sat, 13 December 2014, 20:04:15 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #33 on: Sat, 13 December 2014, 20:50:32 »
for soarer, the # is a comment line.

What layout are you using? I think can figure out what key you want.
For example in the documentation the key "EUROPE_1" scancode 0x32 says to use backslash instead. Usually I can figure it out by looking at the different layouts.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #34 on: Sun, 14 December 2014, 03:23:51 »
for soarer, the # is a comment line.
Thought it might be.  The havoc it wreaked on the matrix wasn't that obvious though - it took out keys all over the place!

Quote
What layout are you using? I think can figure out what key you want.
For example in the documentation the key "EUROPE_1" scancode 0x32 says to use backslash instead. Usually I can figure it out by looking at the different layouts.
At the moment I've left it as standard QWERTY UK - I'm planning on changing it to dvorak or colemak but dvorak requires new keycaps and I only heard about colemak so haven't looked into it.  Once I know it works electrically I can wire up the LEDs, case it, and start playing with the firmware.  That is today.

Sounds like I should have actually read the documentation, but I wasn't doing anything fancy so still haven't :-[


EDIT: 
Media keys fixed, they were wired wrongly.
Right click set to APP to get expected pop-up menu

Still to fix - backslash key
Scroll lock LED came on when media keys fixed, no idea why.  Will cut PCB and hardwire it.


EDIT 2:

LED - 550R \
LED - 550R -> 10KR - capacitor - GND
LED - 550R /

I've wired LEDs up before, this circuit is odd...
« Last Edit: Sun, 14 December 2014, 11:58:33 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #35 on: Sun, 14 December 2014, 14:27:30 »
for soarer, the # is a comment line.
Thought it might be.  The havoc it wreaked on the matrix wasn't that obvious though - it took out keys all over the place!

Quote
What layout are you using? I think can figure out what key you want.
For example in the documentation the key "EUROPE_1" scancode 0x32 says to use backslash instead. Usually I can figure it out by looking at the different layouts.
At the moment I've left it as standard QWERTY UK - I'm planning on changing it to dvorak or colemak but dvorak requires new keycaps and I only heard about colemak so haven't looked into it.  Once I know it works electrically I can wire up the LEDs, case it, and start playing with the firmware.  That is today.

Sounds like I should have actually read the documentation, but I wasn't doing anything fancy so still haven't :-[


EDIT: 
Media keys fixed, they were wired wrongly.
Right click set to APP to get expected pop-up menu

Still to fix - backslash key
Scroll lock LED came on when media keys fixed, no idea why.  Will cut PCB and hardwire it.


EDIT 2:

LED - 550R \
LED - 550R -> 10KR - capacitor - GND
LED - 550R /

I've wired LEDs up before, this circuit is odd...
10500R is a little high for an LED on 5V, especially if it's not red. If it is red, then that makes sense.

or wait there's three 550R in parallel chasing a 10K resistor in series? that's weird. I'd just direct wire it.

So if your KB is physically ANSI, then just pretend it's ANSI when programming the soarer, I believe ANSI is converted into the various ISOs by the OS.

If your KB is physically ISO then it probably just has one extra key next to left shift. If you have that working and are only needing the key between enter and " tell the teensy it's the |\ key and see what your OS has to say about that. I believe the \| key in ANSI sends the same scancode to the OS as the "key between " and enter" does on the various ISO layouts.

Actually, realizing that the various ISO layouts might have, y'know, a different layout, I'm talking about the home-row key just to the left of enter.

Hope this helps.

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #36 on: Sun, 14 December 2014, 15:32:20 »
10500R is a little high for an LED on 5V, especially if it's not red. If it is red, then that makes sense.

or wait there's three 550R in parallel chasing a 10K resistor in series? that's weird. I'd just direct wire it.
There are three green LEDs in parallel each with a resistor, then the 10K and a cap in series.  I've just had a play with some loose LEDs (good thinking on the needing a + - works perfectly) and they seem very dim connected to ground, but set - to 5V they're fine.  Still nowhere near as bright as the stock ones though, more experimenting required...

Quote
So if your KB is physically ANSI, then just pretend it's ANSI when programming the soarer, I believe ANSI is converted into the various ISOs by the OS.

If your KB is physically ISO then it probably just has one extra key next to left shift. If you have that working and are only needing the key between enter and " tell the teensy it's the |\ key and see what your OS has to say about that. I believe the \| key in ANSI sends the same scancode to the OS as the "key between " and enter" does on the various ISO layouts.

Actually, realizing that the various ISO layouts might have, y'know, a different layout, I'm talking about the home-row key just to the left of enter.

Hope this helps.
Sadly it doesn't help, the extra key next to enter is working (it's marked #~ but called BACKSLASH) it's the actual \| key bottom left where our shift is smaller that I don't know what to do with, I tried EUROPE_1 as suggested but that doesn't even register with xev.  The key is working physically so I'm going to leave it for now and try and try and sort the LEDs and get it cased up, but it's a very useful key when scripting so will have to work.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #37 on: Mon, 15 December 2014, 01:48:41 »
soarer lists the HID scan codes in his documentation.
0x32 is "europe 1" but use backslash instead works. This is because the backslash scancode is interpreted by the OS as the same ( <- just a theory, but it makes sense. IN all KBs I've seen that support ISO and ANSI, the ISO key next to enter is electrically identical to the key above enter in ANSI. This behavior is also the same as when plugging an ISO KB into a US/ANSI computer and vice-versa)

I looked up the USB HID and PS/2 scancode chart from microsoft:
http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf

Turns out that (note 2):
Quote
These keys have various legends depending upon the locale for which the keyboard is manufactured. Europe 1 is typically in AT-
101 Key Position 42 next to the Enter key. Europe 2 is typically in AT-101 Key Position 45, between the Left Shift and Z keys.

So you're looking for europe 2. According to the microsoft chart it's USB HID scancode is 0x64 which soarer has listed as "EUROPE_2"

Set it to that, should work.

Actually looks like soarer copied his names directly from the USB HID spec (same as the microsoft PDF), which explains a lot.

about the LEDs, I'd just cut the trace and wire them up to the teensy directly with a resistor. I wouldn't bother with whatever they were trying to do (I have some idea but rather than figuring it out, it's faster and easier to just wire them).
« Last Edit: Mon, 15 December 2014, 01:50:32 by dorkvader »

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #38 on: Mon, 15 December 2014, 02:24:32 »
Thanks - I'll change it to 2 tonight and hopefully be done :)

I have hardwired the resistors and fitted a mini USB connector on the stock cable so now num lock works perfectly, caps lock is either dull (didn't notice until the room light was off) or bright so I probably didn't cut one trace fully - it's livable, but scroll lock doesn't work.  Aqua registers a keypress but it's virtual LED doesn't light up either...  Of the three of course I'd take a non functional scroll lock.

After some case internal support trimming (I guess, it had a 1x4" raised grid that put pressure on the teensy) and the loss of half a fingernail I now have a useable keyboard :D
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Thread Starter
  • Posts: 4771
  • Location: England
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #39 on: Mon, 15 December 2014, 17:43:21 »
Europe 2 worked - I have a full keyboard :D

I also opened it up and moved the resistor on the caps LED to the other leg and it's now going out completely as it should.  Scroll lock still doesn't light up but the key registers correctly in Aqua so I'm assuming it works (I still don't know what it does anyway)

Now to set up an FN layer and find out if I actually like it.  So far it's very smooth and light to type with but rather noisy, even without bottoming out the keys.  I should probably type something long to form a proper opinion before reading about the effects of o-rings and different keycap materials...

Thanks again for all your help dorkvader :)
« Last Edit: Mon, 15 December 2014, 18:02:36 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Ducky Zero repair (something wrong with the switch matrix)
« Reply #40 on: Tue, 16 December 2014, 00:15:27 »
Europe 2 worked - I have a full keyboard :D

I also opened it up and moved the resistor on the caps LED to the other leg and it's now going out completely as it should.  Scroll lock still doesn't light up but the key registers correctly in Aqua so I'm assuming it works (I still don't know what it does anyway)

Now to set up an FN layer and find out if I actually like it.  So far it's very smooth and light to type with but rather noisy, even without bottoming out the keys.  I should probably type something long to form a proper opinion before reading about the effects of o-rings and different keycap materials...

Thanks again for all your help dorkvader :)

oh forgot to say: scroll lock doesn't light up the light in *nix by default. Try on wondows or use the "led test" feature of AQT.

No worries, I'm glad you got it working. Seeing your progress really brightened my day.