Commit graph

290 commits

Author SHA1 Message Date
precondition
7060cb7b26
Refactor steno and add STENO_PROTOCOL = [all|txbolt|geminipr] (#17065)
* Refactor steno into STENO_ENABLE_[ALL|GEMINI|BOLT]

* Update stenography documentation

* STENO_ENABLE_TXBOLT → STENO_ENABLE_BOLT

TXBOLT is a better name but BOLT is more consistent with the
pre-existing TX Bolt related constants, which all drop the "TX " prefix

* Comments

* STENO_ENABLE_[GEMINI|BOLT|ALL] → STENO_PROTOCOL = [geminipr|txbolt|all]

* Add note on lacking V-USB support

* Clear chord at the end of the switch(mode){send_steno_chord} block

* Return true if NOEVENT

* update_chord_xxx → add_xxx_key_to_chord

* Enable the defines for all the protocols if STENO_PROTOCOL = all

* Mention how to use `steno_set_mode`

* Set the default steno protocol to "all"

This is done so that existing keymaps invoking `steno_set_mode` don't
all suddenly break

* Add data driver equivalents for stenography feature

* Document format of serial steno packets

(Thanks dnaq)

* Add missing comma
2022-06-23 20:43:24 +02:00
Jouke Witteveen
1706da9054
tap-dance: Restructure code and document in more detail (#16394) 2022-06-13 22:12:55 +02:00
QMK Bot
d6402fe9fb Merge remote-tracking branch 'origin/master' into develop 2022-06-05 11:15:11 +02:00
Pascal Getreuer
95d20e6d8b
Fix and add unit tests for Caps Word to work with Unicode Map, Auto Shift, Retro Shift. (#17284)
* Fix Caps Word and Unicode Map

* Tests for Caps Word + Auto Shift and Unicode Map.

* Fix formatting

* Add additional keyboard report expectation macros

This commit defines five test utilities, EXPECT_REPORT, EXPECT_UNICODE,
EXPECT_EMPTY_REPORT, EXPECT_ANY_REPORT and EXPECT_NO_REPORT for use with
TestDriver.

EXPECT_REPORT sets a gmock expectation that a given keyboard report will
be sent. For instance,

  EXPECT_REPORT(driver, (KC_LSFT, KC_A));

is shorthand for

  EXPECT_CALL(driver,
      send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A)));

EXPECT_UNICODE sets a gmock expectation that a given Unicode code point
will be sent using UC_LNX input mode. For instance for U+2013,

  EXPECT_UNICODE(driver, 0x2013);

expects the sequence of keys:

  "Ctrl+Shift+U, 2, 0, 1, 3, space".

EXPECT_EMPTY_REPORT sets a gmock expectation that a given keyboard
report will be sent. For instance

  EXPECT_EMPTY_REPORT(driver);

expects a single report without keypresses or modifiers.

EXPECT_ANY_REPORT sets a gmock expectation that a arbitrary keyboard
report will be sent, without matching its contents. For instance

  EXPECT_ANY_REPORT(driver).Times(1);

expects a single arbitrary keyboard report will be sent.

EXPECT_NO_REPORT sets a gmock expectation that no keyboard report will
be sent at all.

* Add tap_key() and tap_keys() to TestFixture.

This commit adds a `tap_key(key)` method to TestFixture that taps a
given KeymapKey, optionally with a specified delay between press and
release.

Similarly, the method `tap_keys(key_a, key_b, key_c)` taps a sequence of
KeymapKeys.

* Use EXPECT_REPORT, tap_keys, etc. in most tests.

This commit uses EXPECT_REPORT, EXPECT_UNICODE, EXPECT_EMPTY_REPORT,
EXPECT_NO_REPORT, tap_key() and tap_keys() test utilities from the
previous two commits in most tests. Particularly the EXPECT_REPORT
macro is frequently useful and makes a nice reduction in boilerplate
needed to express many tests.

Co-authored-by: David Kosorin <david@kosorin.net>
2022-06-05 09:14:02 +02:00
Nick Brassel
8545473307
Removes terminal from QMK. (#17258) 2022-05-30 22:38:08 -07:00
Pascal Getreuer
b5608cbb6d
Continue Caps Word when AltGr (right Alt) is held. (#17156)
This is a minor bug fix for Caps Word. Currently, Caps Word turns off
whenever a non-shift mod becomes active. This is done to avoid
interfering with hotkeys.

This commit makes an exception to continue Caps Word when AltGr (right
Alt) is held. Outside the US, the AltGr key is used to type additional
symbols (https://en.wikipedia.org/wiki/AltGr_key). Depending on the
language, these may include symbols used within words like accented
letters where it would be desirable to continue Caps Word.
2022-05-20 01:39:00 +01:00
Drashna Jaelre
db887e63d7
Enhancement and fixes of "Secure" feature (#16958) 2022-05-14 23:07:08 +01:00
Pascal Getreuer
68b16bba68
[Core] Add Caps Word feature to core (#16588)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2022-05-14 16:00:32 +10:00
Jouke Witteveen
8f585153c4
Add GET_TAPPING_TERM macro to reduce duplicate code (#16681)
* Add GET_TAPPING_TERM macro to reduce duplicate code

The macro gives the right tapping term depending on whether per-key
tapping terms and/or dynamic tapping terms are enabled. Unnecessary
function calls and variable resolution are avoided.

Fixes #16472.

* Use GET_TAPPING_TERM for Cirque trackpads

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-04-16 11:24:09 -07:00
Joel Challis
92a61aa0cd
Implement XAP 'secure' core requirements (#16843)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-04-16 11:13:05 -07:00
Nick Brassel
1f2b1dedcc
Quantum Painter (#10174)
* Install dependencies before executing unit tests.

* Split out UTF-8 decoder.

* Fixup python formatting rules.

* Add documentation for QGF/QFF and the RLE format used.

* Add CLI commands for converting images and fonts.

* Add stub rules.mk for QP.

* Add stream type.

* Add base driver and comms interfaces.

* Add support for SPI, SPI+D/C comms drivers.

* Include <qp.h> when enabled.

* Add base support for SPI+D/C+RST panels, as well as concrete implementation of ST7789.

* Add support for GC9A01.

* Add support for ILI9341.

* Add support for ILI9163.

* Add support for SSD1351.

* Implement qp_setpixel, including pixdata buffer management.

* Implement qp_line.

* Implement qp_rect.

* Implement qp_circle.

* Implement qp_ellipse.

* Implement palette interpolation.

* Allow for streams to work with either flash or RAM.

* Image loading.

* Font loading.

* QGF palette loading.

* Progressive decoder of pixel data supporting Raw+RLE, 1-,2-,4-,8-bpp monochrome and palette-based images.

* Image drawing.

* Animations.

* Font rendering.

* Check against 256 colours, dump out the loaded palette if debugging enabled.

* Fix build.

* AVR is not the intended audience.

* `qmk format-c`

* Generation fix.

* First batch of docs.

* More docs and examples.

* Review comments.

* Public API documentation.
2022-04-13 18:00:18 +10:00
Ryan
c05e8afe45
Joystick feature updates (#16732)
* Joystick feature updates

* Move new functions to joystick.h

* Docs
2022-03-26 18:38:09 +00:00
Nick Brassel
8d5eacb7dd
Add support for encoder mapping. (#13286) 2022-03-09 19:29:00 +11:00
Ryan
f634fddd34
Remove send_unicode_hex_string() (#16518) 2022-03-04 11:04:45 +00:00
QMK Bot
63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
precondition
7148a69d5e
Pass in the keyrecord_t of the dual-role/tapping key when calling per-key tap hold functions (#15938)
* Replace keyp by &tapping_key in the record arg of per-key tap hold funcs

* Replace NULL by &(keyrecord_t){} in 2nd arg of get_tapping_term
2022-02-11 19:53:26 +00:00
Desprez Jean-Marc
5a0e129f11
[Bug] Fix layer_state restoration at end of dynamic macro feature (#16230) 2022-02-06 08:55:16 -08:00
Pete Sevander
d700447dda
Combo TAP_CODE_DELAY and clear_weak_mods (#15866) 2022-01-28 23:19:36 -08:00
QMK Bot
efbfd30318 Merge remote-tracking branch 'origin/master' into develop 2022-01-25 13:41:28 +00:00
Ryan
3e0ee6fb74
Fix joystick button off-by-one error (#16037) 2022-01-25 13:40:55 +00:00
Ryan
1d11ae3087
Rip out old macro and action_function system (#16025)
* Rip out old macro and action_function system

* Update quantum/action_util.c

Co-authored-by: Joel Challis <git@zvecr.com>
2022-01-24 21:22:20 +00:00
Ryan
b45a037c7e
Rename some Quantum keycodes (#15968)
* Rename some Quantum keycodes

* Tweak EEPROM clear and debug keycode short aliases
2022-01-22 03:34:15 +00:00
Pete Sevander
21958a9343
New combo configuration options (#15083)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
2022-01-09 12:02:25 -08:00
Joel Challis
8dbc8a802c
Unify the key up/down behaviour of RGB keycodes (#15730) 2022-01-06 18:52:32 +11:00
Ryan
c12268807d
Migrate serial_uart usages to UART driver (#15479)
* Migrate Thermal Printer feature to UART driver

* Migrate 40percentclub UT47 to UART driver

* Migrate Centromere to UART driver

* Migrate Chimera Ergo to UART driver

* Migrate Chimera Let's Split to UART driver

* Migrate Chimera Ortho to UART driver

* Migrate Chimera Ortho Plus to UART driver

* Migrate Comet46 to UART driver

* Migrate Palm USB converter to UART driver

* Migrate Sun USB converter to UART driver

* Migrate Dichotomy to UART driver

* Migrate Honeycomb to UART driver

* Migrate Mitosis to UART driver

* Migrate Redox W to UART driver

* Migrate Uni660 to UART driver

* Migrate Telophase to UART driver
2021-12-15 11:00:39 +00:00
Dipl.-Ing. Raoul Rubien, BSc
415faebd65
added missing audio_off_user() callback (#15457)
Co-authored-by: Raoul Rubien <raoul.rubienr@gmail.com>
2021-12-11 16:58:25 -08:00
Joel Challis
2726856cde
Implement MAGIC_TOGGLE_CONTROL_CAPSLOCK (#15368) 2021-11-30 17:34:08 -08:00
wheredoesyourmindgo
7f67504993
Added cancel_key_lock function (#15321) 2021-11-29 00:17:07 -08:00
precondition
4bac5f53d8
New feature: DYNAMIC_TAPPING_TERM_ENABLE (#11036)
* New feature: `DYNAMIC_TAPPING_TERM_ENABLE`

3 new quantum keys to configure the tapping term on the fly.

* Replace sprintf call in tapping_term_report by get_u16_str

* Replace tab with 4 spaces
2021-11-26 07:06:50 +11:00
Isaac Elenbaas
d9393b8684
Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts (#11059)
* Add Retro Shift and Custom Auto Shifts

* Fix compilation errors with no RETRO_SHIFT value
2021-11-25 23:12:14 +11:00
QMK Bot
25b087925c
Format code according to conventions (#15195) 2021-11-17 20:42:00 +00:00
Drashna Jael're
7e86c37962
Merge remote-tracking branch 'origin/master' into develop 2021-11-13 09:32:14 -08:00
Markus Fritsche
8323177472
add wait to unicode for win (#15061)
Co-authored-by: Markus Fritsche <fritsche.markus@gmail.com>
2021-11-12 15:00:36 -08:00
Ryan
f529580860
Basic keycode overhaul (#14726) 2021-11-03 22:22:17 -07:00
Purdea Andrei
76fb54403c
haptic: Feature to disable it when usb port is not configured or suspended. (#12692)
This also add support for specifying a LED pin to indicate haptic status,
and also adds support for a haptic-enable pin, which is useful to turn off
the boost converter on the solenoid driver.
2021-11-02 16:54:29 +11:00
Woody
f775da96b1
define to AUTO_SHIFT_DISABLED_AT_STARTUP (#14201)
Co-authored-by: agodinhost <agodinhost@globo.com>
2021-11-02 09:11:55 +11:00
Joel Challis
92385e30cd
Manually format develop (#15003) 2021-11-01 19:18:33 +00:00
QMK Bot
1fb2a0c74e Merge remote-tracking branch 'origin/master' into develop 2021-10-20 03:51:11 +00:00
Drashna Jaelre
0fd45d5984
Fix type of Tap Dance max index variable (#14887) 2021-10-19 20:50:44 -07:00
QMK Bot
034e78c083 Merge remote-tracking branch 'origin/master' into develop 2021-10-20 01:48:39 +00:00
Sergey Vlasov
c9562ebfde
Make the MAGIC_TOGGLE_GUI keycode work (#14886) 2021-10-19 18:48:01 -07:00
Purdea Andrei
eb5b24f97c
Add LM() keys to the list of keys disabled by NO_HAPTIC_MOD (#14181) 2021-10-03 12:02:05 -07:00
Marcus van Houdt
8b6c16ea1f
Add ability to use numpad digits for unicode mode UC_WIN (#14496)
Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
2021-09-21 15:23:49 -07:00
Thomas Weißschuh
83988597f4
Add Support for USB programmable buttons (#12950) 2021-09-15 08:40:22 -07:00
Drashna Jaelre
ab34ecb669
Apply TAP_CODE_DELAY to Tap Dance key sequences (#14412)
* Add  support to tap dances

* Move default tap code defines to header file
2021-09-13 00:48:11 +01:00
Purdea Andrei
9583f9f589
[Bug] Fix build error when enabling NO_HAPTIC_MOD (#14178)
Without this build would fail, if a keyboard had haptic feedback enabled,
TAPPING_TOGGLE was not overridden in a config.h, and if NO_HAPTIC_MOD was
defined in config.h.
2021-08-30 11:22:53 -07:00
Drashna Jaelre
4c4f632378
Add a toggle key for GUI On/Off in Magic feature (#13830) 2021-08-18 08:47:50 +10:00
freqmod
705774f7bf
Steno combinedkeys (#12538)
* Add support for steno keys that press adjacent keys simultaniously

* Add some docs for steno combined keys
2021-08-18 04:48:00 +10:00
Drashna Jaelre
7da97c293d
Rgb matrix/enable modes explicitly (#13758)
* Change animations to require explicet activation

* Add support for legacy config

* Make default for now

* Add LED Matrix support

* change LED Matrix docs
2021-08-18 04:19:00 +10:00
Pete Sevander
fd3dc3a997
Fix combo_disable (#13988)
- Dump key buffer when combos are disabled.
- Recursive calls to `dump_key_buffer` need to start dumping the buffer
  from index i+1 to avoid possible infinite loops.
- Handle combo key releases even though combo processing is disabled.
2021-08-14 14:45:52 +10:00