Looks good, you want a 1.5mm plate to get the switches to clip in though.
Probably the closest key to your jumbo crouch would be a sideways ISO enter?
They're for stabilisers. https://deskthority.net/wiki/Stabiliser check under Cherry or Costar.
If you wire your matrix with diodes, the controller can read every key combination (controller can detect and handle N-Key rollover). For your layout, 8x8 matrix (with a slightly weird matrix) will easily cover all keys, you'd need 16 free pins on the controller (Pro Micro / Teensy 2 have more than enough free pins).
Reporting N-Key rollover to the PC/OS is slightly different, as the "standard" keyboard can only report all-modifiers + 6 key rollover.
Its possible to use a non standard keyboard descriptor for N-key rollover (where each button is a bit in the report, instead of having 6 bytes which cover up-to-6 keys), but this will no longer confirm to the boot protocol for keyboards (so may not work on older OSs and wont work with most BIOSs, cant be used with the USB-PS/2 converters you used to get before USB was common). As a dedicated gaming pad, this shouldnt matter. TMK handles this by having 2 (or more, depending on other options) USB endpoints, 1 is the standard boot keyboard (6KRO) and another is the NKRO endpoint.
Looks good!
Personally, I'd consider swapping R4 to the full row, making R3 a full row, and merging the 5 left over keys (Num5, Num2, F11, F12, Space) into a single row, saving a row on the controller (Extra pin for LEDs, because Blue LEDs make it Gaming ;) ) This would depend on how easy it looked to hand-wire when the switches are in the plate.
6KRO should be enough (gotta be hard to press 6+ keys with 5 fingers), and I seem to recall TMK lets you do NKRO by adding a flag to the config (it handles all the extra stuff needed)
I'd recommend supporting the folks who make the Teensy by just purchasing from them.
https://www.pjrc.com/store/teensy.html
I'd recommend supporting the folks who make the Teensy by just purchasing from them.
https://www.pjrc.com/store/teensy.html
Perfect, thanks. What are the differences between the teensy 2.0 and the teensy ++ 2.0? I see more pins, but not sure if that is relevant.
I'd like to ask a noob question because I'm also trying to understand PCBs.
Your keyboard is hand wired right? I see people using diodes to wire their keyboards. But diodes are basically exposed wires. So how do you prevent diodes from crossing each other when wiring columns across rows?
I'd like to ask a noob question because I'm also trying to understand PCBs.
Your keyboard is hand wired right? I see people using diodes to wire their keyboards. But diodes are basically exposed wires. So how do you prevent diodes from crossing each other when wiring columns across rows?
One way is to strip a piece of wire, grab the dropped piece of insulation & slide it onto the exposed lead you wish to insulate.
I'd like to ask a noob question because I'm also trying to understand PCBs.
Your keyboard is hand wired right? I see people using diodes to wire their keyboards. But diodes are basically exposed wires. So how do you prevent diodes from crossing each other when wiring columns across rows?
One way is to strip a piece of wire, grab the dropped piece of insulation & slide it onto the exposed lead you wish to insulate.
It is like super hard to get wire stuffed back into insulation once you have taken it out. Any suggestions?
You strip a wire slightly larger than the lead you want to protect. In the end the insulation can rattle on the diode lead - it doesn't matter.
#3 User lowpoly created a hard-wiring how-to (https://geekhack.org/index.php?topic=20898.0). That describes how the diodes are used, but basically the diodes connect one of the switch terminals to (typically) the common row wire. And all of the diodes must be oriented the same way.
Does that help?
- Ron | samwisekoi
Auto-typed by my GH-122 keyboard.
Yes, it helps, but can I ask you about this? http://www.lowpoly.com/keyboard/m0110/m0110_120.jpg
I notice that some of the keys are not joined the same way. For instance on the leftmost column, three keys are joined to the row via their right pins, but two keys are joined to the row via their left pins. Also the three visible lowest row keys are linked by right, left, left pins respectively. I dont' understand this.
I'd recommend supporting the folks who make the Teensy by just purchasing from them.
https://www.pjrc.com/store/teensy.html
Perfect, thanks. What are the differences between the teensy 2.0 and the teensy ++ 2.0? I see more pins, but not sure if that is relevant.
There's a chart here, just below the pics. In general, if you don't need the extra pins of the + the regular 2.0 is a better choice. There's a lot more software (compiler) support and lots more folks to ask about problems.
https://www.pjrc.com/teensy/index.html
A few things:
#1 If you can make that Use/Enter key 1.75 wide instead of 2.00, you will eliminate all stabilizers. That will make it much easier for you.
#2 Each switch will always be in the center of its key, so for your wider switches those vertical rows won't be the straight shots you show.
#3 User lowpoly created a hard-wiring how-to (https://geekhack.org/index.php?topic=20898.0). That describes how the diodes are used, but basically the diodes connect one of the switch terminals to (typically) the common row wire. And all of the diodes must be oriented the same way.
Does that help?
- Ron | samwisekoi
Auto-typed by my GH-122 keyboard.
I don't know if this is intended, but I notice all your photos have disappeared from this thread.
Maybe upload them to geekhack instead of to your photo account; that way even when you lose interest in this project and delete your photos we will have photos to see.
I'd suggest adding 1 wire to each row & column that ends in a "pin" (solid core wire of the right thickness will do) that can be inserted into breadboard. Adding pins to the Teensy and experimenting with the firmware (I've got my rows/columns/diodes wrong before)
For the final, a bit of stripboard can join the Teensy pins to the wires, or add sockets (I'm convinced I'll fry a Teensy one day with my soldering skills)
It should be as simple as connect each row to a (output?) pin, and each column to a (input?) pin, tweak the TMK settings and layout, and off you go :)
I had purchased two header pin rails and two sockets exactly for that reason. If I need to move wires or whatever, they are not soldered directly to the board.
Do you have details like the exact specs and the pictures? I found that googling header pin rails got a lot of different pictures.
I'm a noob at this. But you basically solder the header pin rails to the teensy, then plug the wires into the holes like a breadboard right? I think soldering individual wires to the teensy would be very hard.
I installed Virtuabox, installed an ubuntu image, and can log into the virtual machine via putty on Windows 10.Logging through putty is an extra hassle if you ask me. You might want to share a folder between the virtual machine and your Windows' drives, I did that and it works. Google has plenty of tutorials for that.
Now I have no idea what to do from there. Is there a how-to somewhere? Like, copy these files to a directory, change these files to represent your keystrokes, then compile it like so, and burn the firmware by doing this.
Now try to edit the config.h / matrix.* / keymap.* to get the rows/columns/keymap you want.
- lots of docs, examples and help on https://geekhack.org/index.php?topic=41989.0
- config.h - change MATRIX_ROWS and MATRIX_COLS to 8 and PRODUCT_ID, MANUFACTURER, PRODUCT and DESCRIPTION for clarity
- matrix.c - change init_cols, read_cols, unselect_rows and select_row to match your pins
- keymap(_common).h - change the KEYMAP macro to match your layout (at least in rows/columns)
- keymap(_plain).c - change the keymaps array to use your new KEYMAP macro and the key definitions you want.
#define MATRIX_ROWS 7
#define MATRIX_COLS 8
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7
* pin: B2 B3 B7 D0 D1 D2 D3 C6
*/
static void init_cols(void)
{
DDRF &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
DDRD &= ~(1<<3 | 1<<2 | 1<<1 | 1<<0);
PORTD |= (1<<3 | 1<<2 | 1<<1 | 1<<0);
DDRC &= ~(1<<6);
PORTC |= (1<<6);
DDRB &= ~(1<<7 | 1<<6 | 1<<3 | 1<<2);
PORTB |= (1<<7 | 1<<6 | 1<<3 | 1<<2);
}
static matrix_row_t read_cols(void)
{
return (PINB&(1<<2) ? 0 : (1<<0)) |
(PINB&(1<<3) ? 0 : (1<<1)) |
(PINB&(1<<7) ? 0 : (1<<2)) |
(PIND&(1<<0) ? 0 : (1<<3)) |
(PIND&(1<<1) ? 0 : (1<<4)) |
(PIND&(1<<2) ? 0 : (1<<5)) |
(PIND&(1<<3) ? 0 : (1<<6)) |
(PINC&(1<<6) ? 0 : (1<<7));
}
/* Row pin configuration
* row: 0 1 2 3 4 5 6
* pin: F0 F1 F4 F5 F6 F7 B6
*/
static void select_row(uint8_t row)
{
// Output low(DDR:1, PORT:0) to select
switch (row) {
case 0:
DDRD |= (1<<0);
PORTF &= ~(1<<0);
break;
case 1:
DDRD |= (1<<1);
PORTF &= ~(1<<1);
break;
case 2:
DDRD |= (1<<2);
PORTF &= ~(1<<4);
break;
case 3:
DDRD |= (1<<3);
PORTF &= ~(1<<5);
break;
case 4:
DDRD |= (1<<5);
PORTF &= ~(1<<6);
break;
case 5:
DDRD |= (1<<5);
PORTF &= ~(1<<7);
break;
case 6:
DDRD |= (1<<5);
PORTB &= ~(1<<6);
break;
}
}
/* Row pin configuration
* row: 0 1 2 3 4 5 6
* pin: F0 F1 F4 F5 F6 F7 B6
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRD &= ~0b00101111;
PORTD &= ~0b00101111;
}
I am not sure what to put in the "unselect_rows" for my row matrix. Bit shifting is definitely not my strong suit.You have to unselect all the rows you're using by setting them to 1. The code reads from right to left of ~0b (i.e. from pin 7 to 0).
/* Row pin configuration
* row: 0 1 2 3 4 5 6
* pin: F0 F1 F4 F5 F6 F7 B6
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRB &= ~0b01000000;
PORTB &= ~0b01000000;
DDRF &= ~0b11110011;
PORTF &= ~0b11110011;
}
I am not sure what to put in the "unselect_rows" for my row matrix. Bit shifting is definitely not my strong suit.You have to unselect all the rows you're using by setting them to 1. The code reads from right to left of ~0b (i.e. from pin 7 to 0).
It's easy, but if you're lazy, here's your code:MoreCode: [Select]/* Row pin configuration
* row: 0 1 2 3 4 5 6
* pin: F0 F1 F4 F5 F6 F7 B6
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRB &= ~0b01000000;
PORTB &= ~0b01000000;
DDRF &= ~0b11110011;
PORTF &= ~0b11110011;
}
Thanks, but what a totally uncalled for comment. I am certainly not lazy, and don't ask a question on here until I have read a bunch and looked at examples and tried to figure it out, but when you have never done it, it can be confusing. You download the source, and there are hundreds of files with code that might as well be chinese for some people, and spend hours looking through it, then when you can't figure it out and ask a question, some douche with a patronizing attitude wants to slam you on a public forum. I am sure you have just learned everything ever all on your own, so good for you, but your skill set and mine obviously don't align.Frankly, I didn't mean to make fun of you, my bad if it sounded like that.
I see you added a row for the B ports, and the F ports, but what about the C port?You don't have rows on any C pin, only on B and F, by the look of the code you posted.
From the GH60 matrix.c, how does ~0b00101111 equate to 'D0 D1 D2 D3 D5'?Focus on the bit to the right of ~0b, i.e. 00101111.
Thank you for the apology, I probably went overboard in my response, and was talking as much from frustration at not "getting it" as anything.It was a mere misunderstanding. It's ok.
So it is not bit shifting, just a flag that increments from right to left?Correct.
So F0, F1, F5, F6 in an 8 row set would be ~0b00110011?~0b01100011
D7 D6 D5 D4 D3 D2 D1 D0
~0b0 0 1 0 1 1 1 1
It does look like your setting port F and B6 unnecessarily in the init_cols call too...
Do you mean Right Alt and Right Shift? Conceptually they perform the same action, but report as different keys, so can be interpreted differently.
Some regional keyboard settings tend to treat RAlt differently (as AltGr https://en.wikipedia.org/wiki/AltGr_key), mainly producing accented letters in combinations.
Games may also treat this as different, but I'm not sure on examples and how they differ.
The keymap does look good, covers most of the keys commonly used, and has enough other keys for remapping if needed. :)
sh: 1: dfu-programmer: not foundInstall the programmer:
sudo apt-get install dfu-programmer
It is creating a gh60_lufa.elf file, so I am assuming it compiled. So no how do I actually get it on the teensy?You need to flash the hex file. You're not compiling it because of the previous issue.
sudo dfu-programmer atmega32u4 erase --force
sudo dfu-programmer atmega32u4 flash your.hex
sudo dfu-programmer atmega32u4 reset