TMK keyboard firmware collection

yes, write code to meet your need.
hasu
User avatar

Unread post16 Nov 2016, 00:30

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
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:
  • 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

Is there a better place to perform this or what kind of problem am I looking at here?
kekstee
User avatar

Unread post25 Nov 2016, 09:46

User avatar
X
kekstee
 
Posts: 325
Joined: 10 Apr 2012, 10:21
Location: Germany
Main keyboard: HHKB Pro 2
Main mouse: Zowie FK1
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)
Phenix
User avatar
-p

Unread post08 Mar 2017, 19:47

User avatar
X
Phenix
-p
 
Posts: 1047
Joined: 06 Jan 2016, 13:06
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: -
 
 
-p
I missed to add: pin-mapping is still with Soarers, atm looking into changing pins in the makefile(not successfull so far)
Phenix
User avatar
-p

Unread post08 Mar 2017, 20:29

User avatar
X
Phenix
-p
 
Posts: 1047
Joined: 06 Jan 2016, 13:06
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: -
 
 
-p
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 :D You have to compile to get this fix worked, keymap editor is not updated yet.

Report if you have any problem with this fix.
hasu
User avatar

Unread post31 May 2017, 02:51

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
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.
Last edited by Mr.Bean on 03 Jun 2017, 21:00, edited 2 times in total.
Mr.Bean
User avatar

Unread post03 Jun 2017, 16:48

User avatar
X
Mr.Bean
 
Posts: 114
Joined: 24 Aug 2011, 06:16
Location: Belgium
Main keyboard: Ergodox
Main mouse: Logitech g9x
Favorite switch: BS
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.
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
User avatar

Unread post03 Jun 2017, 19:33

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
Thanks, I will look in to it.
Mr.Bean
User avatar

Unread post03 Jun 2017, 23:59

User avatar
X
Mr.Bean
 
Posts: 114
Joined: 24 Aug 2011, 06:16
Location: Belgium
Main keyboard: Ergodox
Main mouse: Logitech g9x
Favorite switch: BS
DT Pro Member: -
 
Zarugal

Unread post28 Aug 2017, 20:27

X
Zarugal
 
Posts: 6
Joined: 20 Aug 2017, 00:02
Location: England
DT Pro Member: -
 
Zarugal wrote:https://deskthority.net/workshop-f7/help-with-keymapping-t17275.html#p383951

Zarugal 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.

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

If I use K10 on the top row, my second row will no longer work, so what do I use?

Use K1G :D
hasu
User avatar

Unread post28 Aug 2017, 22:05

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
Thanks for the help! But would it be K0G on the top row, and then K1G underneath it on the second?
Zarugal

Unread post28 Aug 2017, 22:09

X
Zarugal
 
Posts: 6
Joined: 20 Aug 2017, 00:02
Location: England
DT Pro Member: -
 
Zarugal wrote:Thanks for the help! But would it be K0G on the top row, and then K1G underneath it on the second?

ah, youre rite.
hasu
User avatar

Unread post28 Aug 2017, 22:31

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
Ah cool, just wanted to check! Thank you!
Zarugal

Unread post30 Aug 2017, 13:14

X
Zarugal
 
Posts: 6
Joined: 20 Aug 2017, 00:02
Location: England
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 https://deskthority.net/keyboards-f2/converting-an-old-typewriter-into-a-mechanical-keyboard-in-process-t17317.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.
SpacemanToby

Unread post28 Sep 2017, 19:46

X
SpacemanToby
 
Posts: 100
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Main keyboard: Alps Typewriter Conversion
Favorite switch: Alps SKCL Green
DT Pro Member: -
 
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 https://deskthority.net/keyboards-f2/converting-an-old-typewriter-into-a-mechanical-keyboard-in-process-t17317.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.

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.
hasu
User avatar

Unread post29 Sep 2017, 01:52

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
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.
SpacemanToby

Unread post29 Sep 2017, 03:34

X
SpacemanToby
 
Posts: 100
Joined: 30 Aug 2017, 14:04
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.
SpacemanToby

Unread post03 Oct 2017, 02:10

X
SpacemanToby
 
Posts: 100
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Main keyboard: Alps Typewriter Conversion
Favorite switch: Alps SKCL Green
DT Pro Member: -
 
then, try removing wire from mcu pin of the column next. If it still fires the '7yhb' you should check your codes.
hasu
User avatar

Unread post04 Oct 2017, 01:43

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
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.
SpacemanToby

Unread post04 Oct 2017, 03:35

X
SpacemanToby
 
Posts: 100
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Main keyboard: Alps Typewriter Conversion
Favorite switch: Alps SKCL Green
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.

IMG_2929.JPG
snufflecat
User avatar

Unread post25 Apr 2018, 16:06

User avatar
X
snufflecat
 
Posts: 95
Joined: 27 Oct 2017, 12:09
Main keyboard: Wang 724 / Model M
Favorite switch: Salmon Alps
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.
hasu
User avatar

Unread post25 Apr 2018, 22:48

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
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.

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.

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
User avatar

Unread post26 Apr 2018, 08:00

User avatar
X
snufflecat
 
Posts: 95
Joined: 27 Oct 2017, 12:09
Main keyboard: Wang 724 / Model M
Favorite switch: Salmon Alps
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. :)
snufflecat
User avatar

Unread post28 Apr 2018, 15:30

User avatar
X
snufflecat
 
Posts: 95
Joined: 27 Oct 2017, 12:09
Main keyboard: Wang 724 / Model M
Favorite switch: Salmon Alps
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.
hasu
User avatar

Unread post28 Apr 2018, 23:41

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
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.

Thank you Hasu. Here are some pictures of what I discovered this morning, and what I might suspect is the reason for my errors:
IMG_3031.JPG
One of the wires going from the cable to the Teensy melted. I have no idea why I didn't notice this before.

IMG_3032.JPG
A tiny drop of solder on the Teensy. This is because of my very bad skills with soldering.


:oops:
snufflecat
User avatar

Unread post30 Apr 2018, 14:28

User avatar
X
snufflecat
 
Posts: 95
Joined: 27 Oct 2017, 12:09
Main keyboard: Wang 724 / Model M
Favorite switch: Salmon Alps
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:
Screen Shot 2018-04-25 at 15.43.08.png
snufflecat
User avatar

Unread post02 May 2018, 08:17

User avatar
X
snufflecat
 
Posts: 95
Joined: 27 Oct 2017, 12:09
Main keyboard: Wang 724 / Model M
Favorite switch: Salmon Alps
DT Pro Member: -
 
I got this sweet leaf spring keyboard from IdleThock a while back.

Spoiler:
Image

I built this little converter for it and flashed it with the TMK PS2 converter with JIS keymap.

Spoiler:
Image

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.
snacksthecat
User avatar
✶✶✶✶

Unread post12 May 2018, 23:23

User avatar
X
snacksthecat
✶✶✶✶
 
Posts: 356
Joined: 04 Jun 2017, 15:47
Location: USA
Main keyboard: IBM SSK (typing) / Custom 75% Zealio (gaming)
Main mouse: BenQ ZOWIE EC1-A
Favorite switch: Dampened Cream Alps (minus dampeners)
DT Pro Member: 0205
 
@snacksthecat
many unfamiliar keys... :D
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.
hasu
User avatar

Unread post16 May 2018, 04:24

User avatar
X
hasu
 
Posts: 372
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
DT Pro Member: -
 
Previous

Who is online

Users browsing this forum: darkcruix, PlacaFromHell, wim_board and 54 guests