Agreed... shame about the capacitor... is there any space on top to put it with a couple vias?There won't be a problem moving. Only for the prototype we need to play around.
Or just move the cap a little.
Not that we know of yet. I believe that Komar was just giving examples of what to put in those categories.Yes.
Agreed... shame about the capacitor... is there any space on top to put it with a couple vias?Vias still needs a hole with traces through it. Since these are all SMD, I don't think you can use vias. I think we can just solder a small wire to each of the pad on the PCB, and solder the other side of the wire to the cap.
Or just move the cap a little.
Can you flash the Aurduino bootloader via USB or do we need to go all jtag on it's ass?No, you can't flash bootloader with a bootloader, so you have to use SPI. JTAG isn't available, because I didn't make headers;)
Thanks,
Red
EDIT: so we have one fitting plate...It is original poker layout, ANSI with 1.25 mods.
Which layout is it? Standard ISO, 1.25 mods?
Well, the main reason was to avoid overlapping of main holes and PCB mounting pins. If we give that up, the switches could be all rotated correctly, I'm just not sure we want that.
Some switches are aligned with rotating 90 degree, my keycaps fit into these switches a bit tightly.
No problem with Poker stock plastic case but screw hole between Tab and Q may be a bit out of alignment to the left in comparison with Poker? I think the hole of Poker PCB is also not perfect. My suggestion is to change form of the hole to oval like others, in the result you may be able to adjust positon of PCB to various cases even with tiny misalignment.Maybe that's a good idea... Everyone could just fiddle with the board to get perfect centering, especially with the cases differing from each other a bit.
Nice write up Whitefiredragon, I only used my iron and did find it quite difficult. I think the pads on the X1 should be enlarged to allow for soldering stations.
SMD soldering for GH60 is not relevant because the final production boards will come with SMC presoldered on. The only reason that I have to do the SMD soldering is because these are all prototype boards and it's not cost effective only have a few prototype boards soldered at the factory.
To clearify, for the real production run, the things which we have to solder ourselves are the switches and the LEDs, nothing else, correct? I just want to be sure as I don't know if for instance the USB plug is considered to be SMD. Has it been cleared with a fab yet or is it just the plan for now?The plan is that the buyers have to solder only switches, THT resistor and caps lock LED. I haven't decided for an assembly fab yet, so that's just plans. I'm getting back to the project again today or tomorrow, and I'll be figuring this all out.
Very cool. I can't wait! Thank you once more Komar!There's nothing to thank for so far:D
Nice write up Whitefiredragon, I only used my iron and did find it quite difficult. I think the pads on the X1 should be enlarged to allow for soldering stations.
I got a chance to try komar's firmware linked in the OP. It still has a few bugs in the modifier keys. I also flashed it with hasu's hex file and the first layer worked perfectly fine for a poker layout. I don't have switches soldered on yet so I haven't tried the function layer yet.There's probably a problem with column 9 - but the keys that shouldn't work are: 8, I, K, M (I instead of L...).
Also one of the PCBs might have a broken trace, or possible the atmega chip is a dud. The switches that corresponds to keys 8, L, K, and M does not respond. The corresponding diodes for these are D41, D42, D43, and D44. I can't visually see any bad traces though. Still trying to see what's wrong with this area.
I wonder if there's anyone going to beta-test the ISO layout... Or will komar007 build one of each anyway?I'll check if the switches fit where they should, but won't build one. I hate ISO:)
Ah sorry that was a typo. L is fine, it's 8, I, K, M that are not responding. I reflow everything and even replaced one of the diode to check. It must be a trace or the atmega chip. I don't see anything wrong with the traces connecting these switches, so it's probably near the atmega pin. Which one is pin 8 of the atmega?Please see the ATMega32U4 documentation (http://www.atmel.com/Images/7766S.pdf, page 3). Check continuity with a multimeter between pin 8 and right sides of all diodes on this net. Maybe the via near D44 is broken for example.
Ah sorry that was a typo. L is fine, it's 8, I, K, M that are not responding. I reflow everything and even replaced one of the diode to check. It must be a trace or the atmega chip. I don't see anything wrong with the traces connecting these switches, so it's probably near the atmega pin. Which one is pin 8 of the atmega?Check continuity with a multimeter between pin 8 and right sides of all diodes on this net. Maybe the via near D44 is broken for example.
wfd, are you local to socal?
also can you resend your PM to this account?
I'm going to change out the USB mini B connector for a micro B. I think all mico B connectors only has 2 "arms" to solder onto the PCB pads, but the PCB currently has 4. The positions might be different so it might not work. Can you verify that these parts will be ok?
USB micro B (http://www.mouser.com/ProductDetail/FCI/10118192-0001LF/?qs=sGAEpiMZZMulM8LPOQ%252byk2%252bTbV8%2f2X5vivRX5xKgOBI%3d) (SMT, bottom mounted, receptacles)
Atmega32U4-AU (http://www.mouser.com/ProductDetail/Atmel/ATMEGA32U4-AU/?qs=sGAEpiMZZMvqv2n3s2xjsYzXfq0AWv1C4u5a33SlKLw%3d)
Noooooooooooo! Heh, just kidding. I don't mind, but USB micro would have been nice.
I'm going to change out the USB mini B connector for a micro B. I think all mico B connectors only has 2 "arms" to solder onto the PCB pads, but the PCB currently has 4. The positions might be different so it might not work. Can you verify that these parts will be ok?
USB micro B (http://www.mouser.com/ProductDetail/FCI/10118192-0001LF/?qs=sGAEpiMZZMulM8LPOQ%252byk2%252bTbV8%2f2X5vivRX5xKgOBI%3d) (SMT, bottom mounted, receptacles)
Atmega32U4-AU (http://www.mouser.com/ProductDetail/Atmel/ATMEGA32U4-AU/?qs=sGAEpiMZZMvqv2n3s2xjsYzXfq0AWv1C4u5a33SlKLw%3d)
I'm afraid all USB micros have the same pin pitch, which is different than the one in USB minis...
I don't think USB micro can be done on this board without redesigning it.
I wonder if there's anyone going to beta-test the ISO layout... Or will komar007 build one of each anyway?I'll check if the switches fit where they should, but won't build one. I hate ISO:)
Received my GH60 in the mail today and promptly assembled it.
Thoughts:
1. I need to reprogram the firmware (hasu's) that WFD loaded on it. I assembled a 1.5 mod layout, and the R_ALT key acts as R_WIN.
2. If using a 7x spacebar with Cherry stabilizers, you might want to install a stronger spring/switch for the SPACE. I used all browns, and the spacebar has a lazy reset.
Other than that, everything seems to work great. Once the rest of the beta testers assemble theirs and test them, I think we are ready to proceed with a group buy.
Great job, komar! And thanks for the SMD assembly, WFD!Show Image(http://i.imgur.com/7VB2y.jpg)
2. If using a 7x spacebar with Cherry stabilizers, you might want to install a stronger spring/switch for the SPACE. I used all browns, and the spacebar has a lazy reset.
Yes, he did, but you wouldn't be able to find it by searching for "GH60." He never calls it by name, only "komar 60% board." I guess GH is so universally hated at DT you can't even say GH60 there.I'm just giving credit to the person who's done all the work so far. I don't hate geekhack, but some of the people are difficult to get on with. I don't think geekhack is universally hated at deskthority either. I'm sure if someone posts a thread on there to offer the gh60 it would be very well received.
Does the ATMEGA32U come with the DFU firmware already on it like the instructions infer?I'm sorry to read that.
I'm unable to get the IC to enumerate as a DFU device, I get "Unknown Device" and "Device is malfunctioning".
I've gone over every single connection and discrete and even hooked up the oscillator to an oscilloscope to check that that was running and everything checks out.
Any suggestions as to where to go next?
Thanks
Red
Maybe check for solder bridges behind the atmega's legs and verify everything with a DMM.
If you're on windows, check what USBlyzer has to say about it.
If you run out of ideas, try to connect to SPI with an AVR programmer if you have one (or make one, like USBasp) and try if you can communicate with the device.
Electrically, the first thing to check would be the D+ and D- resistors R1 and R2 and the crystal. Since the crystal works, check that VCC is 5V and stable.
You can also hook up stabilized 5V (without the usb connector) to VCC and GND pins under the logo. The one under "o" in ".org" is GND and the one under "pr" in "programmable" is VCC. Check that the device drives about 26.5mA.
Then, while still supplying the voltage, press the programming button. The current consumption should drop to about 10mA and then slowly rise and settle at about 16mA.
I hope that if the chip is broken we can see it by observing the currents.
Yeah, I'm pretty sure my p2p range is very different which may very well point to a problem.It's pin 17. Pin 16 looks similar, but p2p is a bit smaller.
Is that pin 16 or pin 17 you measured that from?
Also - nice scope, what is it?Voltcraft DSO-3062C (aka Hantek DSO5062M, Tekway DST1062B)
Also, I'm about to re-purchase the BoM. Any changes from the latest in github that I need to know about?I've just pushed, but what was before seems correct.
Thanks for taking the time!
EDIT: Where did you source your ASX3F? I'm having issues finding a supplier.Unfortunately in a local shop.
You never stated if you got FLIP and drivers installed, but I would assume you have from the steps you've taken already Red.It shouldn't really matter, the device doesn't enumerate at all:(
Oh...whoops. That's a shame...:(You never stated if you got FLIP and drivers installed, but I would assume you have from the steps you've taken already Red.It shouldn't really matter, the device doesn't enumerate at all:(
Some laser-porn... Prototyping in plywood as it smells like campfires instead of ass:
Some laser-porn... Prototyping in plywood as it smells like campfires instead of ass:
I recorded two separate prototype soldering, one with hot air only and with iron only.
I recorded two separate prototype soldering, one with hot air only and with iron only.
watching your video(s) right now while i'm working :)
A little teaser of the GUI:+1 ;D
(Attachment Link)
No, I have my own.does it support all the same stuff that hasu's does other wise it the best option would probably be modifying his
What does hasu's firmware support?suports media keys, mouse buttons, NKRO, multiple layer both toggle and non
I don't know much about it.
BTW I don't think we need one "official" firmware. The more the merrier;)
A little teaser of the GUI:thumbs up!!!
(Attachment Link)
BTW I don't think we need one "official" firmware. The more the merrier;)
I don't have media keys and mouse buttons yet, but I was planning on doing it anyway.yea just though you could focus on the GUI if you used a firmware thats already been developed
Mine supports uploading new layout in less than a second, directly from the GUI;)
A little teaser of the GUI:
(Attachment Link)
so far everyone that has programmed for that teensy or that chip at least in our community has shared their code I dont know where exactly it is though...A little teaser of the GUI:
(Attachment Link)
Got teased here :D
I also have 2 questions:
1. Will it be possible to, for exemple, press the capslock to go to a specific layer on the first press, stay on that layer, and come back to the original layer on the second capslock keypress?
2. What do you use for coding language? Will you share the code or make it open source or something like that at some point?
Thx a lot for doing this by the way!!!
So,
My oscilloscope shows me that my crystal is oscillating at 50khz as well as 16mhz. The amplitude of the 50khz is greater than the other by quite a margin.
That's bad.
Also, I borrowed a logic analyzer with built-in protocol decoder and the host attempts to sync but the atmega never responds.
Replacement discretes should arrive tomorrow. Will post again when I'm working.
Yes
1. Will it be possible to, for exemple, press the capslock to go to a specific layer on the first press, stay on that layer, and come back to the original layer on the second capslock keypress?
2. What do you use for coding language? Will you share the code or make it open source or something like that at some point?Coded in C. Most probably yes.
Thx a lot for doing this by the way!!!
Great!
I replaced C1, C2, C3, C7, R5 and the Crystal. It immediately fired up. I was able to type a few characters so the firmware is cool too.
My 17" LCD for my Propeller Pi laptop is on its way. Once that's measured and a frame built for it I can then find a small, maybe 7" VGA or Composite Video LCD for the propeller. Then I can machine and build the frame to support the keyboard.
I'm stoked!
If i were a betting man, I'd guess wrong values of capacitors across the crystal or a dud crystal.
My human error is more likely than a crystal failing qa imho.
Another batch of prototype boards when out yesterday. I'm down to the last few before I build mine, after that the real testing can begin for me.i dont think i paid for mine yet... could you send me an invoice?If i were a betting man, I'd guess wrong values of capacitors across the crystal or a dud crystal.
My human error is more likely than a crystal failing qa imho.
If it was indeed it was a defective crystal, I'm just glad that one defective part whet to you haha. If it was one of the 12 that I had to solder, I wouldn't have known what to do. At least you have an oscilloscope to test it. I only have a DMM. I'm glad you got it all figured out.
#2 and #3 have all 4 corners and the whole top and bottom to lock in the switch. It's not moving anywhere. These can only be mounted in 2 directions though. I have 40 TKL plates with this design.
#1 would work. It's an overlay of #2 and #3, and I specified the middle tabs to be just long enough so top and bottom of the switch can lock no matter what orientation you mount it. All 4 corners also hold the from any movement.
I'm not sure you fully understand how those hole cutouts work. What exactly do you have in mind for "conventional" holes?
With tinkering with The_Beast's Poker Plate with MX I found MX has different width at its corner.
My cheap caliper says horizontal width is 13.80mm while 12.95mm at vertical.
This difference causes kind of wiggle when you place MX at 90deg or 270deg rotation in Poker Plate. Unfortunately Poker Plate has a bit too short width of middle tabs to hold at firm part of bottom case not only at lock spring.
Not to mention, Poker Plate works well with proper rotation of switch. This is not a complain about Poker Plate.
I like #1 - Even if the key doesn't lock into the plate, size it correctly and there will be enough friction to keep it in there very tightly.
It's a trade-off between a situation where the key barely locks and is barely prevented from moving on one hand, and where the key is firmly locked into place with maximum support on all sides. If the lasercutting (or worse cnc) screws up a corner, the key is only supported by pcb and the plate is (for that key) useless. If you're using pcb mount keys you have some slack, but plate mounted keys leave no room for error.
Maybe you should run a prototype.
With tinkering with The_Beast's Poker Plate with MX I found MX has different width at its corner.
My cheap caliper says horizontal width is 13.80mm while 12.95mm at vertical.
This difference causes kind of wiggle when you place MX at 90deg or 270deg rotation in Poker Plate. Unfortunately Poker Plate has a bit too short width of middle tabs to hold at firm part of bottom case not only at lock spring.
Not to mention, Poker Plate works well with proper rotation of switch. This is not a complain about Poker Plate.
Though 4 corners of #1 is not enough to hold firmly, with proper middle tabs #1 would work.
Is there an official GB thread for this?no yeat the board is still in betatesting
285mm x 94mm, USB port's center is 17.57mm from the left.
Thanks, how thick is the PCB and how thick is the PCB w/ the USB?
Humm, I'm strongly against the rotated switches...
To me such "workarounds" are against "an engineers pride" n producing a quality product, if that makes sense.
But then again, I'm from Germany and my profession is to build high speed trains, so my thinking might be biased :D
Humm, I'm strongly against the rotated switches...Well this is a decision to be made between rotated switches and overlapping drill holes, which means soldering to an incomplete, not fully metalized pad.
To me such "workarounds" are against "an engineers pride" n producing a quality product, if that makes sense.
But then again, I'm from Germany and my profession is to build high speed trains, so my thinking might be biased :D
Kind of boils down to how many people are wanting to use this without a plate.
Humm, I'm strongly against the rotated switches...Well this is a decision to be made between rotated switches and overlapping drill holes, which means soldering to an incomplete, not fully metalized pad.
To me such "workarounds" are against "an engineers pride" n producing a quality product, if that makes sense.
But then again, I'm from Germany and my profession is to build high speed trains, so my thinking might be biased :D
The question remains: what is worse, rotated switches and tight keycaps or less durable, harder to solder joints + lack of one PCB support pin on most switches.
I honestly don't know...
I don't like plates, but if it is decided to go with redesign so plate required, I can just be happy with my prototype and not get anymore.
Which ones?I believe my WASD has some in the right side mods i know for sure that the SteelSeriees 7G i used to have had that as well
I've only seen 180 degree rotations.
Yeah, the in-switch jumper wire idea would be great. Then I wouldn't have to remove the jumper wire from all these PCB mount switches.But that would be just for modifiers.
If it's made of wood, count me interested:D
beast can you make a stainless case? :DIf it's made of wood, count me interested:D
Alum, wood maybe later
Can someone tell me about how far the USB port will hang off the PCB?
Can someone tell me about how far the USB port will hang off the PCB?
Depends on how you solder it. The ones for the prototpe boards are fully surface-mounted, and the pads allow for quite a bit of variability. It can be mounted to stick out anywhere from 1.80mm to 4.00mm and still work fine. All the ones I soldered and sent out stick out about 2.15mm. For reference, both Poker and Pure stick out 2.60mm. They're through-hole, so that's not variable.
Interested in what case design you come up with, although I think I have an idea. My CAD file is pretty much done too, so maybe we can converge the design.
lol kmiller I though that first paragraph might have been german at firstI thought it was written in Prof. :P
i swear its the keyboard not me :Plol kmiller I though that first paragraph might have been german at firstI thought it was written in Prof. :P
after tearing apart a "practically filco" QFR for blue switches, I was HIGHLY disappointed with the PCB quality, but that's just a rant for another day.
Actually the QFR PCB is nearly identical to the Majestouch 1 Filco, the 2 is where they went dual-layer. Carter says CM chose single layer PCB on purpose after testing a bunch of variants.
@kmiller8, you might have heated it too much so the glue holding the pads (if you can even call it that...) of the switch pins will lift a lot easier. Compounded with the fact that you might not have gotten all the solder off the switch pins/traces before pulling the switch out. 10 out of 87 keys is not a very good error ratio lol. And what kind of torture test did you put the PCB through?
kmiller8, looks like you may have soldered the switches for R_ALT and R_WIN in the wrong positions? I dunno, maybe it's just how I'm looking at it. I see you placed the Caps Lock in the "Cherry" position, though. Nice. :)
Yeah, if you and I can make these things with our crap Radio Shack equipment (I had to desolder every switch from my board as well, to install the plate), anyone should be able to do it. ;D
/* Layer 1: Poker mode
* ,-----------------------------------------------------------.
* | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |
* |-----------------------------------------------------------|
* | | |Up | | | | | | | | |Hom|Ins| |
* |-----------------------------------------------------------|
* | |Lef|Dow|Rig| | |Psc|Slk|Pus| | |End|Enter |
* |-----------------------------------------------------------|
* |Shift |Del| | |Mut|Vl+|Vl-| |PgU|PgD|Del|Shift |
* |-----------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Alt |xxx |Crtl|
* `-----------------------------------------------------------'
*/
2.2 Layer Actions
This sets default layer into current layer. With this action you can return to default layer.
ACTION_LAYER_DEFAULT
Layer Set action sets given layer argument to current layer. Layer Set action can take 0 to 15 as argument.
ACTION_LAYER_SET(layer)
ACTION_LAYER_SET_TOGGLE(layer)
ACTION_LAYER_SET_TAP_KEY(layer, key)
ACTION_LAYER_SET_TAP_TOGGLE(layer)
Layer Bit action XOR bits with current layer. Layer Bit action can take 0 to 8 as argument.
ACTION_LAYER_BIT(bits)
ACTION_LAYER_BIT_TOGGLE(bits)
ACTION_LAYER_BIT_TAP_KEY(bits, key)
ACTION_LAYER_BIT_TAP_TOGGLE(bits)
These acitons change default layer. ACTION_LAYER_SET_DEFAULT(layer) ACTION_LAYER_BIT_DEFAULT(bits)
The pads are not tinned, but they're gold-plated. That's enough for easy soldering.
i actually have a pretty clean solution, but don't have the parts to implement it yet.
take a second plate (luckily, imav has tons), and use that to apply force on the switches against the PCB using the retainer holes. parts needed are: extra plate (1), M2x16 (or longer) machine screws, matching nuts and washers. tighten in a cross pattern. the switches should all lock in using this method.
ok my board works ootb; thanks for loading a firmware wfd. i think i reversed the polarity on the caps LED though. i followed the polarity diagram on the bottom of the switch since the pads were all circular and didn't indicate polarity. did you follow the switch diagram in the layout kumar? if not, maybe you should make one of them square and/or add a silkscreen for the pads that are pos
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Poker Layer
*/
/* Layer x000: Default Layer
* ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
* |-----------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
* |-----------------------------------------------------------|
* |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
* |-----------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
* |-----------------------------------------------------------|
* |Ctrl|Alt | Space |Fn |Gui |App |Ctrl|
* `-----------------------------------------------------------'
*/
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LALT, SPC, FN2, RGUI,APP, RCTL),
/* Layer x001: Arrow */
KEYMAP_ANSI(
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,UP,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS, TRNS, FN2,TRNS,TRNS,TRNS),
/*
* Momentary Fn Layer
*/
/* Layer x100: Default + Fn'd */
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,TRNS, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP, TRNS, \
TRNS,TRNS, TRNS,FN0,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN, TRNS, \
TRNS,TRNS, TRNS, FN2, TRNS,TRNS,TRNS)
};
/*
* Fn action definition
*/
static const uint16_t PROGMEM fn_actions[] = {
/* Layout */
[0] = ACTION_LAYER_BIT_TOGGLE(1), // FN0 Arrow toggle(C)
[2] = ACTION_LAYER_BIT(4), // FN2 Fn
};
static const uint16_t PROGMEM fn_actions[] = {
/* Layout */
[0] = ACTION_LAYER_BIT_TOGGLE(1), // FN0 Arrow toggle(C)
[2] = ACTION_LAYER_BIT(4), // FN2 Fn
};
static const uint16_t PROGMEM fn_actions[] = {
/* Layout */
[0] = ACTION_LAYER_SET_TOGGLE(1), // FN0 Arrow toggle(C)
[2] = ACTION_LAYER_SET(2), // FN2 Fn
};
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Poker Layer
*/
/* Layer x000: Poker Default Layer */
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LALT,NO, SPC, FN0, RGUI,APP, RCTL),
/*
* Poker Momentary Fn Layer
*/
/* Layer x100: Poker Default + Fn'd */
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,FN1, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP, TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN, TRNS, \
TRNS,TRNS,NO, TRNS, FN0, TRNS,TRNS,TRNS)
};
/*
* Fn action definition
*/
static const uint16_t PROGMEM fn_actions[] = {
/* Poker Layout */
[0] = ACTION_LAYER_BIT(1), // FN0 Fn
};
I declared a new state in keyboard.c named STANDBY, added it to the state machine in process_key() and do the processing there. The only downside it has right now is that I evaluate in the same function if the keyboard is in STANDBY or not. I can imagine that this part could be in another place to be more efficient
I'm used to be able to press any key at all on any other keyboard to wake the pc don't need a special key, and I have it disable on my mouse to wake the pc because it would wake it randomly.
But I never need to do that on any other keyboard. Any key will wake the pc using any of my Poker, Cherry G80, etc. Only the GH60 does not wake it. So while I am not sure why, I view it as a 'bug' as it is a basic function in my opinion and certainly a nuisance for me that it is not working.
I'm used to be able to press any key at all on any other keyboard to wake the pc don't need a special key, and I have it disable on my mouse to wake the pc because it would wake it randomly.
komar, really really great work!
I confirmed your app on a tad old xubuntu, I need to install 'python3-minimal' and 'python3-tk' packages for this test.
Writing layout binary from GUI worked flawlessly and quickly. Editing layout also worked well except for one problem.
My problem is that I couldn't define 'layer action without scancode', I just want to change layer without sending any key. I know your gh60.lay has such key on key 57 but I couldn't change existent key(key 61) into such normal layer change key.
Any thoughts on the FN layer?
Is it feasable to program it this way?
Link (http://ne0.cc/laygen/#%60%7E%3A%3A1%20%20F1%3A%3A1%20%20F2%3A%3A1%20%20F3%3A%3A1%20%20F4%3A%3A1%20%20F5%3A%3A1%20%20F6%3A%3A1%20%20F7%3A%3A1%20%20F8%3A%3A1%20%20F9%3A%3A1%20%20F10%3A%3A1%20%20F11%3A%3A1%20%20F12%3A%3A1%20%20Del%3A%3A2%24%24%0A%3A%3A1.5%20%20PgUp%3A%3A1%20%20Home%3A%3A1%20%20%5E%3A%3A1%20%20End%3A%3A1%20%20%3A%3A1%20%20%20%3A%3A1%20%20%20PrScr%3A%3A1%20%20%20Pause%3A%3A1%20%20%207%3A%3A1%20%20%208%3A%3A1%20%20%209%3A%3A1%20%20%20-%3A%3A1%20%20%20+%3A%3A1.5%24%24%0A%3A%3A1.75%20%20PgDn%3A%3A1%20%20%20%3C%3A%3A1%20%20%20v%3A%3A1%20%20%20%3E%3A%3A1%20%20%20%3A%3A1%20%20%20Back%3A%3A1%20%20%20Play/Pause%3A%3A1%20%20%20Next%3A%3A1%20%20%204%3A%3A1%20%20%205%3A%3A1%20%20%206%3A%3A1%20%20Enter%20%3A%3A2.25%24%24%0A%3A%3A2.25%20%20%20Del%3A%3A1%20%20%20Mute%3A%3A1%20%20%20VolDn%3A%3A1%20%20%20VolUp%3A%3A1%20%20%20%3A%3A1%20%20%3A%3A1%20%20%3A%3A1%20%20%3A%3A1%20%20%201%3A%3A1%20%20%202%3A%3A1%20%203%3A%3A1.75%20%20FN%3A%3A1%20%24%24%0A%3A%3A1.25%20%20FN%3A%3A1.25%20%20%3A%3A1.25%20%20SDK60%3A%20FN%20layout%3A%3A6.25%20%200%3A%3A1.25%20%20FN%3A%3A1.25%20%20%20.%3A%3A1.25%20%20Enter%3A%3A1.25%24%24)
Ok so after a few weeks of testing my board. I have two things.We'd need an idea how to implement it... Since you only know if the press is long or short after you've released the button:D
1. Would there be a way to make the Fn button act as a windows key on a short-press, but FN for holding? I have it ingrained in my head to use the left windows key for Win+R and many other windows functions.
2. \\ not sure if that's the cap or the FW \\ It's been like that since day 1 \\ these were brand new blue switches \\ so I don't think there's anything wrong with them, but I could be mistaken since I seem to be the only one with the \\ problem. \\\\\\\\\\\\\\\\ granted, now i can type \\ twice as fast :pWhich FW and OS are you using?
We'd need an idea how to implement it... Since you only know if the press is long or short after you've released the button:D
The best I can think of is to delay the keypress until either the threshold has been reached or the key was released before it, in which case press and release events have to be sent instantly.
Which FW and OS are you using?
There's a bug in the linux hid support which causes something like that (2 codes mapped to this key). Not sure this is the case here, since this rather caused immediate key release behaviour...
EDIT: on the other hand the solution to this problem is to send both codes at once, which may, in turn, cause windows to freak out and see the keypress twice... I don't know.
Unfortunately, I've just found out it doesn't work on win7 and 8:/
I have no idea about windows, so I ask for help.
Thanks, I'll look into hasu's FW. :)Any thoughts on the FN layer?
Is it feasable to program it this way?
Link (http://ne0.cc/laygen/#%60%7E%3A%3A1%20%20F1%3A%3A1%20%20F2%3A%3A1%20%20F3%3A%3A1%20%20F4%3A%3A1%20%20F5%3A%3A1%20%20F6%3A%3A1%20%20F7%3A%3A1%20%20F8%3A%3A1%20%20F9%3A%3A1%20%20F10%3A%3A1%20%20F11%3A%3A1%20%20F12%3A%3A1%20%20Del%3A%3A2%24%24%0A%3A%3A1.5%20%20PgUp%3A%3A1%20%20Home%3A%3A1%20%20%5E%3A%3A1%20%20End%3A%3A1%20%20%3A%3A1%20%20%20%3A%3A1%20%20%20PrScr%3A%3A1%20%20%20Pause%3A%3A1%20%20%207%3A%3A1%20%20%208%3A%3A1%20%20%209%3A%3A1%20%20%20-%3A%3A1%20%20%20+%3A%3A1.5%24%24%0A%3A%3A1.75%20%20PgDn%3A%3A1%20%20%20%3C%3A%3A1%20%20%20v%3A%3A1%20%20%20%3E%3A%3A1%20%20%20%3A%3A1%20%20%20Back%3A%3A1%20%20%20Play/Pause%3A%3A1%20%20%20Next%3A%3A1%20%20%204%3A%3A1%20%20%205%3A%3A1%20%20%206%3A%3A1%20%20Enter%20%3A%3A2.25%24%24%0A%3A%3A2.25%20%20%20Del%3A%3A1%20%20%20Mute%3A%3A1%20%20%20VolDn%3A%3A1%20%20%20VolUp%3A%3A1%20%20%20%3A%3A1%20%20%3A%3A1%20%20%3A%3A1%20%20%3A%3A1%20%20%201%3A%3A1%20%20%202%3A%3A1%20%203%3A%3A1.75%20%20FN%3A%3A1%20%24%24%0A%3A%3A1.25%20%20FN%3A%3A1.25%20%20%3A%3A1.25%20%20SDK60%3A%20FN%20layout%3A%3A6.25%20%200%3A%3A1.25%20%20FN%3A%3A1.25%20%20%20.%3A%3A1.25%20%20Enter%3A%3A1.25%24%24)
Yes, that layout is totally possible. hasu's firmware includes all of those media keys, etc., you just have to change your keymap.c to reflect the layout of your Fn layer.
I'm very new to GH and this is my first Post :)
I just wanted to let you know that your code on github is awesome. I've studied it for the last two days and all I can say is wow.
consistent style
well documented
great use of modern c
Continue like this!
Sorry for off-topic... tricheboars: has there ever been a Wu keycap GB? ;D ;D
I noticed that the whole board is moved a bit to the right in the original Poker case. It seems to be about 0.5mm. Can someone confirm this? I'm wondering how much the cases differ from each other. I also know that after a ton of tinkering with the mounting holes it seems the horizontal distance between the left hole and the switches is slightly different than in the Poker PCB, so I need to correct that.
BTW: has anyone tried to put the GH60 into a different case (aluminium anyone...)? Does everything fit all right?
The FW works all right, you just cannot program the layout.
If you have a winxp somewhere, you can use it to program the keyboard, and then use it in 7.
Though this FW is buggy in general;)
Yes, I do. It's only a problem with the GUI. I don't know why it works in xp but not in 7 or 8, but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers.The FW works all right, you just cannot program the layout.
If you have a winxp somewhere, you can use it to program the keyboard, and then use it in 7.
Though this FW is buggy in general;)
Komar, do you need someone to work on a windows API to get the firmware to work on win7/8? Or is it the firmware itself that's broken on anything over XP?
Cheers,
Yes, I do. It's only a problem with the GUI. I don't know why it works in xp but not in 7 or 8, but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers.The FW works all right, you just cannot program the layout.
If you have a winxp somewhere, you can use it to program the keyboard, and then use it in 7.
Though this FW is buggy in general;)
Komar, do you need someone to work on a windows API to get the firmware to work on win7/8? Or is it the firmware itself that's broken on anything over XP?
Cheers,
I need someone to write code in python that will send and receive interrupt packets (raw reports) to and from a hid class device.
An example of how to do this in C is the teensy raw hid test program here: http://www.pjrc.com/teensy/rawhid.html
If this can't be done in python, I don't mind a small helper binary program and a python library which calls it to perform communication.
... but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers ...I'm not sure here but I think that the winapi is not multi-platform. Anyway I do prefer LibUsb.
... but I'd prefer if the windows version used winapi instead of libusb, because as far as I understand it correctly this wouldn't require the users to install any drivers ...I'm not sure here but I think that the winapi is not multi-platform. Anyway I do prefer LibUsb.
Of course libusb stays for linux, I only mean for windows, since most users will prefer if they don't have to do anything to make it work.Why don't you use the same idea already used into the Arduino IDE?
I don't know. Perhaps it was easier to implement rawhid at the time I worked on this.You know your code better than me - I still didn't poked on it ...
I just re-read the first post, and figured out what my "problem" was.
Don't keyboard in the middle of the night when you are sick and exhausted from coughing :)) .
Back to figuring out how to program a layout from windows 8.
Anybody tried to run the gui under windowsxpmode in windows 8? I'm going to try that after some sleep.
I had no luck with virtualbox running XP either. I just ended up running ubuntu in virtualbox and flashing the layout via the gui that way :) .This is a bug. You can use 0x00 to make blank keys.
Is there a sneaky way of setting blank keys with the gui? I see the layer switcher is blank, but setting it blank just reverts to the last valid key for me. Loving being able to customize with the gui so far. Can't wait to see where we end up with it.
Going to look into testing the board with hasu's fw later today.
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.
I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.
Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.
I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.
Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.
There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.
Reconnecting the keyboard should help as well.
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.
I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.
Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.
There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.
Reconnecting the keyboard should help as well.
Komar,
do you have a link to the UI github?
Cheers,
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.
I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.
Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.
There is a bug in my firmware which causes it to stop sending keys occasionally.
I hope I'll fix it soon.
If the computer didn't recognize it at all, that's weird... It should see it all right, and after reprogramming with the GUI, it should start working again.
Reconnecting the keyboard should help as well.
Komar,
do you have a link to the UI github?
Cheers,
Here it is: https://github.com/komar007/ukbdc_gui
You can see that some classes are production-ready and others are crap;)
So the next release will be mainly code cleanup. The bugs are mainly because of how bad this code is, so I'm basically rewriting it from scratch class by class now.
That's why please don't do too much on those ugly classes or you'll have a hard time merging in later.
How would you like me to proceed given this information Komar?You can do whatever you want, just bear in mind this will code will be changing a lot soon.
Cheers,
I'm not sure if it's worth mentioning, but I will anyway.
My GH60 had suddenly lost it's layout during the night or something. I am 100% sure it was working before I went to bed, but when I woke up and started my computer from standby it no longer responded to input.
I had flashed the firmware from my ubuntu virtualbox and also added the layout from the same virtualbox. For some reason I was unable to reapply or add a new layout as my system didn't recognize the keyboard.
I know this is virtually useless information as I have no data to back it up, but I am willing to test some stuff out later today if anybody needs/wants me to; that way I can see if I can replicate the difficulties I had.
I'm currently testing hasu's firmware to see if I can work with it, but so far it's a little too much to learn when it comes to making my own layouts.
Anybody have any layouts they would like to share for hasu's firmware? I'll search in the different gh60 threads, but I thought I should ask at the same time.
Edit: Just saw keymap.c . :)) Well at least I am slowly but surely figuring everything out.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "D:\GH60\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "D:\GH60\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "D:\GH60\ukbdc_gui\ukbdc_lib\ukbdc.py", line 124, in attach
idProduct = self.productId
File "D:\GH60\ukbdc_gui\usb\core.py", line 846, in find
raise ValueError('No backend available')
ValueError: No backend available
Ahhh. That's more like it. I finally got my raspberry pi set up on my network. That way I can now just connect my Gh60 board to it when I want to program my layout.Thanks, unfortunately I know what happens, I just don't know why, but I hope with a few people already looking into the code, we'll manage to fix that.
Excellent work, komar :) .
On that note, I am unsure if you have gotten any error reports from what happens in win8 and winxp.
This is from win8, but the error is the same under a virtualbox guest winxp.Code: [Select]
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "D:\GH60\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "D:\GH60\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "D:\GH60\ukbdc_gui\ukbdc_lib\ukbdc.py", line 124, in attach
idProduct = self.productId
File "D:\GH60\ukbdc_gui\usb\core.py", line 846, in find
raise ValueError('No backend available')
ValueError: No backend available
Just tell me if I should stop talking and just keeping stuff to myself xD.Certainly do talk. This is beta testing!
I have a couple of questions too.
Can I program GH60 with komar's firmware to have fn-lock. And if so, can I make it turn the LED on if fn is locked to a specific layer?
/* Layer 0: qwerty */
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LALT,NO, SPC, FN0, RGUI,APP, RCTL),
/* Layer 1: GH60 Fn */
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,FN1, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP, TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN, TRNS, \
TRNS,TRNS,NO, TRNS, FN0, TRNS,TRNS,TRNS)
};
I just want to scream and smash this right now due to how ridiculously frustrating dealing with the firmware is to someone that only knows C as a letter. I really wanted to update with the functioning wake from sleep, but apparently a LOT of other things were changed too and the keymap I had before won't work. I just get a bunch of errors about keymap_key_to_keycode and undefined overlay_bit. I have no idea what the f*ck it is talking about. I don't think the older version I used before had any of whatever that is. I didn't use whatever those are before, so why the f*ck do I have to 'define' them now when I have no idea what it is and there is no reference to them anywhere in my keymap.c?
I am tired of trying to understand C and I have no interest in learning anything about it. Will someone who understands this stuff please just make update firmware for me with my desired layout?Code: [Select]/* Layer 0: qwerty */
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LALT,NO, SPC, FN0, RGUI,APP, RCTL),
/* Layer 1: GH60 Fn */
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,FN1, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP, TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN, TRNS, \
TRNS,TRNS,NO, TRNS, FN0, TRNS,TRNS,TRNS)
};
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "layer_switch.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"
/* GH60 keymap definition macro
* K2C, K31 and K3C are extra keys for ISO
*/
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K41, K42, K45, K4A, K4B, K4C, K4D \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D }, \
{ KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D } \
}
/* ANSI valiant. No extra keys for ISO */
#define KEYMAP_ANSI( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
K40, K41, K42, K45, K4A, K4B, K4C, K4D \
) KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \
K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \
K40, K41, K42, K45, K4A, K4B, K4C, K4D \
)
#if defined(KEYMAP_PLAIN)
#include "keymap_plain.h"
#elif defined(KEYMAP_POKER)
#include "keymap_poker.h"
#elif defined(KEYMAP_POKER_SET)
#include "keymap_poker_set.h"
#elif defined(KEYMAP_POKER_BIT)
#include "keymap_poker_bit.h"
#else
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* GH60
*/
/* Keymap 0: Default Layer
*/
KEYMAP_ANSI(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LALT,NO, SPC, FN0, RGUI,APP, RCTL),
/* Overlay 1: Fn mode
*/
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, \
TRNS,FN1, UP, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,PAUS,VOLU,VOLD,MUTE, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,INS,HOME, PGUP, TRNS, \
TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL,END,PGDN, TRNS, \
TRNS,TRNS,NO, TRNS, FN0, TRNS,TRNS,TRNS)
};
static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {};
/*
* Fn action definition
*/
static const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_KEYMAP_MOMENTARY(1),
};
#endif
#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0]))
#define OVERLAYS_SIZE (sizeof(overlays) / sizeof(overlays[0]))
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
/* Overlay: 16-31(OVERLAY_BIT(0x10) | overlay_layer) */
if (layer & OVERLAY_BIT) {
layer &= OVERLAY_MASK;
if (layer < OVERLAYS_SIZE) {
return pgm_read_byte(&overlays[(layer)][(key.row)][(key.col)]);
} else {
// XXX: this may cuaes bootlaoder_jump incositent fail.
//debug("key_to_keycode: overlay "); debug_dec(layer); debug(" is invalid.\n");
return KC_TRANSPARENT;
}
}
/* Keymap: 0-15 */
else {
if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} else {
// XXX: this may cuaes bootlaoder_jump incositent fail.
//debug("key_to_keycode: base "); debug_dec(layer); debug(" is invalid.\n");
// fall back to layer 0
return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]);
}
}
}
/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
action_t action;
if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) {
action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
} else {
action.code = ACTION_NO;
}
return action;
}
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.
I hear ya. I've been reading up on the UI code. Unfortunately tk is a maze. I'll have to talk to my other python friend and see if we can figure out what is / isn't working for Windows.
Komar:
from tkinter import *
C'mon man! >.<" Cut a brother some slack :p
Cheers,
No, I am on Windows 7 x64 and don't have access to anything else and have no interest setting up a linux. I was able to trial and error though editing the text before to make something that worked with hasu files but after the new changes I don't get it. I really don't know anything about this stuff.
I hear ya. I've been reading up on the UI code. Unfortunately tk is a maze. I'll have to talk to my other python friend and see if we can figure out what is / isn't working for Windows.
Komar:
from tkinter import *
C'mon man! >.<" Cut a brother some slack :p
Cheers,
There are no problems with tkinter on windows. Everything currently works, it's only a problem with the libusb/pyusb code.
Please write to me if you have any questions.
Wait LibUSB is 32bit only isn't it?
Sorry for double post :(
The issue is this.
https://github.com/walac/pyusb/issues/14 (https://github.com/walac/pyusb/issues/14)
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 129, in attac
h
usb.util.claim_interface(self.dev, self.interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\util.py", line 191, in claim_interf
ace
device._ctx.managed_claim_interface(device, interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 112, in managed_clai
m_interface
self.backend.claim_interface(self.handle, i)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 462, in
claim_interface
_check(_lib.usb_claim_interface(dev_handle, intf))
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 384, in
_check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'usb_claim_interface: could not claim interface
1, invalid configuration 0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 131, in attac
h
self.dev.detach_kernel_driver(self.interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 712, in detach_kerne
l_driver
self._ctx.backend.detach_kernel_driver(self._ctx.handle, interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 546, in
detach_kernel_driver
_check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'usb_detach_kernel_driver_np' not found
Thanks for info. I've tested it on windows 7, and it worked, so apparently there's still something with windows 8, but I've read that libusb is not supported on this system yet.
Really glad you are making some progress with the firmware. I am currently trying it, and this is what happens when I try to send the layout to the keyboard in windows 8.Code: [Select]Exception in Tkinter callback
Traceback (most recent call last):
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 129, in attac
h
usb.util.claim_interface(self.dev, self.interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\util.py", line 191, in claim_interf
ace
device._ctx.managed_claim_interface(device, interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 112, in managed_clai
m_interface
self.backend.claim_interface(self.handle, i)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 462, in
claim_interface
_check(_lib.usb_claim_interface(dev_handle, intf))
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 384, in
_check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'usb_claim_interface: could not claim interface
1, invalid configuration 0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 131, in attac
h
self.dev.detach_kernel_driver(self.interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 712, in detach_kerne
l_driver
self._ctx.backend.detach_kernel_driver(self._ctx.handle, interface)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\backend\libusb01.py", line 546, in
detach_kernel_driver
_check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'usb_detach_kernel_driver_np' not found
I can get the gui tool to work, so that portion seem ok now. For some key, you can just press a character and it can assign it this way which is good and easy. For others you need to enter scancode specifically for all the non character key. Including a table of these with the package would be a good thing so don't have to go hunting for them somewhere. Also confused of how to assign a Fn key here.Good idea. Ideally, we should have a list or grid of most common scancodes to choose from by clicking. For now you can see all available scancodes and their names in /ukbdc_lib/mnemonics.py.
Also get same as Glissant when try to move past the assign stage to send to keyboard.
Don't mind me then:)Wait LibUSB is 32bit only isn't it?
That shouldn't be a problem on win7/8.
Cheers,
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 178, in get_endpoint
_type
return self._ep_type_map[key]
KeyError: (3, 0, 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 140, in attac
h
self.reset()
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 166, in reset
self.write_packet(Reset())
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\ukbdc_lib\ukbdc.py", line 151, in write
_packet
self.dev.write(self.ep_out, bytes(p), timeout = self.tm_out)
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 611, in write
fn = fn_map[self._ctx.get_endpoint_type(self, endpoint, intf)]
File "D:\GH60\ukbdc_gui_win7\ukbdc_gui\usb\core.py", line 181, in get_endpoint
_type
etype = util.endpoint_type(e.bmAttributes)
AttributeError: 'NoneType' object has no attribute 'bmAttributes'
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\noname\Desktop\ukbdc_gui\gui.py", line 757, in <lambda>
command = lambda: command("program"),
File "C:\Users\noname\Desktop\ukbdc_gui\gui.py", line 664, in on_menu_action
u.attach()
File "C:\Users\noname\Desktop\ukbdc_gui\ukbdc_lib\ukbdc.py", line 132, in atta
ch
config = self.dev[0]
File "C:\Users\noname\Desktop\ukbdc_gui\usb\core.py", line 727, in __getitem__
return Configuration(self, index)
File "C:\Users\noname\Desktop\ukbdc_gui\usb\core.py", line 419, in __init__
configuration
File "C:\Users\noname\Desktop\ukbdc_gui\usb\backend\libusb01.py", line 408, in
get_configuration_descriptor
return dev.config[config]
ValueError: NULL pointer access
Please, anyone with windows 7 or older wants to test?
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\ukbdc_lib\ukbdc.py", lin
e 129, in attach
usb.util.claim_interface(self.dev, self.interface)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\util.py", line 191,
in claim_interface
device._ctx.managed_claim_interface(device, interface)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\core.py", line 112,
in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\backend\libusb01.py"
, line 462, in claim_interface
_check(_lib.usb_claim_interface(dev_handle, intf))
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\backend\libusb01.py"
, line 384, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'usb_claim_interface: could not claim interface
1, invalid configuration 0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\gui.py", line 757, in <l
ambda>
command = lambda: command("program"),
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\gui.py", line 664, in on
_menu_action
u.attach()
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\ukbdc_lib\ukbdc.py", lin
e 131, in attach
self.dev.detach_kernel_driver(self.interface)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\core.py", line 712,
in detach_kernel_driver
self._ctx.backend.detach_kernel_driver(self._ctx.handle, interface)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\backend\libusb01.py"
, line 546, in detach_kernel_driver
_check(_lib.usb_detach_kernel_driver_np(dev_handle, intf))
File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'usb_detach_kernel_driver_np' not found
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\gui.py", line 757, in <l
ambda>
command = lambda: command("program"),
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\gui.py", line 664, in on
_menu_action
u.attach()
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\ukbdc_lib\ukbdc.py", lin
e 132, in attach
config = self.dev[0]
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\core.py", line 727,
in __getitem__
return Configuration(self, index)
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\core.py", line 419,
in __init__
configuration
File "C:\Users\Jonathan Carpenter\Downloads\ukbdc_gui\usb\backend\libusb01.py"
, line 408, in get_configuration_descriptor
return dev.config[config]
ValueError: NULL pointer access
Come on, why are all these errors different? Crazy
It works for me on windows 7 32-bit...
Is GH60 (Interface 1) visible under libusb-win32 devices in Device Manager?
EDIT: okay, I'll download windows 8...
Come on, why are all these errors different? Crazy
It works for me on windows 7 32-bit...
Is GH60 (Interface 1) visible under libusb-win32 devices in Device Manager?
EDIT: okay, I'll download windows 8...
Well, my error code validates hasu's :)
Here's my Device Manager:Show Image(http://i.imgur.com/A1QC146.png)
I changed my rshift to a 1x and short shift, so now I am wondering how I can program the new 1x. The rshift is working just fine =). (I really want to do 1.5 - 1 - 1.5 - 7 - 1.5 - 1 - 1.5, but I need a stabilizer wire for my 7x spacebar.You have to change gh60.xml accordingly. Add the key definition for your extra key (the number for this key is 54) - add it where it says "here goes extra \"fn\" key after or befor rshift". You'll also need to change the size of shift (number 55) to 14 x 8. (the units used are 1/8th of the side length of a 1x key)
(Attachment Link)
Great. Can you program it with the firmware in the first post, version 0.2_rc2 and see if the gui can program an empty layout?I'll try ...
They differ in the way that mine is windows 8 and his is windows 7 :) .
Thanks!
Any ideas how your and your dad's windowses differ?
I've just done something similar, this simply happened because it went to an undefined layer, because of my mistake making a layout.
I'm going to add indication about which layer the keyboard is on, but I need to rewrite some of the code first.
IMO 2.7 is more mature.
"Python 3.3.0 was released on September 29th, 2012." according to it's site.
There are some libraries without binding/port yet.
Almost all pythonists I do know at here (a dozen, tops) are still using the 2.7.
I'm not a pythonist (I only use it when there is no other option or just when I do need something quick).
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 900, in <lamb
da>
command = lambda: command("program"),
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 807, in on_me
nu_action
u.attach()
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\ukbdc_lib\ukbdc.py", line 1
24, in attach
idProduct = self.productId
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\usb\core.py", line 846, in
find
raise ValueError('No backend available')
ValueError: No backend available
The problem is python 3 changed a huge number of things in std API. It's extremely difficult to migrate from 2 to 3 and vice versa. For that reason, many of the popular APIs have either a) not moved or b) released a completely separate version just for Python 3.Yes, I think it's the major reason.
This is super frustrating. At home under Win7 x64, I get this crap again:Doesn't simply re-running inf-wizard and reinstalling the driver help? Have you tried removing the driver associated with this Atmel device?Code: [Select]Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 900, in <lamb
da>
command = lambda: command("program"),
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 807, in on_me
nu_action
u.attach()
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\ukbdc_lib\ukbdc.py", line 1
24, in attach
idProduct = self.productId
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\usb\core.py", line 846, in
find
raise ValueError('No backend available')
ValueError: No backend available
Device manager still shows Atmel USB, not libusb. I don't know what I'm doing wrong, but this sucks. Can you just setup the GUI where it will output a .hex file? I can flash the FW with Flip with no problem.Good idea. I'll do it.
They differ in the way that mine is windows 8 and his is windows 7 :) .
Thanks!
Any ideas how your and your dad's windowses differ?
I've just done something similar, this simply happened because it went to an undefined layer, because of my mistake making a layout.
I'm going to add indication about which layer the keyboard is on, but I need to rewrite some of the code first.
I'll look over the layout to see if I have any undefined layers.
Did I mention I LOVE this thing? Well, I LOVE THIS THING!
Don't have board to test though :-)
This is super frustrating. At home under Win7 x64, I get this crap again:Just out of curiosity: have you tried avrdude?Code: [Select]Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 900, in <lamb
da>
command = lambda: command("program"),
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 807, in on_me
nu_action
u.attach()
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\ukbdc_lib\ukbdc.py", line 1
24, in attach
idProduct = self.productId
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\usb\core.py", line 846, in
find
raise ValueError('No backend available')
ValueError: No backend available
Device manager still shows Atmel USB, not libusb. I don't know what I'm doing wrong, but this sucks. Can you just setup the GUI where it will output a .hex file? I can flash the FW with Flip with no problem.
This is super frustrating. At home under Win7 x64, I get this crap again:Just out of curiosity: have you tried avrdude?Code: [Select]Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python33\lib\tkinter\__init__.py", line 1442, in __call__
return self.func(*args)
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 900, in <lamb
da>
command = lambda: command("program"),
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\gui.py", line 807, in on_me
nu_action
u.attach()
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\ukbdc_lib\ukbdc.py", line 1
24, in attach
idProduct = self.productId
File "C:\Users\Jonathan\Downloads\ukbdc_gui_w7_new\usb\core.py", line 846, in
find
raise ValueError('No backend available')
ValueError: No backend available
Device manager still shows Atmel USB, not libusb. I don't know what I'm doing wrong, but this sucks. Can you just setup the GUI where it will output a .hex file? I can flash the FW with Flip with no problem.
$ python3 ./gui.py
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.2/tkinter/__init__.py", line 1402, in __call__
return self.func(*args)
File "/usr/lib/python3.2/tkinter/__init__.py", line 3125, in __call__
self.__callback(self.__value, *args)
File "./gui.py", line 713, in on_change_layer
kd = self.layout[l, b]
File "/home/noname/Dropbox/KEYBOARD/GH60/ukbdc_gui_w7_new/ukbdc_lib/layout.py", line 119, in __getitem__
return self.layers[lay][key]
IndexError: list index out of range
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.2/tkinter/__init__.py", line 1402, in __call__
return self.func(*args)
File "/usr/lib/python3.2/tkinter/__init__.py", line 3125, in __call__
self.__callback(self.__value, *args)
File "./gui.py", line 713, in on_change_layer
kd = self.layout[l, b]
File "/home/noname/Dropbox/KEYBOARD/GH60/ukbdc_gui_w7_new/ukbdc_lib/layout.py", line 119, in __getitem__
return self.layers[lay][key]
IndexError: list index out of range
It seems like Layer 4 and above layers are not editable.That' because the gh60.lay file is broken. Please use the new layout file from the bottom of the OPCode: [Select]$ python3 ./gui.py
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.2/tkinter/__init__.py", line 1402, in __call__
return self.func(*args)
File "/usr/lib/python3.2/tkinter/__init__.py", line 3125, in __call__
self.__callback(self.__value, *args)
File "./gui.py", line 713, in on_change_layer
kd = self.layout[l, b]
File "/home/noname/Dropbox/KEYBOARD/GH60/ukbdc_gui_w7_new/ukbdc_lib/layout.py", line 119, in __getitem__
return self.layers[lay][key]
IndexError: list index out of range
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.2/tkinter/__init__.py", line 1402, in __call__
return self.func(*args)
File "/usr/lib/python3.2/tkinter/__init__.py", line 3125, in __call__
self.__callback(self.__value, *args)
File "./gui.py", line 713, in on_change_layer
kd = self.layout[l, b]
File "/home/noname/Dropbox/KEYBOARD/GH60/ukbdc_gui_w7_new/ukbdc_lib/layout.py", line 119, in __getitem__
return self.layers[lay][key]
IndexError: list index out of range
Komar....how should I send you my layout? PM doesn't seem to support attachments.Please upload it somewhere and send me a link. Or you can attach it here in a post.
Also, anyone know scan code for the context menu key?
@KomarFixed, thanks.
The link to "GH60 Project" in your sig is dead.
How do I define an ISO enter key in thelayoutgh60.xml?
Thanks komar, I can edit 4 and above layers flawlessly now.Thanks, added to the OP
I finished layout emulating Poker Fn layers. This is better than original a bit, I think :)
Original Poker has two locking layers, Fn+Q fixes cursor keys on right bottom area and Fn+Space places Esc instead of back quote(`). I add my layout file just for reference.
This layout is comprised of these layers:
0: default(qwerty)
1: Space lock(cursor keys)
2: Q lock(Esc)
3: Space and Q lock
4: Fn layer of default
5: Fn layer of Layer 1
6: Fn layer of Layer 2
7: Fn layer of Layer 3
Here is my layout...nothing earth shattering. I'm a coder, so its oriented for that usage.There are a couple of problems with your layout. Have you actually tested it on the keyboard?
Includes:
- Caps Lock change to Control.
- Fn where Control was, lgui retained.
- Caps Lock added to right of Right Shift.
- Altered layout for arrow key cluster on Layer 2.
- no-op keys on layer 2 for all letters and such to avoid accidentals.
- Layer for Keypad...I still use those Alt-XXX combos on occasion.
- NumLock layer
2. connect the keyboard, press the program button (S1) and wait until it enumerates
I want to update my firmware but how do I put the keyboard in program mode?Quote2. connect the keyboard, press the program button (S1) and wait until it enumerates
I've tried holding Esc, 1, and caps lock while plugging it in and FLIP cannot find it and my keyboard is not in program mode cause I can still type?
- Cody
Hi EveryoneSince the time you first programmed it with flip, did you install the libusb drivers? If sou, you have to "update driver" for this device and point to the flip driver's location.
I've been busy with other things for a while and just got back to tinkering with the GH60. I am trying to figure out how to update the firmware via Flip. I downloaded the firmware initially with Flip a while back and all was fine, but never tried updating the firmware. Now I am having some trouble doing that.
When I push the switch on the back of the board and try to connect with Flip it says "Could not open USB device".
Using the GUI to program the layout results in a "device not found" error in the output window.
Also, the instructions everywhere say switch (S1)....but on my board at east, its labeled S0.
Thanks
No... it does not change. Nothing visible happens when I push the switch.Does it work correctly before you push the switch?
I had this problem and I had to install a java run time.
Using the GUI to program the layout results in a "device not found" error in the output window.
Sorry to be a pain. I'm sure there are answers to these somewhere, but frankly there are too many pages for me to look through and my searches have been unyielding. Could anyone help me out?I don't have answers to any of there questions yet. The position of the receptacle and exact dimensions of the board are one of the last things I have left to do before the boards are done;)
1. How far is the left edge of the USB receptacle from the left edge of the PCB?
2. How far is the right edge of the USB receptacle from the left edge of the PCB?
2. What are the dimensions of the PCB?
Sorry again and thanks in advance. I'm just trying to quickly design something.
Does it work correctly before you push the switch?
Which firmware is it running now?
1. How far is the left edge of the USB receptacle from the left edge of the PCB?263 mm
2. How far is the right edge of the USB receptacle from the left edge of the PCB?8.5 mm
2. What are the dimensions of the PCB?284.5 mm x 94 mm
Does it work correctly before you push the switch?
Which firmware is it running now?
Ok, I sorted things out. I tried jumping pin 13 (RESET) to ground to test things and it did reset, so it was definitely a connection problem. I reflowed the switch and microcontroller with a little more solder and its working now.
Thanks for all your help and sorry for the hassle...I should have gone straight to the schematic to begin with.
A question on the schematic...rev A shows an ISP header. From gerbers, it appears that the six through holes near the GH60 logo at the bottom center of the board are the ISP pinouts, correct?
Out of curiosity, what is format of the layout (.lay) file?I lost the description I once made. I'll post it here when I find it:)
Layout starts from address 0x2700. First byte is number of keys (leave it
64(0x40)), then number of layers (the GUI always sets it to 16).
Next there are all 16 layers, each consisting of 64 keys, each 4 bytes long.
A key definition is:
* first byte: scancode (as in USB HID) - 0 means no scancode (do not send)
* second byte: actions (0 means no actions (only regular keypress is
sent), then 2 next bytes are undefined)
- high half - action on pressing down
- low half - action on releasing
Each 4-bit action can be: 0 - no action, 1 - go to layer number n
(absolute jump), 2 - go to layer number current_layer + n (relative
jump)
If an action is defined (not 0), then the argument n is passed as
third (press down action) or fourth (release action) byte of a key's
description.
* third byte: argument for press down action
* fourth byte: argument for release action.
The argument is either an 8-bit unsigned integer (absolute jump) or 8-bit signed integer (2's complement).
Example: define a key which sends no scancode and changes the layer to
number 1 when pressed:
00 20 01 00
00 - no scancode
20 - (2) go to layer n on key down, (0) no action on key up
01 - argument to action "go to layer n on key down", setting n to 1
00 - can be anything (no argument to release action, because there is
no release action)
Then you can define in a similar way an action on layer 1 (the same
key), that will go to layer 0 on key release, and this way you have
two layers with an "fn" button which when pressed, changes to
alternative layer.
The firmware does not support inheritance, so the GUI resolves the inheritance tree before sending the layout. In the format saved in a file the inherited keys are represented by 0xffffffff. In this format there is also the inheritance tree in the end of the file. It's saved as n-1 bytes (where n is the number of layers). The bytes are the numbers of layers that layers 1, 2, ..., n-1 inherit from, respectively.
I have found a little bug with the gui.
if I check the radio button to make a key defined instead of inherited. there is no way to select inherited again as it is greyed out.
edit:Yes I have clear the entire layer to make it all inherited but not the individual keys.
after you posted this I decided to start from scratch instead of the old file I was using. I must have a corrupted/depreciated layout file.
thanks for trying to help.
btw in the OP
komar's layout
(this is not the layout included in the ukbdc_gui package; that one is old, deprecated and buggy)
what is the scancode for 0x65 used for?
also... where can I find all the accepted scancodes?
I want to makeYou can't really do this, because ~ and ` is one code. If you're holding shift, your OS will interpret ~/` as ~, not `...
FN + Esc = ~
Shift + Esc = `
I want to makeYou can't really do this, because ~ and ` is one code. If you're holding shift, your OS will interpret ~/` as ~, not `...
FN + Esc = ~
Shift + Esc = `
You can do the opposite though.
Set fn to go to layer 1 on press and layer 0 on release, set shift the same. On layer 1 inherit all the keys from layer 0 and redefine esc to be ~/`
On layer 1 inherit all keys from layer 0 and redefine esc ti
Komar already created a version that does this...
http://geekhack.org/index.php?topic=37570.msg827049#msg827049 (http://geekhack.org/index.php?topic=37570.msg827049#msg827049)
The most useful keyboard debug feature for me is in hasu's firmware where you can enable debug print statements. Very useful for making sure the parts of code you are working on are executing as expected.
Checked rev B schematic and found its pin configuration diffesr from rev A! Firmware of rev A is incompatibile to rev B PCB.thank you for your reply! So i need to modify the source code and build my own version of firmware? I did the rev B PCB.
RevB use PB7 for col9(8,I,K,M) instead of PB0 of RevA. You need to change source and build firmware.
Rev A PCB won't be supported by future release of firmware anymore?
Checked rev B schematic and found its pin configuration diffesr from rev A! Firmware of rev A is incompatibile to rev B PCB.
RevB use PB7 for col9(8,I,K,M) instead of PB0 of RevA. You need to change source and build firmware.
Rev A PCB won't be supported by future release of firmware anymore?
Kdash,Thank you! hasu~ I fix it, and it works correctly. I can't build the komar's version ,so I modify your source code I find it and change it.
Right.
I think you got rev B gerber files from this komar's blog page. I downloaded, checked the gerbers and confirmed it uses PB7 for col9.
http://blog.komar.be/projects/gh60-programmable-keyboard/
I guess you need change this line, replace B0 with B7.
https://github.com/komar007/ukbdc/blob/master/platforms.c#L49
Hi,
sorry for the delays, I've just come back from holidays.
I'm slowly catching up with life, so bear with me.
As you've correctly noticed, the topology of the board has changed slightly, so the firmware needs an update.
Of course the old rev. A will still be supported by the official firmware.
It's also good to hear people are producing rev. B boards themselves
Rev. B is the final design (electrically speaking), only minor mechanical changes will be made, so rev. C will be firmware-compatible.
Of course the old rev. A will still be supported by the official firmware.
Hi komar, My friend wired the leds himself, but he found the blacklight dose not work and he also found the lcol14 connected with the GPIO2 in your PCB design. so he can't simply wired the leds, he cut the connection, the blacklight works fine.. is it a bug or meaning other things?
Hi komar, how can i add the Mute, Volume Up or Volume Down key using your GUI tools?As far as I know the volume controls are available in the Consumer Page (0x0C). Adding support for these requires changing the HID report descriptor.
My layout :DShow Image(http://i.imgur.com/szQhRbQ.png)
I want SW1:swap bs>space,SW2:swap caps>enter
yep,thanksMy layout :DShow Image(http://i.imgur.com/szQhRbQ.png)
I want SW1:swap bs>space,SW2:swap caps>enter
I think he means layouts that can actually be built with the GH60...
Please help,
After I run inf-wizard, there are 4 devices came out, but none of them with vid 16c0 and pid 047c. Instead of that :Show Image(http://i.imgur.com/0hPQZVm.jpg?1)
Any idea ?
Please help,
After I run inf-wizard, there are 4 devices came out, but none of them with vid 16c0 and pid 047c. Instead of that :Show Image(http://i.imgur.com/0hPQZVm.jpg?1)
Any idea ?
Please write the revision of PCB, where you bought it and the revision of firmware (if you installed it yourself).
Please help,
After I run inf-wizard, there are 4 devices came out, but none of them with vid 16c0 and pid 047c. Instead of that :Show Image(http://i.imgur.com/0hPQZVm.jpg?1)
Any idea ?
Please write the revision of PCB, where you bought it and the revision of firmware (if you installed it yourself).
Once again, sorry for spaming your topic, blog and email.
My pcb is rev B. I got it from taobao.com and I did not installed it myself. I just try to apply poker layout into your pcb somehow it doesn't work. I spent like a week browse around to find solution but most of my friends haven't own a GH60 before.
Your board doesn't have official firmware, just install it.
Thank you for your help Komar.
Thank you for your help Komar.
No problem.
Have you fixed the board?
Thank you for your help Komar.
No problem.
Have you fixed the board?
I already re-flash the firmware. However, there is little problem with mapping key using rev B gui.
I copied USB folder from previous version for Win 7, replace base_firmware.hex with ukbdc_gh60_revB-0.3-dev. After gui.py, the layout came out with 4 extra button with id: 40,64,54,43. I deleted them in gh60.xml. But when I load poker.lay, and hit the programming button, this is what I get from the cmd screen:
(http://i.imgur.com/SJlE3rI.jpg) (http://i.imgur.com/SJlE3rI.jpg)
Thank you for your help Komar.
No problem.
Have you fixed the board?
I already re-flash the firmware. However, there is little problem with mapping key using rev B gui.
I copied USB folder from previous version for Win 7, replace base_firmware.hex with ukbdc_gh60_revB-0.3-dev. After gui.py, the layout came out with 4 extra button with id: 40,64,54,43. I deleted them in gh60.xml. But when I load poker.lay, and hit the programming button, this is what I get from the cmd screen:
(http://i.imgur.com/SJlE3rI.jpg) (http://i.imgur.com/SJlE3rI.jpg)
The extra buttons are supposed to be there, they are used for other physical layouts.
As for programming, I know it's hard to force the GUI to run on windows, and I can't do anything about it so far.
This might not be very helpful, but the best option is to run the program in any linux distribution, and it should work correctly.
[...]
I used linux, try to mapping key. But same mistake like Windows.
ubuntu@ubuntu:~/Desktop/ukbdc_gui$ sudo python3 gui.py
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.3/tkinter/__init__.py", line 1478, in __call__
return self.func(*args)
File "gui.py", line 939, in <lambda>
command = lambda: command("program"),
File "gui.py", line 847, in on_menu_action
u.program_layout(binary)
File "/home/ubuntu/Desktop/ukbdc_gui/ukbdc_lib/ukbdc.py", line 188, in program_layout
raise RuntimeError("device returned status: %s" % Status.name(s))
RuntimeError: device returned status: unexpected cont packet
This is list of my device, in Linux, may I know how to point the py.gui program to 16c0:047c
Bus 002 Device 003: ID 8087:07da Intel Corp.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04f2:b370 Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 138a:003d Validity Sensors, Inc.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 03f0:ae07 Hewlett-Packard
Bus 003 Device 003: ID 045e:0039 Microsoft Corp. IntelliMouse Optical
Bus 003 Device 002: ID 16c0:047c Van Ooijen Technische Informatica Teensy Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Thank you for your time.
I try with gh60_poker.lay provided in this topic. Haven't tried with original gh60b.lay file[...]
I used linux, try to mapping key. But same mistake like Windows.
ubuntu@ubuntu:~/Desktop/ukbdc_gui$ sudo python3 gui.py
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.3/tkinter/__init__.py", line 1478, in __call__
return self.func(*args)
File "gui.py", line 939, in <lambda>
command = lambda: command("program"),
File "gui.py", line 847, in on_menu_action
u.program_layout(binary)
File "/home/ubuntu/Desktop/ukbdc_gui/ukbdc_lib/ukbdc.py", line 188, in program_layout
raise RuntimeError("device returned status: %s" % Status.name(s))
RuntimeError: device returned status: unexpected cont packet
This is list of my device, in Linux, may I know how to point the py.gui program to 16c0:047c
Bus 002 Device 003: ID 8087:07da Intel Corp.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04f2:b370 Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 138a:003d Validity Sensors, Inc.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 03f0:ae07 Hewlett-Packard
Bus 003 Device 003: ID 045e:0039 Microsoft Corp. IntelliMouse Optical
Bus 003 Device 002: ID 16c0:047c Van Ooijen Technische Informatica Teensy Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Thank you for your time.
This is weird. It's clearly communicating with the keyboard but there's a protocol error. That's different than windows, where there was no communication at all, the program wasn't recognizing the keyboard at all.
Have you tried programming with the provided gh60b.lay file? Does this work?
This file is for the previous revision of the board and firmware and it doesn't work with the current firmware.
I try with gh60_poker.lay provided in this topic. Haven't tried with original gh60b.lay file
This file is for the previous revision of the board and firmware and it doesn't work with the current firmware.
I try with gh60_poker.lay provided in this topic. Haven't tried with original gh60b.lay file
Still, it shouldn't cause the problems you're getting, but for now please just check if gh60b.lay works for you on a clean firmware.
This file is for the previous revision of the board and firmware and it doesn't work with the current firmware.
I try with gh60_poker.lay provided in this topic. Haven't tried with original gh60b.lay file
Still, it shouldn't cause the problems you're getting, but for now please just check if gh60b.lay works for you on a clean firmware.
Is ukbdc_gh60-0.2_rc2_std_layout.hex the latest firmware and the one I should be using?