Commit Graph

184 Commits

Author SHA1 Message Date
Drashna Jaelre
582fbbc4f0 Fix bug with layer caching in get_event_keycode (#8693)
* Fix bug with layer caching in get_event_keycode

* Improve naming
2020-06-12 17:00:27 +09:00
Joel Challis
3cc7234810 Strip out features to allow minimum firmware sizes (#8645) 2020-06-12 17:00:27 +09:00
Ryan
ee1860315d Miscellaneous cleanups (#8639)
* Miscellaneous cleanups

* Cast NO_PIN
2020-06-12 17:00:27 +09:00
Drashna Jaelre
a4fcea7a90 Add Post Processing to process_record (#4892)
* Improve process_record system

Code based on @colinta's

* Rename and better handle functions

* Fix incorrect function call to process_record_user

* Add documentation for post_process_record

* Add both get_event_keycode and get_record_keycode functions

And add some comments about these functions

* Update code format

* Cleanup merge artifacts
2020-06-12 17:00:27 +09:00
brickbots
a0732543d7 Add Word Per Minute calculation feature (#8054)
* Add Word Per Minute calculation feature

* Fix copyright info

* Remove header from quantum.c, setup overloadable keycode inclusion for WPM, update docs

* Simplify logic for keycode filtering

* Adding link from summary to wpm_feature info

* Update docs/feature_wpm.md

Typo in function prototype example in docs

Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>

* Add WPM transport via i2c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-06-12 17:00:27 +09:00
Joel Challis
646de31974 Add support for Bootmagic lite when using SPLIT_HAND_PIN (#8347)
* Add support for Bootmagic lite when using SPLIT_HAND_PIN

* Deduplicate bootmagic_lite logic from within via

* Revert location of defaults so that user overrides still work for now

* Tidy up code slightly
2020-06-12 17:00:27 +09:00
Joel Challis
ae484e34a0 Fix recent clang-format breaking quantum.c (#8282) 2020-06-12 17:00:27 +09:00
James Young
f01c45ef54 2020 February 29 Breaking Changes Update (#8064) 2020-06-12 17:00:27 +09:00
Joel Challis
39466aa7c4 Run clang-format manually to fix recently changed files (#7934)
* Run clang-format manually to fix recently changed files

* Run clang-format manually to fix recently changed files - revert template files

* Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
2020-03-26 00:42:11 -07:00
Ted M Lin
6f1f085b2d Reduce PROGMEM usage for sendstring LUT (#8109)
* Reduce PROGMEM usage for keycode map

Bit-pack the keycode bool array to gain back a small amount of flash space.
The trade-off is an increase in runtime instructions when running macros.

It does make the code a bit harder to read, as well as maintain.

For configs that use send_string() et al, it saves ~100 bytes.

* Switch to macro and common definition

Rewrite the array declarations so both the unpacked (original) and
packed LUT arrays can use the same value definitions. This is done by
defining a macro that "knows what to do".

This makes the code much easier to read and maintain.

* Fix macro typos and improve perf

Pack the bits in a more efficient order for extraction.
And also fix the copy/paste error in the macro...

* Switch fully to packed LUT

Some minor reformatting.
Compile tested all sendstring_xyz.h to make sure they were converted
properly. Also checked that an unconverted version would generate a
compile error.

* Apply whitespace suggestions from code review

Co-Authored-By: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-03-24 16:04:05 +09:00
Nick Brassel
4771cc9f63 Add support for delays in send_string. (#8244) 2020-03-24 16:04:05 +09:00
Joel Challis
4885430361 Run clang-format manually to fix recently changed files (#7934)
* Run clang-format manually to fix recently changed files

* Run clang-format manually to fix recently changed files - revert template files

* Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
2020-02-26 10:15:12 +09:00
Joel Challis
f23bfa24d1 Relocate grave keycode processing (#8082)
* Relocate grave keycode processing

* Tidy up code

* Refactor grave -> grave_esc
2020-02-26 10:15:12 +09:00
Joel Challis
5b6592f616 Move rgblight and backlight task to common location (#7733) 2020-02-26 10:15:12 +09:00
Drashna Jael're
39a9486b35 Cleanup oryx init check 2020-02-26 10:15:12 +09:00
Drashna Jael're
6198382cb1 Cleanup magic number and functions 2020-02-26 10:15:12 +09:00
Drashna Jael're
66d48534b1 Move webusb pairing key back into quantum 2020-02-26 10:15:12 +09:00
Drashna Jael're
3b71e1e819 Implement core communication 2020-02-26 10:15:12 +09:00
Wilba
9b9e5e1d47 VIA configurator refactor 2020-02-26 10:15:12 +09:00
Drashna Jael're
e41ab50016 Start moving code out of webusb and to Oryx feature 2020-02-26 10:15:12 +09:00
Drashna Jaelre
0c676d6e47 Move webusb.h includes to quantum.h (#244)
Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
Drashna Jaelre
493c675778 Big keycode cleanup (#230)
* clean up quantum.c (#7485)

* idea

* progress

* more stuff

* wip

* wip

* last couple of keycodes you can move safely

* Update quantum/quantum.c

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Put back RGB_MODE_BREATHE

* Compile out some keycode processing when features are disabled (#7506)

* Add shift-to-invert to remaining directional RGB_* keycode pairs (#7484)

* Add shift-to-invert to remaining directional RGB_* keycode pairs

RGB_MODE_FORWARD / RGB_MODE_REVERSE invert their functions when shift is held.
This change adds the same capabilities to the remaining directional RGB_*
keycode pairs.  This improves consistency and provides full RGB control in a
keymap containing only one keycode from each pair.

* remove redundant variable

* fix typo

* Fix more typos

Flyspell is on now I swear!

* Relocate magic keycode processing (#7512)

* Move magic keycode processing to own file

* Save some bytes

* Update comments

* Update define to one thats not already used...

* Fix audio

* Fix breathing toggle when rgb is disabled (#7550)

* Ifdef MAGIC_EE_HANDS until #178 drops

revert this commit once it does

* Add short aliases for Magic keycodes (#7541)

* Add short alias for `MAGIC_TOGGLE_NKRO`

* Add aliases for the other Bootmagic keycodes

* Replace long form in default keymaps

* Fix FORCE_NKRO handling (#7601)

* Add until #173 drops

* Relocate RGB keycode processing (#7508)

* Move rgb keycode logic to process_keycode

* Fixes for rgb matrix

* Fixes for mxss

* Fix inc/dec logic, add comments

* Fix return RAINBOW_SWIRL logic

* stop external use of rgb helper functions

* merge fix

* Fix 'defined but not used' when all animations are disabled

Co-authored-by: Yan-Fa Li <yanfali@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com>
Co-authored-by: fauxpark <fauxpark@gmail.com>
Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
fauxpark
81126b6673 New and improved lock LED callbacks (#7215)
* New and improved lock LED callbacks

* Include stdbool

* Update documentation

* Use full function signatures and add keyboard-level example
2020-01-09 08:57:11 +09:00
Drashna Jaelre
9e4f537013 [Core] Convert Dynamic Macro to a Core Feature (#5948) (#207)
* Convert Dynamic Macro to a Core Feature

This imports the code from Dynamic Macro into the core code, and handles it, as such.

This deprecates the old method but does not remove it, for legacy support. This way, no existing user files need to be touched.

Additionally, this reorganizes the documentation to better reflect the changes.

Also, it adds user hooks to the feature so users can customize the existing functionality.

Based heavily on and closes #2976

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Cleanup based on feedback

* Add short-form keycodes and document them

- add short-form keycodes to quantum/quantum_keycodes.h
- document the new aliases in docs/feature_dynamic_macros.md

* Add Dynamic Macros section and keycodes to docs/keycodes.md

* Make anti-nesting optional

* Add documentation for DYNAMIC_MACRO_NO_NESTING option

* Fix Merge artifacts

* Fix formatting typo in docs

Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>

* Remove DYNAMIC_MACRO_RANGE as it's not needed

* Fix includes and layer var type

Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
Joel Challis
2c0173f0ff Initial migration of software PWM backlight (#6709)
* Initial migration of software PWM backlight

* First pass at backlight driver docs

* Correct driver name in docs

* Run backlight_task when using BACKLIGHT_PINS

* Resolve backlight docs TODOs
2020-01-09 08:57:11 +09:00
Joel Challis
bac9fc60fe Move tmk_core/common/backlight to quantum/backlight (#6710)
* Move tmk_core/common/backlight to quantum/backlight

* Add guards to backlight inclusion

* Add guards to backlight inclusion

* Update backlight guards on clueboard/60

* Use full paths to avoid vpath issues
2020-01-09 08:57:11 +09:00
Joel Challis
d1dc2d5389 ARM - Initial backlight support (#6487)
* Move AVR backlight to own file, add borrowed ARM implementation

* Tiny fix for backlight custom logic

* Remove duplicate board from rebase

* Fix f303 onekey example

* clang-format

* clang-format

* Remove backlight keymap debug

* Initial pass of ARM backlight docs

* Initial pass of ARM backlight docs - resolve todos

* fix rules validation logic

* Add f072 warning

* Add f072 warning

* tidy up breathing in backlight keymap

* tidy up breathing in backlight keymap

* add missing break to backlight keymap
2020-01-09 08:57:11 +09:00
Joel Challis
a15119dc6f ARM split - Add bootmagic/magic keycodes for setting handedness (#6545)
* Add docs on bootmagic/magic keycodes for setting handedness

* Clang format fixes

* Maintain backwards compatibility

* Maintain backwards compatibility
2020-01-09 08:57:11 +09:00
Florian Didron
925c43c4c0 feat: update examples + pairing process 2019-12-06 08:20:51 +09:00
Florian Didron
f3edef8c69 feat: adds pairing key 2019-12-06 08:20:51 +09:00
just-another-jxliu
0a3343aca9 Fix held key getting stuck when NKRO is toggled (#6570)
* Fix held key getting stuck when NKRO is toggled

* Updated file to latest qmk version and added fix to cases MAGIC_UNHOST_NKRO & MAGIC_HOST_NKRO as well.

* Revert merged quantum.c
2019-11-04 17:24:07 +09:00
Joel Challis
d0ee924c9d Move tmk_core/common/backlight to quantum/backlight (#6710)
* Move tmk_core/common/backlight to quantum/backlight

* Add guards to backlight inclusion

* Add guards to backlight inclusion

* Update backlight guards on clueboard/60

* Use full paths to avoid vpath issues
2019-11-04 17:23:21 +09:00
fauxpark
9d1f6c699b Fix bug in do_code16() (#6935)
* Fix bug in `do_code16()`

* Remove qk_ mods functions
2019-11-04 17:22:54 +09:00
fauxpark
930ab89eee Add support for 328P hardware backlight on B1/B2 (qmk#6776) 2019-11-04 16:52:23 +09:00
Drashna Jaelre
6e2424e658 Add Dip Switch as a core feature (#6140)
* Add Dip Switches as a core feature

* Add documentation for Dip Switch feature

* Update Preonic Rev3 to use new feature and remove custom matrix

* Apply suggestions from code review

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Remove custom matrix line completely

Rather than just disabling it

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* DIP changes

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Use better check for DIP Switch configuration

* Add to show features

* Add bitmask callback for dip switch

* Fix OLKB Boards dip switch config

* Update docs to include bitmask example

* Fix comments/documentation

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Fix issues with docs and use example from @tuzonghua

* Fix wording

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Fix example to use proper formatting

Bad, BAAAAAAD drashna!!!

* Handle dip switch initialization better
2019-09-26 10:08:39 +09:00
skullY
f8fe33acfa clang-format changes 2019-09-17 11:39:43 +09:00
Drashna Jaelre
aa074cf592 Fixup Bootmagic code (#6386) 2019-08-28 14:49:46 +09:00
Stephen Wanhella
e5224082f1 Added keycodes for swapping and unswapping the Control and OS keys (#6110)
* Add MAGIC_SWAP_CONTROL_LGUI and MAGIC_UNSWAP_CONTROL_LGUI keycodes

Key codes to swap and unswap the control and windows/cmd keys

* Fix issues with pull request #6110

Renamed swap/unswap lctl and lgui key codes, added key codes to swap/unswap rctl and rgui, and moved new bool inside keycode_config.h struct to the end

* Move new keycodes to the end of the enum (#6110)

* add cases for swapped control and OS keys to mod_config (#6110)

* Add new keycodes to feature_bootmagic.md (#6110)

* Add R+L swap codes to keep in parity with AG_* codes

* Extend Magic range check to include new magic codes

* Update audio docs

* Combine 2 byte ranges into 1 word for EECONFG

Fix names for Keymap config EEPROM

* Update docs/feature_bootmagic.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/feature_bootmagic.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/feature_bootmagic.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Update docs/feature_bootmagic.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-08-28 14:49:46 +09:00
fauxpark
562884a328 Improve backlight PWM pin support (#6202)
* Improve backlight PWM pin support

* I accidentally an equals sign

* Another typo

* Order by pin number

* Throw an error if backlight pin is C4 or C5 on 16/32U4

* Use else for clarity

* Minor alignment adjustments
2019-08-13 10:48:29 +09:00
Drashna Jaelre
e0eecc6834 Additional changes for Layer State typedef compatibility 2019-07-27 11:25:58 +09:00
fauxpark
4083565334 Store backlight breathing state in EEPROM (#6105)
* Store backlight breathing state in EEPROM

* Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels)

* Error out if BACKLIGHT_LEVELS is > 15

* Remove mention of default backlight pin in rules.mk template

* Remove pointless comment
2019-07-19 10:16:35 +09:00
fauxpark
e8de784425 Sendstring LUT improvements (#5727)
* Align sendstring LUTs to 9 characters wide

* Replace 0 with XXXXXXX

* Use decimal 128 for LUT size

* Align heading comments

* Add ASCII table comments

* Add missing AltGr LUTs and adjust keycode LUTs accordingly

* Use pragma once

* Correct a couple more keycodes

* Capitalise "BÉPO"

* Also clean up the default tables

* Tidy up Belgian and Norman LUTs
2019-07-19 10:08:53 +09:00
fauxpark
0b25414aec Remove lock LED example in quantum.c (#5636)
* Use GPIO helper defines in backlighting

* While I'm here, fix up the lock LED example too

* Remove the example altogether, it's already documented
2019-07-19 10:08:18 +09:00
Florian Didron
a90a78c265 Merge branch 'master' into fix/oled_driver_for_splits 2019-05-20 15:47:42 +09:00
XScorpion2
665e719e31 Cleanup/rgb matrix (#5811)
* clean up rgb matrix extern usage

Moved rgb matrix boiler plate into macros

Rebased onto typing heatmap pr

* Fixing the reversed frame buffer access in digital rain

* Fixing digital rain & typing heatmap if keyreactive effects are not enabled

* Apply suggestions from code review

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Adding parenthesizes to DRIVER_LED_TOTAL where necessary

* Updated docs

* added notes about parentheses
2019-05-10 23:02:43 -07:00
XScorpion2
4b5a0375d4 Fix issuse with OLED Driver and Split Keyboard code 2019-05-06 23:27:30 -07:00
XScorpion2
38c65e4928 Simple extended space cadet (#5277)
* Simplifying and Extending Space Cadet to work on Ctrl and Alt keys

* PR Review feedback

* Reverting back to keycodes
2019-04-29 22:11:57 -07:00
Ryan Caltabiano
95f8ac3424 OLED Driver Feature 2019-04-22 09:55:39 -07:00
Drashna Jaelre
6e57437c42 Add AltGr/RALT support to Send String qmk#4046) 2019-04-12 14:54:40 -07:00
Wilba6582
a98777199e Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODE 2019-04-09 09:49:25 -07:00