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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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: 277
Joined: 10 Apr 2012, 10:21
Location: Germany
Main keyboard: HHKB Pro 2
Main mouse: Zowie FK1
Club 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: 934
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
Club member: 0176
 
 
-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: 934
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
Club member: 0176
 
 
-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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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: 113
Joined: 24 Aug 2011, 06:16
Location: Belgium
Main keyboard: Ergodox
Main mouse: Logitech g9x
Favorite switch: BS
Club 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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club member: -
 
Thanks, I will look in to it.
Mr.Bean
User avatar

Unread post03 Jun 2017, 23:59

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

Unread post28 Aug 2017, 20:27

X
Zarugal
 
Posts: 6
Joined: 20 Aug 2017, 00:02
Location: England
 
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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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
 
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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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
 
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: 39
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Club 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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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: 39
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Club 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: 39
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Club 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: 354
Joined: 02 Sep 2011, 14:47
Location: Japan
Main keyboard: HHKB
Main mouse: HHKB
Favorite switch: Topre
Club 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: 39
Joined: 30 Aug 2017, 14:04
Location: North Carolina
Club member: -
 
Previous

Who is online

Users browsing this forum: andrea-i, clee, Creator, Ir0n and 59 guests