TMK keyboard firmware collection
- kekstee
- Location: Germany
- Main keyboard: HHKB
- Main mouse: RFM01
- DT Pro Member: -
I did improve the LED support a bit for myself, but I'm wondering if there is a decent way to detect wether the computer is powered down or not.
My first guess was adding hooks to common/avr/suspend.c, which has some problems in its current state:
My first guess was adding hooks to common/avr/suspend.c, which has some problems in its current state:
- switching backlight and layer LEDs off on suspend does not always work when I suspend my OS
- it won't work if I shut down the machine
- Phenix
- -p
- Location: Germany, Cologne
- Main keyboard: F122, soarer´d|Novatouch-s
- Main mouse: Roccat Kone Pure|Rollermouse
- Favorite switch: BS F|Topre-s
- DT Pro Member: -
can someone please share an F122 keymap? I am atm really stuck in connecting mine (Soarer converter is no option, as I use an usb hubm which doesnt work out at all)
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
Now fixed Modifier/Layer key stuck problem finally.
https://github.com/tmk/tmk_keyboard/tre ... e#20170530
See this wiki entry. https://github.com/tmk/tmk_keyboard/wik ... ayer-stuck If you need old keymap behaviour for some reason define NO_TRACK_KEY_PRESS in your config.h. This is virtually equivalent to QMK's PREVENT_STUCK_MODIFIERS. https://github.com/qmk/qmk_firmware/pull/182
With this fix the biggest limitaiotn of TMK keymap were removed. Modifier and layer switch keys cannot be stuck virtually even if you want to have very strange keymap You have to compile to get this fix worked, keymap editor is not updated yet.
Report if you have any problem with this fix.
https://github.com/tmk/tmk_keyboard/tre ... e#20170530
See this wiki entry. https://github.com/tmk/tmk_keyboard/wik ... ayer-stuck If you need old keymap behaviour for some reason define NO_TRACK_KEY_PRESS in your config.h. This is virtually equivalent to QMK's PREVENT_STUCK_MODIFIERS. https://github.com/qmk/qmk_firmware/pull/182
With this fix the biggest limitaiotn of TMK keymap were removed. Modifier and layer switch keys cannot be stuck virtually even if you want to have very strange keymap You have to compile to get this fix worked, keymap editor is not updated yet.
Report if you have any problem with this fix.
- Mr.Bean
- Location: Belgium
- Main keyboard: Ergodox
- Main mouse: Logitech g9x
- Favorite switch: BS
- DT Pro Member: -
Is there a way to toggle layers like ACTION_LAYER_TAP_KEY?
Let's say my F1 toggles layer 1 after 3x taps, but on single tap it acts as normal key.
Basically ACTION_LAYER_TAP_TOGGLE(1, KC_F1) with second parameter.
Let's say my F1 toggles layer 1 after 3x taps, but on single tap it acts as normal key.
Basically ACTION_LAYER_TAP_TOGGLE(1, KC_F1) with second parameter.
Last edited by Mr.Bean on 03 Jun 2017, 22:00, edited 2 times in total.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
No. You have to write your own code in action_function in your keymap.
You can find code of the action you refer 'ACTION_LAYER_TAP_TOGGLE' with searching action_code.h and action.c.
https://github.com/tmk/tmk_keyboard/blo ... ode.h#L277
https://github.com/tmk/tmk_keyboard/blo ... #L264-L275
You code would look like this. I'm not sure it is useful to toggle a layer after restering three F1 though.
You can find code of the action you refer 'ACTION_LAYER_TAP_TOGGLE' with searching action_code.h and action.c.
https://github.com/tmk/tmk_keyboard/blo ... ode.h#L277
https://github.com/tmk/tmk_keyboard/blo ... #L264-L275
You code would look like this. I'm not sure it is useful to toggle a layer after restering three F1 though.
Code: Select all
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case F1_TOGGLE:
/* tap toggle */
if (event.pressed) {
if (tap_count < 3) {
register_code(KC_F1);
}
} else {
if (tap_count < 3) {
unregister_code(KC_F1);
}
if (tap_count <= 3) {
layer_invert(1);
}
}
break;
}
}
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
Zarugal wrote: ↑workshop-f7/help-with-keymapping-t17275.html#p383951
Use K1GZarugal wrote: ↑I'm working on a handwired build and I am currently trying to define the keymap. I have 17 columns and therefore am over the scope of hexadecimal, so how do I define the 17th Column? If I use K10/K11 I overrun the column into the next row.
Here's a demonstration of the conflict below in case I am unclear.
If I use K10 on the top row, my second row will no longer work, so what do I use?Code: Select all
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, K0f, K?? K10, K11, K12 K20, K21
-
- Location: North Carolina
- Main keyboard: Alps Typewriter Conversion
- Favorite switch: Alps SKCL Green
- DT Pro Member: -
Hey Hasu,
I'm using your code and a teensy 2.0 to convert an electric typewriter into a keyboard (posted about it here keyboards-f2/converting-an-old-typewrit ... 17317.html). Anyway, I have an issue where it appears to work just fine on my macbook pro at home, but as soon as I try use it on my windows machine at work, keys just fire over and over again. It's usually the same column over and over, but sometime I can make it type other random keys. Anyway, I guess I'm just looking for some guidance on if this sounds like a hardware or a software issue. I've spent most of my debugging efforts on hardware (soldering, resoldering, insulating, etc...). Any insight into what the issue might be is appreciated.
I'm using your code and a teensy 2.0 to convert an electric typewriter into a keyboard (posted about it here keyboards-f2/converting-an-old-typewrit ... 17317.html). Anyway, I have an issue where it appears to work just fine on my macbook pro at home, but as soon as I try use it on my windows machine at work, keys just fire over and over again. It's usually the same column over and over, but sometime I can make it type other random keys. Anyway, I guess I'm just looking for some guidance on if this sounds like a hardware or a software issue. I've spent most of my debugging efforts on hardware (soldering, resoldering, insulating, etc...). Any insight into what the issue might be is appreciated.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
It souds problem is likely to be hardware rather than firmware or OS. I guess you changed something on its wiring during commuting. Bring your macbook to office and try both side by side.SpacemanToby wrote: ↑Hey Hasu,
I'm using your code and a teensy 2.0 to convert an electric typewriter into a keyboard (posted about it here keyboards-f2/converting-an-old-typewrit ... 17317.html). Anyway, I have an issue where it appears to work just fine on my macbook pro at home, but as soon as I try use it on my windows machine at work, keys just fire over and over again. It's usually the same column over and over, but sometime I can make it type other random keys. Anyway, I guess I'm just looking for some guidance on if this sounds like a hardware or a software issue. I've spent most of my debugging efforts on hardware (soldering, resoldering, insulating, etc...). Any insight into what the issue might be is appreciated.
-
- Location: North Carolina
- Main keyboard: Alps Typewriter Conversion
- Favorite switch: Alps SKCL Green
- DT Pro Member: -
Unfortunately, I've tried both right next to each other. I'm actually typing this response using the keyboard on a different laptop I have running windows 10. That's ok, I guess this will just be a non work keyboard. Maybe my next one will work better. Thanks for the awesome firmware code.
-
- Location: North Carolina
- Main keyboard: Alps Typewriter Conversion
- Favorite switch: Alps SKCL Green
- DT Pro Member: -
I've done a little more debugging. It mostly prints the same column over and over again, 7yhb. I started desoldering that column, even desoldered the row on the seven key, but it still prints those keys, even ones with no wires attached at all. I'm not sure what would cause this.
-
- Location: North Carolina
- Main keyboard: Alps Typewriter Conversion
- Favorite switch: Alps SKCL Green
- DT Pro Member: -
I just wired that column to a different pin on the teensy and updated my code. It finally seems to be working now. Thanks for your help.
- snufflecat
- Location: Norway
- Main keyboard: Model M
- DT Pro Member: -
Hi Hasu, hope you don't mind me asking here in stead. I can't stand GH's forum-design and layout.
OK, so:
- I've flashed my Teensy 2.0 with the correct HEX-file (I think)
- Solder joints on the Teensy are good
- Resistor is in place where it should be
- Wires going from the cable to the Teensy are correct (I've triple-checked)
- The Teensy loader software detects the chip
Still - no action.
- One chip on my Apple Extended II got really warm after a while.
- The keyboard is family number M3501 with Norwegian/Scandinavian layout.
- I did not do any changes to the config files (I can't figure it out anyway), just compiled the hex fil with "make -f Makefile.teensy"
Please see the attached image for photo of my solder joints.
Any help or tips what so ever are greatly appreciated.
OK, so:
- I've flashed my Teensy 2.0 with the correct HEX-file (I think)
- Solder joints on the Teensy are good
- Resistor is in place where it should be
- Wires going from the cable to the Teensy are correct (I've triple-checked)
- The Teensy loader software detects the chip
Still - no action.
- One chip on my Apple Extended II got really warm after a while.
- The keyboard is family number M3501 with Norwegian/Scandinavian layout.
- I did not do any changes to the config files (I can't figure it out anyway), just compiled the hex fil with "make -f Makefile.teensy"
Please see the attached image for photo of my solder joints.
Any help or tips what so ever are greatly appreciated.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
You problem is likey to be your wiring as many poeple had.
I can't say soldering job in the pic is good I think you are very new to these things. Your will find someone with skill to ask help in your family(dad or son?), classmates or colleagues.
I can't say soldering job in the pic is good I think you are very new to these things. Your will find someone with skill to ask help in your family(dad or son?), classmates or colleagues.
- snufflecat
- Location: Norway
- Main keyboard: Model M
- DT Pro Member: -
And here I was, thinking I did an OK job. :p Thank you! I will have someone skilled help me and see if that helps.hasu wrote: ↑You problem is likey to be your wiring as many poeple had.
I can't say soldering job in the pic is good I think you are very new to these things. Your will find someone with skill to ask help in your family(dad or son?), classmates or colleagues.
Edit:
I got help and now have much better connections. Now my mouse cursor jumps around at random intervals, but I was able to run the "hid_listen.mac" and keep getting the following message(s):
Code: Select all
Scan: addr:1, reg3:FFE2
Scan: addr:2, reg3:FFE2
Scan: addr:3, reg3:FFE2
Scan: addr:4, reg3:FFE2
Scan: addr:5, reg3:FFE2
Scan: addr:6, reg3:FFE2
Scan: addr:7, reg3:FFE2
Scan: addr:8, reg3:FFE2
Scan: addr:9, reg3:FFE2
Scan: addr:10, reg3:FFE2
Scan: addr:11, reg3:FFE2
Scan: addr:12, reg3:FFE2
Scan: addr:13, reg3:FFE2
Scan: addr:14, reg3:FFE2
Scan: addr:15, reg3:FFE2
debug enabled.
adb_host_kbd_recv: ERROR(-30)
- snufflecat
- Location: Norway
- Main keyboard: Model M
- DT Pro Member: -
Sorry, but I have to shamelessly bump this thread in hopes of having someone skilled explain to me what I'm doing wrong.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
Error -30 usually indicates that your wiring is wrong unless your keyboard is in bad shape.
Check your pullup resistor value(1K-10K should be ok) and wire connections.
Are you sure that wire connections from keyboard is correct?
If your give power and ground connection properly the keyboard LEDs blink at startup.
Check your pullup resistor value(1K-10K should be ok) and wire connections.
Are you sure that wire connections from keyboard is correct?
If your give power and ground connection properly the keyboard LEDs blink at startup.
- snufflecat
- Location: Norway
- Main keyboard: Model M
- DT Pro Member: -
Thank you Hasu. Here are some pictures of what I discovered this morning, and what I might suspect is the reason for my errors:hasu wrote: ↑Error -30 usually indicates that your wiring is wrong unless your keyboard is in bad shape.
Check your pullup resistor value(1K-10K should be ok) and wire connections.
Are you sure that wire connections from keyboard is correct?
If your give power and ground connection properly the keyboard LEDs blink at startup.
- snufflecat
- Location: Norway
- Main keyboard: Model M
- DT Pro Member: -
By the way: Here's a mockup of how I thought I was supposed to wire it up, if it's of any interest. Could it be that I messed this up as well?
Spoiler:
- snacksthecat
- ✶✶✶✶
- Location: USA
- Main keyboard: SSK
- Main mouse: BenQ ZOWIE EC1-A
- DT Pro Member: 0205
- Contact:
I got this sweet leaf spring keyboard from IdleThock a while back.
I built this little converter for it and flashed it with the TMK PS2 converter with JIS keymap.
The keymap is a bit too complex and unfamiliar for me so I'd like to dumb it down to my level. I'd like to remap a bunch of the keys to be more like an ANSI keyboard that I'm used to. Just wondering if anyone has suggestions on the best way to get started. I'm wondering if I should start from the JIS keymap and modify it, start from standard keymap and modify it, or just start from scratch.
Sorry if this is a dumb question! I've used TMK for a handwire before with really nice results but never tinkered with the converter.
Spoiler:
Spoiler:
Sorry if this is a dumb question! I've used TMK for a handwire before with really nice results but never tinkered with the converter.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
@snacksthecat
many unfamiliar keys...
You can see ps/2 scan codes with 'hid_listen' if some keys on the keyboard are not supported by the converter.
Let me know the scan codes I'll be able to add support for unsupported keys.
You don't have to define specific keymap template for this keyboard, you can use unimap_plain.c to support most of keys.
many unfamiliar keys...
You can see ps/2 scan codes with 'hid_listen' if some keys on the keyboard are not supported by the converter.
Let me know the scan codes I'll be able to add support for unsupported keys.
You don't have to define specific keymap template for this keyboard, you can use unimap_plain.c to support most of keys.
- snacksthecat
- ✶✶✶✶
- Location: USA
- Main keyboard: SSK
- Main mouse: BenQ ZOWIE EC1-A
- DT Pro Member: 0205
- Contact:
Question about lock LEDs. I feel bad for even asking because I've figured this out before but I've been messing with this for a couple hours now and I'm left scratching my head.
Could anyone tell me what I should fix in my LED code to get caps lock to work? I know it depends on my wiring so I can trace that if needed. I just figured there are only a couple of different possibilities to try.
Thanks!
Could anyone tell me what I should fix in my LED code to get caps lock to work? I know it depends on my wiring so I can trace that if needed. I just figured there are only a couple of different possibilities to try.
Code: Select all
void led_set(uint8_t usb_led)
{
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// output low
DDRD |= (1<<4);
PORTD &= ~(1<<4);
} else {
// Hi-Z
DDRD &= ~(1<<4);
PORTD &= ~(1<<4);
}
}
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
It will work if the LED is placed on PD4 properly.
Yes, you have to post your wiring on pic or schematic preferably if you need more help.
EDIT: did you setup ps/2 converter with your Fujitsu leafspring keyboard? it would be helpful to know how the specific keys works if you can show us your keymap file.
Yes, you have to post your wiring on pic or schematic preferably if you need more help.
EDIT: did you setup ps/2 converter with your Fujitsu leafspring keyboard? it would be helpful to know how the specific keys works if you can show us your keymap file.