summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
AgeCommit message (Collapse)AuthorFilesLines
2019-05-03New keycode macro (XP) for shifted character pairs using UNICODEMAP + bug ↵Konstantin Đorđević6-35/+64
fixes and improvements (#4803) * Expose unicode_saved_mods * Add UNICODEMAP shift pair functionality and XS keycode * Add XS to keycode reference documentation * Pick pair index based on both Shift and Caps Lock state * Add XS to Unicode feature docs * Clean up process_unicode* headers * Extract unicode_map index calculation into function * Pick pair index as XOR rather than OR of Shift and Caps states * unicode_input_start() has to be called before the unicode_map index is calculated * Replace unicodemap_input_error() with more generic unicode_input_cancel() * Replace register+tap+unregister with tap_code16(LCTL(LSFT(KC_U))) * UNICODE_OSX_KEY → UNICODE_KEY_OSX, UNICODE_WINC_KEY → UNICODE_KEY_WINC * Make keycode range checks more robust * Fix keycode range checks for different input modes * Add UNICODE_KEY_LNX, update docs * QK_UNICODEMAP_SHIFT → QK_UNICODEMAP_PAIR * XS → XP, update docs * Tweak Unicode docs * Use recently added MOD_MASK_SHIFT and IS_HOST_LED_ON helpers * Update Unicode table in docs/keycodes.md * Update Unicode docs per review comments * Replace references to Mac OS X with macOS in Unicode docs * As of v0.9.0, WinCompose supports all possible code points * Expand descriptions in XP docs * Update keycode table and cycling docs * Further expand cycling docs
2019-04-30Simple extended space cadet (#5277)XScorpion22-0/+167
* Simplifying and Extending Space Cadet to work on Ctrl and Alt keys * PR Review feedback * Reverting back to keycodes
2019-04-14fix combo enabling logic (#5610)Bob1-2/+2
2019-04-08Switch process_combo to using global register and timer (#2561)Bob2-124/+148
Since combos keep local state about what keys have been previously pressed, when combos are layered, multiple keypresses will register for any key with multiple combos assigned to it. In order to fix this, I switched process_combo to use a global keycode / keyrecord register and timer. When a keypress is consumed by a combo, it gets stored in the register and the timer is updated; when the next keypress takes too long or a key is pressed that isn't part of any combo, the buffer is emitted and the timer reset. This has a few side effects. For instance, I couldn't _not_ fix combo keys printing out of order while also fixing this bug, so combo keys print in order correctly when a combo fails. since combos no longer have local timers, the logic around when combos time out has changed. now that there is a single timer pressing any combo key (including one in a different combo) will reset the timer for all combos, making combo entry a little more lenient. Since combos no longer have local keycode / keyrecord state, there is an edge case where incomplete combo keys can be consumed. if you have a combo for a+s = tab and a combo for b+n = space, if you press a+b+n, only a space will be emitted. This is because when b+n completes successfully, it drops the register.
2019-03-17Unicode fix for new wincompose version (#5082)cubimon1-0/+3
* unicode fix for new wincompose version * move wincompose case to linux * Change unicode input end to enter
2019-02-24Fix Tx Bolt ghosting second character on key press (#5229)Tobias Schulte1-22/+24
* convert tabs to spaces * fix #4578: don't call gemini protocol code when in bolt mode Add missing break; statements in switch. The missing break resulted in a fall through and an additional processing of the gemini code.
2019-02-18Fix Audio Clicky by adding missing punctuation (#5171)Drashna Jaelre1-1/+1
2019-02-15Remove problematic unicode_map stub definition in process_unicodemap.c (#5110)Konstantin Đorđević2-3/+2
* Remove problematic unicode_map stub definition in process_unicodemap.c * Add unicode_map declaration to process_unicodemap.h * Disable UNICODEMAP on converter boards that don't use it
2019-02-15Fix ARM Audio issues and its EEPROM persistence (#4936)Drashna Jaelre1-12/+14
* Don't click if turning audio off On ARM, playing the click when turning off audio causes the audio get stuck and continually play the tone * Fix Audio EEPROM support for ARM * Update touched files to conform to QMK Coding Conventions * Add better check for ARM EEPROM support
2019-01-25Fix process_combo which assign -1 to uint16_t (#3697)Drashna Jaelre2-9/+10
2019-01-18Allows Terminal to use ModTap/LayerTap keys (#4586)Mislav Čakarić1-0/+6
* fixes #4583 * #4583 - terminal also handles layer tap now
2019-01-07Improve consistency in UNICODEMAP code and docs, update ↵Konstantin Đorđević3-20/+19
docs/understanding_qmk (#4774) * Remove unused UNICODE(n) macro, update docs * Add note about max length of unicode_map to docs * QK_UNICODE_MAP → QK_UNICODEMAP * Refactor process_unicode_map * process_unicode_map → process_unicodemap This is done for consistency: UNICODEMAP is the method (hence UNICODEMAP_ENABLE, process_unicodemap), whereas unicode_map is the mapping table itself. * Update references and ordering in docs/understanding_qmk * Add additional note to docs/understanding_qmk * &unicode_map[index] → unicode_map + index This avoids the issue of the compiler sometimes complaining about the array index being out of range * Update docs/getting_started_make_guide * Update method sections in docs/feature_unicode
2018-12-30Register the interrupting keycode in the tap dance state structGiuseppe Rota2-0/+3
2018-12-29Fix leader processingGiuseppe Rota1-2/+0
2018-12-21Fix up process_leader to be a bit more optimized (#4662)Drashna Jaelre2-21/+32
* Fix up process_leader to be a bit more optimized * Process dual function keys better * Make leader start a callable function * Fix per key timer call location * Add escape if already leading * Return false for KC_LEAD * Add documentation
2018-12-19Overhaul Unicode Common functionality (#4325)Drashna Jaelre8-99/+190
* Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix spacing Co-Authored-By: drashna <drashna@live.com> * Because I missed it! Co-Authored-By: drashna <drashna@live.com> * Fix spacing Co-Authored-By: drashna <drashna@live.com> * SPAAAAAAAAAACing Co-Authored-By: drashna <drashna@live.com> * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna <drashna@live.com> * non-breaking Co-Authored-By: drashna <drashna@live.com> * Considered that Co-Authored-By: drashna <drashna@live.com> * Yuuup Co-Authored-By: drashna <drashna@live.com> * consistency Co-Authored-By: drashna <drashna@live.com> * white spaces .... copied from elsewhere Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna <drashna@live.com> * remove merge artifacts * Unicode common cleanup (#17) * Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix white spaces Co-Authored-By: drashna <drashna@live.com> * Fix spacing Co-Authored-By: drashna <drashna@live.com> * Because I missed it! Co-Authored-By: drashna <drashna@live.com> * Fix spacing Co-Authored-By: drashna <drashna@live.com> * SPAAAAAAAAAACing Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna <drashna@live.com> * non-breaking Co-Authored-By: drashna <drashna@live.com> * Considered that Co-Authored-By: drashna <drashna@live.com> * Yuuup Co-Authored-By: drashna <drashna@live.com> * consistency Co-Authored-By: drashna <drashna@live.com> * white spaces .... copied from elsewhere Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna <drashna@live.com> * Rearrange process_unicode_common functions * Make Unicode input mode constants (UC_*) an enum * Simplify unicode_input_start/finish code * Make the key used for WinCompose configurable * Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY * Update Unicode input mode doc * Add descriptions and rearrange definitions in process_unicode_common.h * Add registry command to Unicode docs + misc updates * Reword an explanation in Unicode docs * Add TODO comment * Remove trailing whitespace * Improve Cycling documentation * Add Unicode Input method Cycling support (#19) * Standardize the Unicode EEPROM code * Remove unicode init from process_record_* functions * Add unicode init to where it belongs: matrix_init_quantum * Move Unicode proccessing to unicode common * Add audio feedback to input mode keys to drive konstantin up a wall * Tap_code cleanup * Update keycodes * Update unicode documentation * Update unicode keycodes for consistency/easier merge * Add Audio Feedback section * Remove Functions from feature page And link to the file instead. Link to specific lines later on. * Fix white spaces Co-Authored-By: drashna <drashna@live.com> * Fix spacing Co-Authored-By: drashna <drashna@live.com> * Because I missed it! Co-Authored-By: drashna <drashna@live.com> * Fix spacing Co-Authored-By: drashna <drashna@live.com> * SPAAAAAAAAAACing Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * Add BSD for future compatibility * Thought I fixed that! Co-Authored-By: drashna <drashna@live.com> * non-breaking Co-Authored-By: drashna <drashna@live.com> * Considered that Co-Authored-By: drashna <drashna@live.com> * Yuuup Co-Authored-By: drashna <drashna@live.com> * consistency Co-Authored-By: drashna <drashna@live.com> * white spaces .... copied from elsewhere Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * white spaces Co-Authored-By: drashna <drashna@live.com> * Update keycode defines * Fix Linux Song * Update all of the songs * Cleanup * Move and update check to ensure only one unicode method is enabled * Update quantum/quantum_keycodes.h * Update documentation * Wordsmithing and cleanup * Format unicode_common (#13) * case alignment * process_record_unicode_common → process_unicode_common * Move song arrays into function where they're used, align preprocessor directives * Swap the order of UC_WIN and UC_BSD * Update Unicode docs * Reorder Unicode mode stuff to match the order of input mode constants * Fix capitalization in doc subtitle * Readd BSD and OSX_RALT songs * Reword BSD note in docs * Readd BSD keycode description * Reword explanation of input on different platforms * Steal vomindoraan's input mode documentation Co-Authored-By: vomindoraan (vomindoraan@gmail.com) * Willingly give Drashna the rest of my Unicode doc improvements * Wordsmithing Co-Authored-By: drashna <drashna@live.com> * Rearrange process_unicode_common functions * Make Unicode input mode constants (UC_*) an enum * Simplify unicode_input_start/finish code * Make the key used for WinCompose configurable * Remove UC_OSX_RALT in favor of setting the key with UNICODE_OSX_KEY * Update Unicode input mode doc * Add descriptions and rearrange definitions in process_unicode_common.h * Add registry command to Unicode docs + misc updates * Reword an explanation in Unicode docs * Add TODO comment * Add cycle_unicode_input_mode and UNICODE_SELECTED_MODES macro * Add an option for making cycle changes persistent * Add debug prints to functions that change input_mode * Use cycle_unicode_input_mode in whitefox/konstantin * Add persist_unicode_input_mode function * Add offset to cycle to allow stepping in reverse * Add keycodes: UNICODE_MODE_FORWARD, UNICODE_MODE_REVERSE Aliases: UC_MOD, UC_RMOD (respectively) * REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts * Fix wrong constant name * Revert "REVERT ME: Undo changes to whitefox/konstantin to avoid conflicts" This reverts commit 42676bf251fc8e3823f5e614dad6e510ba47a2f3. * Change dprintf text * Give selected modes priority over EEPROM when !UNICODE_CYCLE_PERSIST * Remove trailing whitespace * Cleanup of RALT code and unicode compilation stuff * Remove else for unicode handling
2018-12-15Per Key Leader Timing Option (#4026)Alexander Kagno1-0/+6
* leader changes to enable per key timing option * Changes requested to docs for @drashna * Changes requested by @drashna
2018-11-20Fix UCIS codeDrashna Jaelre1-2/+4
Revert code change that broke UCIS due to bad suggestions
2018-10-19Fix Unicode EEPROM handling so it is consistent. (#4066)Drashna Jaelre5-15/+17
* Fix Unicode EEPROM handling so it's consistant * Remove changes to my userspace * Optimize variables used * fix functions * additional cleanup * Add False Flag * rename function
2018-10-07Add non-US Hash and Backslash to AutoShift handlingDrashna Jaelre1-0/+2
2018-10-03process_ucis: Add a callback for success (#4067)martinakcsilla2-0/+9
There is `qk_ucis_symbol_fallback` for the case where symbol lookup fails, but there wasn't one for the success case. This adds `qk_ucis_success`, called after successfully finishing the UCIS symbol input. Thanks to @drashna for the idea! Signed-off-by: Csilla Nagyné Martinák <csilla@csillger.hu>
2018-10-02Add send_unicode_hex_string function (#3828)Drashna Jaelre2-0/+29
* Add send_string_unicode function Co-authored-by: kdb424 <kdb424@gmail.com> Co-authored-by: Konstantin <vomindoraan@gmail.com> * Clean up code based on feedback * Fix includes
2018-10-01Adds default value for TAPPING_TERM if Tap Dance is enabled (#2785)Drashna Jaelre1-0/+4
* Force require TAPPING_TERM if Tap Dance is enabled * Handle lack of TAPPING_TERM more gracefully
2018-09-28Make Audio Clicky's randomness a floatDrashna Jaelre1-2/+3
Rather than a define, but read from the define. This way, a smart coder could externally configure the randomness, changing it on the fly This is also a precursor step to adding full on support for configurable randomness.
2018-09-25Add On/Off keycodesDrashna Jaelre2-7/+11
2018-09-25Add functions so you can configure programaticallyDrashna Jaelre2-18/+51
2018-09-25Store Clicky status in EEPROMDrashna Jaelre1-7/+7
2018-09-17Make `PREVENT_STUCK_MODIFIERS` the default (#3107)Joe Wasson3-109/+1
* Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
2018-08-19Fix process_combo which assign -1 to uint16_tShihpin Tseng2-9/+10
2018-07-16Adds support for Planck Rev 6 (#2666)Jack Humbert4-15/+29
* initial files for rev 6 with encoder * music map init, dip scan added * adds ws2812 driver for arm * flesh out dip and encoder support * adds default encoder res * adds default encoder res * start muse implementation * muse working with encoder as control * flip direction * try mouse wheel again * dont break other revs * dont break other revs * conditional autio * pwm ws driver (not working) * update build includes for chibios * update ws2812 driver/config * last commit for glasser code * working example * remove rgb for now * finish up rev6 * working encoder keycodes * add warnings to planck keymaps about the LAYOUT
2018-07-15Fix tapdance when one-shot is disabled.Joe Wasson1-0/+6
2018-05-17Fixed sprintf overflowM1K3L081-1/+1
2018-05-16Add default to LEADER_TIMEOUT in case it's not defined (#2818)Drashna Jaelre2-3/+6
* Add default to LEADER_TIMEOUT in case it's not defined * Update Leader Timeout default
2018-05-08updated music maskJack Humbert2-10/+28
2018-05-02Update to drashna keymaps and userspace (#2876)Drashna Jaelre1-1/+0
* Fix Unicode sample * Add irony mark * Remove unpretty keymaps * Add QMK DFU and Conditional Music Mode * Unicode fixes * Unicode fixes * Make layer indication more modular * Finish removing Faux Click * Cleanup of UserSpace and addition of 'update_tri_layer_state' function * Add modifier status indicators to Orthodox * Remove tri layer function * Minor tweaks * Remove the Orthodox's Indicator's reliance on layer_state_set * Add custom EEPROM settings * Make EEPROM config more efficient * Viterbi Config * Add Iris Keyboard layout and Userspace cleanup * Iris keyboard tweaks * Use Grave Escape on Iris * Update Readmes
2018-05-01Added command history to terminal with other bug fixes, added new song to ↵M1K1-14/+111
song_list.h (#2855) * Implemented Terminal + added song to song_list.h * Added wait() in order to prevent misbehaviour of 'command not found'
2018-04-28Fix Clicky Down codeDrashna Jaelre1-1/+1
2018-04-21Fix Audio Clicky sub-feature (#2784)Drashna Jaelre3-65/+79
* Fix Audio Clicky feature * Add to features
2018-04-21Update to drashna keymaps and userspace (#2756)Drashna Jaelre1-1/+1
* Re-add NO_SECRETS option * Add Thumb Clusters defines for default layout * Minor tweaks * More Minor tweaks * Revert Orthodox layers and move function keys around * Fix keymap so it will compile under the Infinity Since I haven't added 'pretty' layouts to it yet * Cleanup of userspace * Cleanup keymaps * OMG fix Workman * Move mods layer key around * Reduce debounce in Ergodox EZ * Fix Infinity layers * Add list of pins used by Ergdox EZ for easy reference * Revert "Reduce debounce in Ergodox EZ" This reverts commit 8a3db2673b419ef8032c40a6d29156cef632f9cd. * Add Clicky toggle to Orthodox * Fix Audio Clicky keycode * Enable Faux Clicky by default * Add Unicode stuff
2018-04-19Add Faux Clicking as subset of Audio feature (#2748)Drashna Jaelre1-1/+68
* Add Faux Clicky to main Audio feature * Make clicky settings user configurable * Add additional documentation * Don't play when music mode is enabled (hopefully)
2018-04-19Added bending to MIDI (#2740)adiron1-0/+20
This is done via MI_BENDD and MI_BENDU. At the moment the value is hardcoded and cannot be adjusted (future commit?) and is the max for the `midi_send_pitchbend` function (up or down). `MI_BENDD` and `MI_BENDU` both require `#define MIDI_ADVANCED` MIDI pitch bend was already implemented in `protocol/midi.c`, I merely added the keycodes to trigger them. :) (thanks to Jack, two years ago in commit fb4fe52c apparently)
2018-04-07Improve state/chord handling and clean up namespaceSeebs2-49/+91
Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false.
2018-03-26add grave to auto-shift.Jason Stillwell1-0/+1
2018-03-16Rule to enable Modifiers with Auto-Shift (#2542)Jason Stillwell1-0/+4
* Re-enable modifiers with auto-shift * Auto-shift modifiers rule * missed a line * Documentation * fixing whitespace
2018-03-16Fixed various keymaps and the allocation of "key_combos" (#2526)Brian Choromanski1-1/+1
* Fixed plank keymaps so that they will compile for planck light * tv44:budi now compiles * s60_x:amnesia0287 now compiles * Fixed allocation of key_combos so that narze keymap for planck can compile correctly * Disabled rgb on ergodone and infinity * Enabled tap dance so it compiles * Added return statement so it compiles * If compiling on light disable extra functionality * Properly redefined variable so it compiles
2018-02-08Merge ChibiOS and LUFA descriptor support (#2362)fredizzimo2-27/+36
* Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude
2018-02-04Fixes to get tap dance to fire at proper places (#2272)scauligi2-31/+49
* tap dance fixes: fire immediately upon completion and also get properly interrupted before macros * bugfix for tapdance improvement * fix build
2018-01-12added the possibility to hav shifted(modded) tap dancepmalecka2-0/+5
2017-12-20Add on/off/toggle keycodes for Auto ShiftDrashna Jael're2-10/+38
2017-12-20Add toggle option to AutoShiftU-LANDSRAAD\drashna1-0/+13