* 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
* 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
* 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
* 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
* 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
* Additional changes for Layer State typedef compatibility
* Replace biton32 with get_highest_layer in docs
* Change additional layer structure code
* Fix uGFX reference issue
* Remove dynamic_keymap check
* Where did all these extra spaces come from
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* 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>
* 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
* 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
* 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
* Fix breathing always on for soft PWM
* Remove reference to hardware PWM pins in BACKLIGHT_BREATHING description
Now, breathing will only be unsupported when Timers 1 and 3 are both used by Audio
* Document BACKLIGHT_ON_STATE and its purpose
* Fix backlight breathing on C6
* Account for ATmega32A's single TIMSK register (MT40)
* Document hardware PWM on D4 for ATmega32A
* Add C6 and D4 to BACKLIGHT_PIN description
* 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
With my XD60, I noticed that when typing the backlight was flickering.
The XD60 doesn't have the backlight wired to a hardware PWM pin.
I assumed it was a timing issue in the matrix scan that made the PWM
lit the LED a bit too longer. I verified it because the more keys that
were pressed, the more lighting I observed.
This patch makes the software PWM be called during CPU interruptions.
It works almost like the hardware PWM, except instead of using
the CPU waveform generation, the CPU will fire interruption
when the LEDs need be turned on or off.
Using the same timer system as for hardware PWM, when the counter
will reach OCRxx (the current backlight level), an Output Compare
match interrupt will be fired and we'll turn the LEDs off.
When the counter reaches its maximum value, an overflow interrupt
will be triggered in which we turn the LEDs on.
This way we replicate the hardware backlight PWM duty cycle.
This gives a better time stability of the PWM computation than pure
software PWM, leading to a flicker free backlight.
Since this is reusing the hardware PWM code, software PWM also supports
backlight breathing.
Note that if timer1 is used for audio, backlight will use timer3, and if
timer3 is used for audio backlight will use timer1.
If both timers are used for audio, then this feature is disabled and we
revert to the matrix scan based PWM computation.
Signed-off-by: Brice Figureau <brice@daysofwonder.com>
* Refactor jj40 in line with current ps2avrgb template
* Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID
* Add backlight pwm bodge till #4324 lands
* Increase planck keymap compatibility
* Add customizable tapping terms
* Add Documentation
* Fix function
* Fixes
* It's not a pointer
* Add debugging output
* Update documentation to be at least vaguely accurate
* Use `get_tapping_term(tapping_key.event)` instead
`e` doesn't include column and row information, properly. It registers as 255, regardless of the actual keypress.
However `tapping_key.event` actually gives the correct column and row information. It appears be the correct structure to use.
In fact, it looks like the issue is that `e` is actually the "TICK" structure, as defined in keyboard.h
* Use variable tapping term value rather than define
* Silly drashna - tapping_key.event, not event
* add get_event_keycode() function
* Fix typo
Co-Authored-By: drashna <drashna@live.com>
* Remove post_process_record_quantum since it's the wrong PR
* Update quantum/quantum.c
Co-Authored-By: drashna <drashna@live.com>
* Better handle ifdef statement for permissive hold
Since we can't be sure that tapping term is actually 500
* Update quantum.c comments based on feedback
* Clean up get_tapping_term function
Clean up function so that users don't need to call the event function, and instead only check the keycode
* Add ability to run functionality on and off
* Make ifdef's more compact
* RGB Matrix overhaul
Breakout of animations to separate files
Integration of optimized int based math lib
Overhaul of rgb_matrix.c and animations for performance
* Updating effect function api for future extensions
* Combined the keypresses || keyreleases define checks into a single define so I stop forgetting it where necessary
* Moving define RGB_MATRIX_KEYREACTIVE_ENABLED earlier in the include chain
* Draft commit of typing speed RGB control
* More information in the readme
* Support all RGB animation modes (Fixes#1)
* Added support for all RGB light modes to use typing speed
Except christmas lights because that is seizure-inducing at high speeds!
* Introduced a value range specific to each RGB mode
Because some modes are a little too much when running at full speed!
* Update readme.md
* Update readme.md
* Re-arrange typing_speed definitions (Fixes#5) (#6)
* Re-arrange variable definitions to avoid including quantum.h from rgblight.c
* Fix a compilation error when trying to run make test:all
* Tweaks to the typing speed decay rate
* Renamed to momentum; moved implementation into dedicated files
* Groundwork for toggling momentum on/off (currently always on)
* Add EEPROM toggle for momentum-matching
* Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic
* Move momentum decay task out of rgblight_task()
* Fix missing momentum.h in lufa.c
* Experimental LED support (untested)
* Draft commit of typing speed RGB control
* More information in the readme
* Support all RGB animation modes (Fixes#1)
* Added support for all RGB light modes to use typing speed
Except christmas lights because that is seizure-inducing at high speeds!
* Introduced a value range specific to each RGB mode
Because some modes are a little too much when running at full speed!
* Update readme.md
* Update readme.md
* Re-arrange typing_speed definitions (Fixes#5) (#6)
* Re-arrange variable definitions to avoid including quantum.h from rgblight.c
* Fix a compilation error when trying to run make test:all
* Tweaks to the typing speed decay rate
* Renamed to momentum; moved implementation into dedicated files
* Groundwork for toggling momentum on/off (currently always on)
* Add EEPROM toggle for momentum-matching
* Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic
* Move momentum decay task out of rgblight_task()
* Fix missing momentum.h in lufa.c
* Added documentation
* Renamed feature to velocikey
* Reverted readme to original state
* Correct the readme title
* Updated feature name in the docs
* Update EECONFIG name
* Add compile-time toggles for velocikey
* Update feature documentation
* Revert "Merge branch 'led-support' into master"
This reverts commit e123ff5feb, reversing
changes made to df111a55b9.
* Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE
* Rename decay_task function to decelerate
* Apply suggestions from code review
Co-Authored-By: chrislewisdev <chris@chrislewisdev.com>
* Re-order eeconfig definitions
* Apply coding conventions
* Apply #ifdef check in lufa.c
* Refactored interval time checks into one functionc
* Small rename
* Fix unused function error for layouts not using all rgb effects
* Only update EEPROM if Velocikey is enabled
* Incorporate code review feedback
* Small adjustment to top-end decay rate
* Add Velocikey documentation to table of contents
* Bring tetris:default keymap size down by disabling audio
* initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards
* Haptic feedback enhancements: on/off toggle working, feedback order working
todo:
-work on modes switching
-get modes switching to save to eeprom
* haptic enhancement - eeprom and modes added
* Added set and get functions for haptic feedback
* initial implementation of solenoids under haptic feedback
* changed eeprom to 32 bits to reserve blocks for future features
* start documentation of haptic feedback
* change keycode per comment from reviewers
* typo fixes
* added eeprom for solenoid configs
* added solenoid and docs
* Add/fix default parameters configs, improve docs
* more doc cleanup
* add in solenoid buzz toggle, clean up doc
* some fixes for error in compiling solenoid
* fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c
* fixes for avr side issues
* update keymap
* fix keymap compile error
* fix bugs found during solenoid testing
* set pin that is not powered during bootloader
* added warning about certain pins on the MCU may trip solenoid during DFU/bootloader
* Improvement of Space Cadet Shift by preventing to automatically apply a modifier on the key and allow to override the default modifier. Closesqmk/qmk_firmware#3815
* Improve the use of the DISABLE_SPACE_CADET_MODIFIER flag to avoid unregistering KC_LSFT when equals to LSPO_MOD
* change #if to if statement
* [BACKLIGHT_CAPS_LOCK_INDICATOR] Use backlight toggling as Caps Lock LED
I've implemented this feature because S65-X doesn't have LED indicators
and the existing led_set_kb(usb_led) function try to use backlight as
indicator but that creates an inconsistency with backlight_config state.
- define `BACKLIGHT_CAPS_LOCK_INDICATOR` to enable Caps Lock indicator
using backlight (for keyboards without dedicated LED)
- Don't turn off LED indicators when suspend because backlight is
already turned off. Else led_set(0) will turn back on backlight.
- Documentation has been updated
* [BACKLIGHT_CAPS_LOCK_INDICATOR] Turn off all LED indicators except Caps Lock if BACKLIGHT_CAPS_LOCK_INDICATOR
* [BACKLIGHT_CAPS_LOCK] Rename BACKLIGHT_CAPS_LOCK_INDICATOR
* [BACKLIGHT_CAPS_LOCK] Use new IS_LED_ON method
I think `quantum.h` should contain only API declarations that `quantum.c` provides externally. `rgb.h` contains function weak definitions. This should not be in `quantum.h`.
* 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 42676bf251.
* 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
* Add delay in Tap Code to avoid issues
I think a few people have reporting issues with it working properly, and it may be a timing issue. The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.
Adding the 100ms delay should hopefully fix any issues with it.
* Make tap_code delay configurable
* Update documentation
* Bring tap_code16 inline with changes
* Fix type for tap_code16
Bad copy-paste job
* Just use the value check for the define
* Clarify timing in docs
Co-Authored-By: drashna <drashna@live.com>
* Wordsmithing
Co-Authored-By: drashna <drashna@live.com>
* Preliminary additon of bootmagic lite functionality
* Cleanup code
* Clean up bootmagic code
* Add documentation and clean up code
* Make 'lite' an option for BOOTMAGIC_ENABLE
* Update Templates with note about Bootmagic Lite option
* Detect Debounce variable
* Make sure debounce is a non-zero number
* Capitalize Bootmagic
* Capitalize bootmagic
* Update wording
* Re-add EEPROM reset, by popular demand
And add eeprom-less version to drashna userspace for his sanity
* Fix spacing
* Set BOOTMAGIC_ENABLE to use full/lite/off
And default yes to "full" for compatibility
* Add Bootmagic lite info to templates
* Remove text from makefiles
* Cleanup of makefile
* mention yes in bootmagic docs
* Wordsmitthing the docs
* Fix white spaces
* Readd default bootmagic setting, because it's necessary