Comments (7)
I also would like to do this. They're talking about it at post #420 here:
https://geekhack.org/index.php?topic=41989.400
I tried using
ACTION_LAYER_TAP_TOGGLE(1)
instead of
LT(1, TG(1))
But again I think there's a bit more to do, based on what jack said here: https://www.reddit.com/r/olkb/comments/3iaita/layout_tips_and_tricks/cydcx21
from qmk_firmware.
I got this working, for the most part. KC_FN#
refers to the #
th item in the fn_actions
array, which calls tap toggle in the code below:
// ~/qmk_firmware/keyboard/ergodox_ez/keymaps/keymap_matrixman.c
// the defalut values are shown here, but changing them has no effect
#define TAPPING_TERM 200 // tap toggle timeout (ms)
#define TAPPING_TOGGLE 5 // tap toggle count
#define SYMB 1 // symbol layer
#define NAV 2 // nav layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP( // layer 0 : default
// some rows omitted
KC_FN1, KC_FN2, KC_RGUI, KC_MENU, KC_RCTRL,
// more rows omitted
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Tap/Toggle Layer 1 (Symbols)
[2] = ACTION_LAYER_TAP_TOGGLE(NAV) // FN2 - Tap/Toggle Layer 2 (Nav)
};
I'm not wise in the ways of preprocessor voodoo, so I don't have a good idea of why my changes to TAPPING_TERM or TAPPING_TOGGLE don't stick. If you don't care about how this will affect the behavior of your other keymaps, you can change the values globally here:
../../tmk_core/common/action_tapping.h
from qmk_firmware.
@MatrixManAtYrService I think that they also include other files that define those same variables, so I'd look for all the places they are set and see if you can determine the inheritance order.
from qmk_firmware.
Can't we have double tap for this? So hold=momentary, double tap=toggle and tap=you just got a free key!
from qmk_firmware.
@majutsushi You'd have to make a custom macro for that, but it's possible! See #57 for a quick example of using the timers. You'd probably want a counter variable to detect which tap is happening.
from qmk_firmware.
I noticed that the default keymap for Ergodox-EZ already has this behaviour working for KC_FN1
, since 2739aa8. I discovered it by accident while using the keyboard. The Egodoz-EZ doesn't actually document this; it says the bottom right key is a temporary toggle only.
It uses an approach like @MatrixManAtYrService suggested on 1 Jan, but without messing with timing.
See https://github.com/jackhumbert/qmk_firmware/blob/master/keyboard/ergodox_ez/keymaps/default/keymap.c
from qmk_firmware.
Support for the chainability mentioned won't happen unfortunately - it'll need to be a custom function with process_record_user. Closing this for now.
from qmk_firmware.
Related Issues (20)
- [Bug] If 4 rotary encoders are specified, all rotary encoders will stop responding. HOT 6
- [Bug] Caps Word get reset by normal press with interrupting character on long press HOT 2
- [Feature Request] Password manager/generator functionality HOT 1
- [Bug] Capslock randomly trigger while typing with Sofle V2 HOT 1
- Rotary Encoders - Microsoft flight simulator - MSFS Heading, Speed, Altitude Control HOT 2
- Strange behaviour of macros with lily58 HOT 1
- Compilation of TAP DANCE fails (code compiled previously). HOT 2
- Updating STENO code from an older QMK version
- qmk msys can not convert to get file uf2, fatal error HOT 1
- [Bug] Different response of keyboard depending on key pressing speed in succesion .
- [Bug] Idobao ID75 V3 (Drop) Issue with RGB Matrix
- [Bug] xd75 doesn't build on head HOT 5
- Problem flashing dztech PCBs with lufa-ms bootloader from Linux[Bug] HOT 1
- Redragon k550 mechanical rgb keyboard Request support HOT 1
- SharkyDevBoi45/qmk_firmware addition HOT 1
- [doc bug] remove ofiical support for APM32 HOT 1
- Add issue template for documentation requests (and hi, I'm back!)
- Document how `QMK_KEYBOARD_H` works and what files it includes HOT 4
- Permission Issues
- [Bug] "make sofle:rgb_default" fails with "RGBLED_SPLIT" redefined error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmk_firmware.