* Give Tsangan layout a real Fn2 layer
* Disable mouse keys to work around qmk#8323
I don't actually use this feature, so there's no reason for it to be
enabled anyway, and it seems to cause spurious wakeups on Windows.
* Adding Novem keyboard (macropad) and demo layout
* Making changes suggested during pull request
* Removing keyboards/novem/keymaps/default/config.h as suggested during the pull request
* Moving keyboard to the handwired folder and changing the build line from readme in order to reflect this new location
* Add revision 1 and revision 2 to ProjectKB Alice PCB
* Swap SLEEP LED to no
* Basic root rules.mk
* Apply suggestions from code review
* Update keyboards/projectkb/alice/rules.mk
Using just qmk setup <github_username> would fail w/ "Could not find repo github.com/<username>, whereas the repo is actually after another slash after the user name. Can consider changing code to add the default forked repo name if slash is not detected in the arg.
* add VIA enabled keymap with some layers taken out for space
* get a more sane VID and PID so we don't collide with the other BMC powered boards
* small cleanups
* Update keyboards/tgr/jane/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* add tkl_ansi_tsangan LAYOUT
* add tkl_iso_tsangan LAYOUT
Co-authored-by: Ryan <fauxpark@gmail.com>
* porting the niu_mini to via
* Wrong values in mk
* Updating to unique Vendor ID and Product ID
* Addressing zvecr comments
* Addressing fauxpark comments
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Lauren Harris <lauren.y.harris@outlook.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Add support for hardware and board initialisation overrides.
* qmk cformat.
* Add some documentation.
* Docs clarity.
* Make early_hardware_init_pre a no-op for now, until migrations occur.
* Doco update
* Make distinction between keyboard and ChibiOS board in docs
* Doc anchors.
* Update tmk_core/protocol/chibios/main.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Rework bootloader entry to be off by default, allow opting-in.
Co-authored-by: Joel Challis <git@zvecr.com>
* id80: New keyboard (IDOBAO ID80)
Add initial support for the IDOBAO ID80 keyboard.
Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor. The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.
* id80: Update default keymap to match stock
Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.
* id80: Add Caps Lock indicator support
Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically. Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.
* id80: Remove placeholder functions
The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.
* id80: Use Esc as the Bootmagic Lite activation key
The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.
* id80: Update info.json
Replace info.json generated by the KBF to QMK converter with another
version generated using http://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/). The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).
* id80: Enable NKRO
The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.
* id80: Use unique USB vendor/product ID
Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.
* id80: Fix right modifiers in the default keymap
For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.
* id80: Remove empty row 6 (F0) from matrix
The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows. However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part). Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.
* id80: Update row numbers in the LAYOUT macro
Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.
* id80: Set RGBLED_NUM to 20 to match the actual PCB
The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain. However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
* Add support for Caps Lock LED
Currently ignores the fact that led_state is not synced between halves, so caps lock LED doesn't do anything if USB is plugged into right half
* Set initial backlight and RGB mode/values on blank EEPROM
* Set default VIA layout options
* Add backlight/RGB ifdefs
* Set bootloaders for each rev
* dipsw test on helix/rev2/sc/back:five_rows
* bug fix quantum/dip_switch.c
* test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"
This reverts commit 4b13ebb996e1c4997e6deb1fa3b3227db5fa9661.
* dipsw test on helix/rev2/sc/back:five_rows
* update quantum/dip_switch.c
* test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"
This reverts commit bf99ace095528ad65c531229bcf5ece037dda595.
* Add handwired BDN9-BLE
* Apply suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/handwired/bdn9_ble/rules.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/handwired/bdn9_ble/rules.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/handwired/bdn9_ble/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
GCC 4.9.4 is no longer available on Gentoo (or Sabayon), which causes
problems when attempting to install on either of these platforms. Since
QMK is not particularly sensitive to its GCC version, modify the version
restriction to <9 so newer versions of GCC may be installed. Since the
toolchain for arm-none-eabi isn't currently installed as part of setup,
add that as well.
Additionally, drop the Python installation as part of the Gentoo
installation process. Python is a core system package on Gentoo and can
therefore be assumed to be present; in addition, the slot restriction of
3.5 which was present is also no longer available in Gentoo.
Finally, separate the gcc rebuild invocation of `emerge` from the new
packages that may need to be installed, and apply the `--noreplace` flag
to new packages so that they are not rebuilt if already present.
* Cannonkeys DB60 Keyboard
* WhitespacE
* Add ISO and make layer names more idiomatic
* backlight enable
* Remove big backslash from ISO
* Apply suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update for correct matrix
* Apply suggestions from code review
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update chibios config files
* Complete VIA keymap
* Remove ugly hack comments
* Update keyboards/cannonkeys/db60/rules.mk
Co-Authored-By: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Joel Challis <git@zvecr.com>
* Save progress
* Finished matrix and everything
* Apply suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update DevastatingTKL
* Renames
* Add renamed files
* Update chibios files and VIA keymap for completion
* Some cleanup
* Apply suggestions from code review
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cannonkeys/devastatingtkl/rules.mk
Co-Authored-By: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Joel Challis <git@zvecr.com>
* quantum/debounce: Added sym_pk debounce algorithm
* Apply suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
* quantum/debounce/sym_pk: delete comments and rename functions following code review
* quantum/debounce/sym_pk: Modifications for code readability according to code review
* quantum/debounce/sym_pk: Modifications for code readability according to code review (2)
* quantum/debounce/sym_pk: code review: cleaner code
Co-Authored-By: Nick Brassel <nick@tzarc.org>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
* Added personal minivan keymap, and started work on splitish directory
* Merge branch 'splitish' of github.com:RSchneyer/qmk_firmware into splitish
Trying to undo attempted fix
Added splitish keyboard files, removed personal Minivan keymap
* Removed personal Minivan keymaps
* Fixed small issue in readme
* Added changes based on inital PR feedback
* forgot a semicolon
* Quick config.h file and default keymap update
* tmk_core/common: Fixing TIMER_DIFF macro to calculate difference correctly after the timer wraps.
Let's go through an example, using the following macro:
If the first timer read is 0xe4 and the second one is 0x32, the timer wrapped.
If the timer would have had more bits, it's new value would have been 0x132,
and the correct difference in time is 0x132 - 0xe4 = 0x4e
old code TIMER_DIFF_8(0x32, 0xe4) = 0xff - 0xe4 + 0x32 = 0x4d, which is wrong.
new code TIMER_DIFF_8(0x32, 0xe4) = 0xff + 1 - 0xe4 + 0x32 = 0x4e, which is correct.
This also gives a chance for a smart compiler to optimize the code using normal
integer overflow.
For example on AVR, the following C code:
uint8_t __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
return TIMER_DIFF_8(current_timer, start_timer);
}
With the original code, it gets translated to the following list of instructions:
00004c6e <test>:
4c6e: 98 2f mov r25, r24
4c70: 86 1b sub r24, r22
4c72: 96 17 cp r25, r22
4c74: 08 f4 brcc .+2 ; 0x4c78 <test+0xa>
4c76: 81 50 subi r24, 0x01 ; 1
4c78: 08 95 ret
But with this commit, it gets translated to a single instruction:
00004c40 <test>:
4c40: 86 1b sub r24, r22
4c42: 08 95 ret
This unfortunately doesn't always work so nicely, for example the following C code:
int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
return TIMER_DIFF_8(current_timer, start_timer);
}
(Note: return type changed to int)
With the original code it gets translated to:
00004c6e <test>:
4c6e: 28 2f mov r18, r24
4c70: 30 e0 ldi r19, 0x00 ; 0
4c72: 46 2f mov r20, r22
4c74: 50 e0 ldi r21, 0x00 ; 0
4c76: 86 17 cp r24, r22
4c78: 20 f0 brcs .+8 ; 0x4c82 <test+0x14>
4c7a: c9 01 movw r24, r18
4c7c: 84 1b sub r24, r20
4c7e: 95 0b sbc r25, r21
4c80: 08 95 ret
4c82: c9 01 movw r24, r18
4c84: 84 1b sub r24, r20
4c86: 95 0b sbc r25, r21
4c88: 81 50 subi r24, 0x01 ; 1
4c8a: 9f 4f sbci r25, 0xFF ; 255
4c8c: 08 95 ret
Wth this commit it gets translated to:
00004c40 <test>:
4c40: 28 2f mov r18, r24
4c42: 30 e0 ldi r19, 0x00 ; 0
4c44: 46 2f mov r20, r22
4c46: 50 e0 ldi r21, 0x00 ; 0
4c48: 86 17 cp r24, r22
4c4a: 20 f0 brcs .+8 ; 0x4c54 <test+0x14>
4c4c: c9 01 movw r24, r18
4c4e: 84 1b sub r24, r20
4c50: 95 0b sbc r25, r21
4c52: 08 95 ret
4c54: c9 01 movw r24, r18
4c56: 84 1b sub r24, r20
4c58: 95 0b sbc r25, r21
4c5a: 93 95 inc r25
4c5c: 08 95 ret
There is not much performance improvement in this case, however at least with this
commit it functions correctly.
Note: The following commit will improve compiler output for the latter example.
* tmk_core/common: Improve code generation for TIMER_DIFF* macros
Because of integer promotion the compiler is having a hard time generating
efficient code to calculate TIMER_DIFF* macros in some situations.
In the below example, the return value is "int", and this is causing the
trouble.
Example C code:
int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
return TIMER_DIFF_8(current_timer, start_timer);
}
BEFORE: (with -Os)
00004c40 <test>:
4c40: 28 2f mov r18, r24
4c42: 30 e0 ldi r19, 0x00 ; 0
4c44: 46 2f mov r20, r22
4c46: 50 e0 ldi r21, 0x00 ; 0
4c48: 86 17 cp r24, r22
4c4a: 20 f0 brcs .+8 ; 0x4c54 <test+0x14>
4c4c: c9 01 movw r24, r18
4c4e: 84 1b sub r24, r20
4c50: 95 0b sbc r25, r21
4c52: 08 95 ret
4c54: c9 01 movw r24, r18
4c56: 84 1b sub r24, r20
4c58: 95 0b sbc r25, r21
4c5a: 93 95 inc r25
4c5c: 08 95 ret
AFTER: (with -Os)
00004c40 <test>:
4c40: 86 1b sub r24, r22
4c42: 90 e0 ldi r25, 0x00 ; 0
4c44: 08 95 ret
Note: the example is showing -Os but improvements can be seen at all optimization levels,
including -O0. We never use -O0, but I tested it to make sure that no extra code is
generated in that case.OA
* quantum/debounce: Fix custom wrapping timers in eager_pr and eager_pk debounce algorithms
Please see the below simulated sequence of events:
Column A is the 16-bit value returned by read_timer();
Column B is the value returned by custom_wrap_timer_read();
Column C is the original code: (timer_read() % MAX_DEBOUNCE)
A, B, C
65530, 19, 30
65531, 20, 31
65532, 21, 32
65533, 22, 33
65534, 23, 34
65535, 24, 35
0 25, 0
1, 26, 1
2, 27, 2
3, 28, 3
4, 29, 4
5, 30, 5
read_timer() wraps about every 1.09 seconds, and so debouncing might
fail at these times without this commit.
* quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review.
* quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review. (2)
* First cut at Josh Diamond's KBD75 customizations.
Includes:
* My unique keymap with ChromeOS specific keys
* Use RGB underglow to indicate Caps Lock
* Some unicode bindings
* Some changes to make debugging easier
* Updated spidey3 to be applicable to all 75_ansi boards
* Sadly, ChromeOS doesn't pay attention to most consumer codes
* Add mac layer; fix flakeyness in CAPS_LOCK underglow.
* Make layers.json match the keymap (to the extent possible)
* Major cleanup; fix broken debug persistence
* Cleanup some whitespace issues
* Fix incorrect log message.
* Rework layer indication to user RGBLIGHT_LAYERS
* Update layouts/community/75_ansi/spidey3/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Rename users/spidey3/rgblight.c to layer_rgb.c per suggestion
* Refactor to use set_single_persistant_default_layer().
* Use dprint/f to make logging more elegant.
* Update users/spidey3/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update users/spidey3/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update layouts/community/75_ansi/spidey3/rules.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/spidey3.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/layer_rgb.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/init.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Changes from code review
* Numpad layer, various keys for 75_ansi/spidey3
* Add Fn-B to toggle NKRO
* Blink rgb to acknowledge some setting changes
* Updated media control & reset key location
* Minor cleanup
Co-authored-by: Joshua Diamond <jdiamond@Deep-Thought.local>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* added vim compatibility, backspace above enter, and general macOS optimizations on top of default layout
* add space65 macOS keymap for vim users with an optimized bottom row
* Update keyboards/projectkb/alice/keymaps/keithlo/keymap.c
* Update mousekey parameters in userspace
* Disable GRAVE_ESC in boards where it isn't used
* Tweak MODERN_DOLCH_RED and reset RGB on Shift+Toggle in KBD6X
* Disable RGB controls when Fn/Caps indicator lights are on
* Use LTO_ENABLE instead of setting -flto directly
* Add led_update_keymap, use SS_LCTL instead of SS_LCTRL
* Change TAPPING_TOGGLE from 2 to 3
* Add PS2_MOUSE_ROTATE to compensate for device orientation
* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation
* Reformat with IndentPPDirectives: AfterHash as per #6316
* Fix RGB LED count on YD60MQ
* Split YD60MQ into 12-LED and 16-LED revisions
* Update readmes
* Make 12led the default version
* Readd base rules.mk, version→variant in readme
* Add syntax highlighting to code blocks in readme
* Define NO_ACTION_MACRO/FUNCTION in header instead of makefile when LTO is enabled
Currently, boards and keymaps that define NO_ACTION_MACRO/FUNCTION unconditionally
will not compile with LTO_ENABLE (#8604). This fixes the issue by moving the
definitions from common.mk to action.h, which enables us to check for previous
definitions of those macros (this cannot be done in a makefile).
* Remove LTO checks in templates
Since now NO_ACTION_MACRO/FUNCTION are defined as needed in action.h (which is
included by quantum.h), checking for LTO in keyboard and user code is no
longer required.
* Update LTO_ENABLE docs
* enable rgblight layers
* rgblight layers code
* switch to new rgblight layers
* testing led positions
* fix caps typo
* lights and colors working
* rules updated for different rgb use
* Extra spaces removed
* Add Via keymap for BM16-A
* Apply suggestions from code review
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Deleted as per noroadsleft
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Without this check, users can lock themselves out by enabling developer
mode, than disabling the dependencies. They wouldn't be able to turn off
developer mode as none of the subcommands (including 'config') would
work.
The list of hidden subcommands were approved by @skullydazed ;)
Currently hidden if 'user.developer' is not True:
- cformat
- docs
- kle2json
- pyformat
- pytest
Use milc's config finding and parsing to check if the user is a
developer or not.
'requirements-dev.txt' will now load 'requirements.txt', so no need to
run pip twice.
Add missing 'yapf' dependency to 'requirements-dev.txt'.
* Change _delay_ms/us() to wait_ms/us()
* Switch to platform-agnostic GPIO macros
* Add AVR spi_master and migrate Adafruit BLE code
* Set verbose back to false
* Add clock divisor, bit order and SPI mode configuration for init
* Add start and stop functions
* Move configuration of mode, endianness and speed to `spi_start()`
* Some breaks here would be good
* Default Adafruit BLE clock divisor to 4 (2MHz on the Feather 32U4)
* Remove mode and divisor enums
* Add some docs
* No hr at EOF
* Add links in sidebar
* Selectively adding pieces
* Adding georgi keymap
* Adding more files, fixing make
* Smaller makefiles
* Fixing make rules
* README more inline with QMK's guidelines
* Turning off buggy assert
* Improving documentation based on a user feedback.
* Slightly better schema
* Resurrected state machine diagram
* updated rules.mk and default keymap of Wonderland for VIA support
* Restored default keymap and rules.mk, added via keymap folder with modified default keymap and rules.mk, also fixed VendorID in config.h
* fixed jargon on layers 3 and 4 of Wonderland VIA keymap
* cleaned up via keymap, removed fluff
* default keymap for Wonderland restored
* removed unnecessary information from rules.mk
* made more readable per noroadsleft suggestion
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* Add Polish keymap
* Fix wrong AltGr mapping
* These are ogoneks, not cedillas
* Too many !s
* ANSI
* Just use BSLS
* Move BSLS
* Move PIPE
* Fix some incorrect names in keymap_slovak.h
Thanks to vomindoraan
* Add Korean keymap
* Switch to ANSI layout
* Update quantum/keymap_extras/keymap_korean.h
Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>
Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
* ADD DecadePad
* Fix Key display bug
* fix
* firmware1
THIS IS A Backup commit
* firmware2
* rename all fill with lower case
* fix bug
* Final Version
Fix all bugs
* Requested change apply
* suggested apply
* change apply
* via test
* Apply change and fix via support problem
* created initial files for the lattice60
* modifying the keymaps and config
* keymap edits and docs
* modifying docs and added personal keymap
* added pic and website to readme
* added layout image for default keymap
* updating layout pictures
* minor formatting edit
* file cleanup
* trying to prevent errors with usbconfig
* removed usbconfig.h
* cleaning up comments
* switched to use community hhkb layout
* Make initial batch of files
* Tweak keymap
* Mod default keymap
* Add via compat
* Update default keymap based on real world use
* Remove RGB, LCD, MIDI options
* Remove unnecessary functons from orbit_x.c
* Update readme
* Cleanup makefile as necessary
* Make the readme file for default keymap not completely empty
* Update keyboards/ai03/orbit_x/keymaps/default/keymap.c
* Update keyboards/ai03/orbit_x/readme.md
* Update keyboards/ai03/orbit_x/info.json
* Add VIA to Gingham
- Add VIA keymap
- Fix minor typo in config.h
- Remove redundunt methods and defines
* Update keyboards/gingham/config.h
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* define VID/PID in post_config.h, add via keymap
* update readme, set vid/pid for via
* update keymap
* delete usbconfig.h, update keymap
* add status led feature
* Apply suggestions from code review
Co-Authored-By: Joel Challis <git@zvecr.com>
* undef vid/pid in keymap
Co-authored-by: Joel Challis <git@zvecr.com>
* add feature part 01
* update sentences
* update sentences
* update sentences
* update file based on comment
* leave ctrl, shift, alt key name as alphabet
* update file based on comment
* update file based on comment
* update file based on comment
* update file based on comment
* remove unnecessary space on define line
* update sentence based on pull request's comment
* translate 'breathing' in document
* change expression in table
* update file based on comment
* change the word 'brightness', and update based on comment
* update based on comment
* update based on comment
* add language directory name to each internal link
* update based on comment
* update based on comment
* Changes to my Ergodox & Planck keymaps
* Fixed Typos
Corrected some typos and omissions to my Ergodox layout and readme
* Fixed Typos
Fixed some typos in my ErgoDox Readme and keymap.c files
* Add Serbian keymaps and sendstring LUT
* Apply suggestions from code review
Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>
* Fix formatting
Co-authored-by: Konstantin Đorđević <vomindoraan@gmail.com>
* Enable External EEPROM on Planck Rev6
* Update KC_MAKE macro to use qmk cli util
* Disable additional gradients for rgb matrix
* Update analog code for newer methods
* Update ergodox layout
* Disable Grave Escape
* Cleanup OLED code a bit
* Remove old unicode code
* Seperate RGB Matrix code from RGB Light code in userspace
* Massive overhaul an generalization of personal OLED code
Now lets hope I NEVER get a keyboard using a 128x32 in a normal orientation.
* Super tiny cleanup
* Enable Diablo layer on kyria
* clang format pass
* Additional OLED cleanup
* Added via config support for the launchpad
Added via config support for the launchpad
* Update keyboards/launchpad/keymaps/via/rules.mk
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/launchpad/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Keyboard: add treeadstone48
* rename layout defines
* Use of pragma once
* move common include code
* fixed info.json
* change keymap layout from kc to normal
* fix alpha revision keymap
* fixed info.json
* remove USE_Link_Time_Optimization
* Refactoring all my keymaps.
- Not use tap dance
- Remove not use define aliases
- Remove not use incluse and extern value.
* default keymap extra key was changed
* remove rgblight_config
Co-authored-by: root <root>
* remove IT_PIPE duplicate and add IT_GRAD
IT_PIPE was declared 2 times, ones as ° and once as |. I changed the first declaration and called it IT_GRAD. I even fixed the definition because the ° in Italian is obtained with LSFT(IT_AACC)
* rename IT_GRAD to IT_DEGR
* fix missing music mode legend
* add missing plus_and_minus
* fix missing IT_ACUT definition
* change KC_LALT(KC_LSFT to LALT(LSFT
* Fix alignment
* remove leftover
* fix issue generated with chars while pushing
* fix typo
* add sigul folder in Planck keymaps
* fix LCBR and RCBR
* fix euro symbol
* fix RBRC
* change IT_LESS form KC_NUBS to KC_GRAVE
* add IT_TILDE and change IT_GRAV to IT_GRAVE
* initial commit
* add ideas to readme
* comment key lock
* add a bunch of new features as stated in readme.md
* check features added and list to do
* add macros on RAISE
* add F keys on numbers row on FN layer
* flag features added
* fix macro formulas
* move DESK and SGCOM under D and S
* invert IT_EACC and S(IT_EACC) to align the layout with that of the default Planck
* invert IT_EACC and S(IT_EACC) to align the layout with that of the default Planck
fix spaces for readability
* add missing legends for accented vowels
* format for readability
* move MOUSE button on B (same key that activates it) on MOUSE layer
* revert to commit befor I edit it
* initial commit
* edited to be easier to compare to _ansi.h
* remove keymap_italian_osx_iso.h and rename with edits keymap_italian_osx_ansi.h to keymap_italian_osx.h
I found out there were no difference at all
* fix missing #endif
* change the included file from italian.h to italian_osx.h
* fix debug key
* edit Numapd layer, add enter and bsps
* change TAPPING_TOGGLE from 2 to 3
* change italian_osx.h to italian_ansi.h
* rename quantum/keymap_extras/keymap_italian_osx.h to quantum/keymap_extras/keymap_italian_ansi.h
Now this file is a clone of the keymap_italian.h that appears to be working only for ISO keyboards. It also contains a few improvements for IT_PIPE (defined two times) and IT_ACUT (missing definition). Additionally it redefines LCBR and RCBR to LSFT(IT_LBRC) and LSFT(IT_RBRC)
* rename file
* redefines IT_BKSL and IT_PIPE based on KC_BKSL
* merge new italian
* add new osx_iso and osx_ansi version for italian.h and align BKSL to BSLS, fix double definition of PIPE
* rename BKSL to BSLS
* add FN_D and some comments
* add MOUSEKEY configuration
* update
* edit swap =/+ with ò/ì
* merge with master
* add MS_B to have _MOUSE when pressing B
* move RAISE on _FN
* add phone number
* remove CONTRA folder
* remove CONTRA folder
* Update keyboards/planck/keymaps/sigul/keymap.c
fix include definition
Co-Authored-By: Ryan <fauxpark@gmail.com>
* remove default planck kemap
* remove extern keymap_config_t keymap_config;
based on suggestion from @fauxpark, It's not needed as it should already be externed through one of the includes provided by QMK_KEYBOARD_H.
Co-Authored-By: Ryan <fauxpark@gmail.com>
* add user space for user sigul
* remove custom config moved to user space sigul
* comment tri layers state (moved to user space)
* remove tri layers update comment (code moved in user space)
* add secrets
* move enum and define to userspace
* Edit title
* move enum and define to sigul.h
* add thanks
* edit: moving to userspace enum, define and process_records
* add enum and defines
* add process_records
* cleaning code after moving code to user space
* add process_records
* cleaning code
* adding rules to manage secrets
* remove secretes
* first commit
* add macro timer
* add keycodes macro
* edit custom keycodes order
* add strings to send inside the secrets array
* remove codes for secrets & change secret to secrets
* edit secrets keycodes
* edit keycodes names and order
* add secrets.h and secrets.c
* add #pragma once
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update .gitignore
Co-Authored-By: Joel Challis <git@zvecr.com>
* add local gitignore for secrets
* remove secrets
* update for secrets
* change FN_D to IT_D
* remove FN_D definition
Co-authored-by: pisilvio <silvio@picampus.it>
Co-authored-by: admin <admin@admins-MacBook-Pro.local>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
* Rename UC_OSX (and related constants) to UC_MAC
* Update UNICODE_SONG_OSX references to UNICODE_SONG_MAC
* Update UC_M_OS references to UC_M_MA
* Add UC_OSX alias for backwards compatibility
* Add deprecation warning for UC_OSX to Unicode docs
* Add UC_M_OS alias for backwards compatibility
* Update newly found UC_M_OS and UNICODE_SONG_OSX references
* Add legacy UNICODE_MODE_OSX alias, revert changes to user keymaps
* Add legacy UNICODE_SONG_OSX alias, revert changes to user keymaps
* Replace removed sounds in Unicode song doc examples
* rewrite usbhid feature on vusb
* Apply suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
* fix typo
* fix typo again
* Update tmk_core/protocol/vusb/vusb.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* clean up defines
Co-authored-by: Ryan <fauxpark@gmail.com>
* Change PID to allow differentiation between Rev. 3 and Rev. 4
* Rebadge thumb keys in macro to show physical wiring better
* Add more rules for VIA keymap
* added the description of the reading order of the rules.mk files.
* Update docs/hardware_keyboard_guidelines.md
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update docs/hardware_keyboard_guidelines.md
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Add keyboard jisplit89
Add jisplit89 keyboard.
A 89 keys JIS Layout keyboard.
Salicylic-acid3
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/jisplit89/readme.md
Co-Authored-By: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
* Update keyboards/jisplit89/rev1/rev1.h
Co-Authored-By: shela <shelaf@users.noreply.github.com>
* Copyright has been updated.
Changed signature to Salicylic_acid3 and changed year to 2020.
* Update readme
Added a note to the build guide.
* Remove unnecessary definitions.
Remove unnecessary definitions.
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/rules.mk
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/rules.mk
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/default/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/jisplit89/keymaps/salicylic/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Delete config.h
Removed to make it more default
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
Co-authored-by: shela <shelaf@users.noreply.github.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* CLI: More MSYS2 fixes
Now I can fully setup and work with qmk_firmware on an MSYS2
installation without any errors or exceptions.
* Apply suggestions from code review
Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>
* Some improvements
* Remove unnecessary import
* Remove slow, unused code
Getting the version from GIT was slow on both Windows and Docker.
Until we find a better, faster way, this is removed.
* remove unused imports
* Implement @vomindoraan's suggestions
* refine how we pick the shell to use
* Apply @fauxpark's suggestions
fauxpark investigated the topic of shells in MSYS2 a bit and we come to the conclusion that the safest bet was to just use the user's shell.
Anything more just opens up more edge-cases than it solves.
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Use `platform_id` in doctor
This will bring it in line with the new code.
Co-authored-by: skullydazed <skullydazed@users.noreply.github.com>
Co-authored-by: skullY <skullydazed@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update tmk_core/common/progmem.h
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update quantum/rgblight.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* fixed problem with implicit declaration in quantum/rgblight.c (#8381)
Co-authored-by: Ryan <fauxpark@gmail.com>
* convert my 60 keymap to alice
* add via to rules for alice
* remove split backspace and add backlight keycodes
* disable LTO for alice pcb
* keymap alignment formatting
* initial commit
* preliminary support for mb17 using the qmk default keymap
* add the VIA keymap
* add qmk configurator support
* code cleanups before submission
* Update keyboards/mountainblocks/mb17/rules.mk
* Update keyboards/mountainblocks/mb17/info.json
* remove file
* Port over some AVR backlight logic to SLEEP_LED
* Port over some AVR backlight logic to SLEEP_LED - add timer 3
* Port over some AVR backlight logic to SLEEP_LED - clang format
* Enable SLEEP_LED within vusb protocol
* Add support for RAW endpoint for arm_atsam
This the excellent work from helluvamatt/qmk_firmware in bb6eeb93b.
* Reformat arm_atsam RAW endpoint code
Co-authored-by: Matt Schneeberger <helluvamatt@gmail.com>
* Add initial KeebsPCB support
* Update readme
* Update readme
* Correct readme typo
* Update keyboards/acheron/keebspcb/config.h
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Apply @noroadsleft suggestions from code review
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/acheron/keebspcb/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/acheron/keebspcb/keymaps/default/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Gondolindrim <alvaro.augusto.volpato@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* add new layout for 65% with blocker and add matching keymap
the rev2 pcb gets used in the kbd67 which has a blocker between the left arrow key and the right ctrl key. this layout is missing so far even though it's probably the most used one for this board.
* add split backspace layout with blocker
* change keycode for backslash
* update rules.mk and add missing layouts in info.json
* Update keyboards/kbdfans/kbd67/rev2/rules.mk
Co-Authored-By: Joel Challis <git@zvecr.com>
Co-authored-by: Joel Challis <git@zvecr.com>
* [Docs] Update RGB Matrix docs with function refs
* Fix up code samples
* suggestions by noroadsleft
* Fix small typo
Co-authored-by: James Young <xxiinophobia@yahoo.com>
* Add Kudox Game rev2.
* Add the keymap of Kudox Game a layer for regulating RGB.
* Modified rgblight_init when RGBLIGHT_ENABLE=no.
* Remove invalid codes.
* Modified *init* function right intention of framework.
* Set backlight and RGB pins for AVR onekeys
* Set pin for ADC as well
* Define ADC_PIN for F4 blackpills
* Use A0 for F4 ADCs
* Set ADC pins for F0 and F1
* [Keymap] Minidox Bepo layout
Todo :
Lower
Adjust
Update Lower E and Lower S on schema
* Added config.h
* Code review, update config.h
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: dolie <olivier.ghafari@pm.me>
Co-authored-by: Ryan <fauxpark@gmail.com>
* First cut at Josh Diamond's KBD75 customizations.
Includes:
* My unique keymap with ChromeOS specific keys
* Use RGB underglow to indicate Caps Lock
* Some unicode bindings
* Some changes to make debugging easier
* Updated spidey3 to be applicable to all 75_ansi boards
* Sadly, ChromeOS doesn't pay attention to most consumer codes
* Add mac layer; fix flakeyness in CAPS_LOCK underglow.
* Make layers.json match the keymap (to the extent possible)
* Major cleanup; fix broken debug persistence
* Cleanup some whitespace issues
* Fix incorrect log message.
* Rework layer indication to user RGBLIGHT_LAYERS
* Update layouts/community/75_ansi/spidey3/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Rename users/spidey3/rgblight.c to layer_rgb.c per suggestion
* Refactor to use set_single_persistant_default_layer().
* Use dprint/f to make logging more elegant.
* Update users/spidey3/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update users/spidey3/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update layouts/community/75_ansi/spidey3/rules.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/spidey3.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/layer_rgb.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update users/spidey3/init.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Changes from code review
Co-authored-by: Joshua Diamond <jdiamond@Deep-Thought.local>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* creation
new numpad layout for 23 keys
creation of new keymap
* Update cospad.h
* Update info.json
* Update keymap.c
* Update keymap.c
Added a macro for the "00" key.
* added two new keymap. one for each new layout.
The new keymaps are based on the default keymap but focus on
* Update keyboards/cospad/cospad.h
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/cospad.h
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/numpad2/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/numpad2/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/numpad3/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/numpad3/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/numpad3/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keymap.c
layout name fix.
* Update keyboards/cospad/keymaps/johannbl/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/info.json
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/cospad/keymaps/johannbl/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Delete keymap.c
* Rename keyboards/cospad/keymaps/johannbl/numpad2/keymap.c to keyboards/cospad/keymaps/johannbl/split_plus_and_zero/keymap.c
* Rename keyboards/cospad/keymaps/johannbl/numpad3/keymap.c to keyboards/cospad/keymaps/johannbl/split_zero/keymap.c
* Rename keyboards/cospad/keymaps/johannbl/split_plus_and_zero/keymap.c to keyboards/cospad/keymaps/split_plus_and_zero/keymap.c
* Rename keyboards/cospad/keymaps/johannbl/split_zero/keymap.c to keyboards/cospad/keymaps/split_zero/keymap.c
* Update keyboards/cospad/keymaps/split_plus_and_zero/keymap.c
Co-Authored-By: Nick Brassel <nick@tzarc.org>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
* 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
* 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>
* Reorder logic within common_features.mk
* Revert haptic logic
* Add back path to make tests happy
* Update common_features.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* 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
* Lodestone: add ANSI and ISO layout data and keymaps
* rename layout macros
LAYOUT_ansi -> LAYOUT_65_ansi_blocker_split_bs
LAYOUT_iso -> LAYOUT_65_iso_blocker_split_bs
* use four-space indent on the new keymaps
* add 65_ansi_blocker and 65_iso_blocker layouts
* [Docs] Update layer documentation
* Add layer_state_cmp functions
* Fix cut/copy/paste issue
* Add id tags
* Apply noroads corrections
* Move Layers section to separate document
* Fix ID tag for layers
* Use better name for summary/side bar
* Fix feature page linkage
As well as a small spell error close by
* Remove paper analogy for now
* VIA Support: GH60 Rev C and GH60 Satan
* Corrected GH60 VIA default keymap
* Corrected GH60 VIA default keymap pt 2
* Copied default keymap over via default keymap
* Satan GH60 default corrected for VIA
* Satan GH60 default corrected for VIA pt 2
* Satan GH60 LTO enable for size
* Transparent 4th dynamic layer for GH60 Via support
* Update keyboards/gh60/revc/info.json
* Update keyboards/gh60/satan/info.json
* Update keyboards/gh60/satan/info.json
* Removed deprecated JSON keys gh60/revc/info.json
* Removed inline comment next to VID for GH60 Satan
* add via support for pdxkbc macropad
* add VIA support for the pdxkbc
* clean out some commented code
* remove unused files
* comment the vendor ID
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
* Update keyboards/pdxkbc/keymaps/via/keymap.c
Co-Authored-By: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
* Create rules.mk
Added rules.mk in keymaps/via
* Update rules.mk
Added new line at the end of the file
* Create via\keymap.c
Added keymap.c inside the via directory
* Update config.h in projectkb/alice
Defined VIA eeprom layout size to 2 bits to allow for 4 layout options
* Add Lodestone PCB
Working Firmware for Lodestone PCB tested on physical PCB prototypes.
* Update keyboards/flx/lodestone/lodestone.c
* Update keyboards/flx/lodestone/keymaps/default/config.h
* Update keyboards/flx/lodestone/rules.mk
* Update keyboards/flx/lodestone/readme.md
* Delete config.h
* Update keyboards/flx/lodestone/info.json
Suggested by noroadsleft
* Update keyboards/flx/lodestone/info.json
* Update keyboards/flx/lodestone/info.json
Changed maintainer name as suggested.
* Update keyboards/flx/lodestone/keymaps/default/readme.md
* Update keyboards/flx/lodestone/info.json
* Update keyboards/flx/lodestone/rules.mk
Changed Link_Time_Optimization to LTO didn't know this was a thing :)
* Update keyboards/flx/lodestone/keymaps/default/keymap.c
Removed 2 unessisary layers from the default map.
* Update keyboards/flx/lodestone/readme.md
* Update keyboards/flx/lodestone/info.json
* Changed from LAYOUT to LAYOUT_all
AS suggested by noroadsleft, changed 4 files to match, and re-testeed on my hardware to confirm working.
* Update keyboards/flx/lodestone/config.h
Cleaned up Manu, Product and Descriptor as suggested.
* Update keyboards/flx/lodestone/readme.md
* Update default keymap for Choco60
* Update keyboards/choco60/keymaps/default/keymap.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* Assign unique VID to LazyDesigners' boards
* Add VIA support for LazyDesigners Dimple
* Apply @fauxpark's suggestions
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update switch to array to allow custom values
* Add adc keymap
* update docs to reflect alignment of default 10 bit
* start conversion to USE_ADCVn
* samplerate is hella wrong...stub out for now
* basic f1 and f4 functionality
* Tidy up current changes
* Restore old pinToMux function
* Add back sample rate for supported platforms
* F0 compile fixes
* wordsmithery
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Remove reference to avr only function
Co-authored-by: Ryan <fauxpark@gmail.com>
* Remove unnecessary import of rgblight.h in tmk_core/protocol/*/*.c
* tmk_core/protocol/chibios/main.c
* tmk_core/protocol/lufa/lufa.c
see #8380 for tmk_core/protocol/vusb/main.c.
* Remove '#include "rgblight.h"' from tmk_core/protocol/vusb/main.c.
* fix CLI section links in the Summary
* fix heading in Pointing Device doc
* fix headings in PS/2 Mouse Support doc
* add explicit section ids to I2C Master Driver doc
* reformat GPIO Controls table
Much like the I2C Master Driver doc, I found this a bit less than ideal to read. (The table was actually wider than the space available for it.)
Reformatted so each GPIO function is an H3 heading, followed by a paragraph and a table of each architecture's old-style function.
* migrate changes from I2C Master Driver doc to Japanese translation
* add explicit anchors to I2C Master Driver docs
* fix code block language markers
The language markers are case-sensitive; using the wrong case means the syntax highlighting doesn't work.
Good: ```c
Bad: ```C
* restore Japanese I2C Master Driver doc to current master
Can't update the internal tracking references accurately until the changes to the English doc are committed to master.
* add explicit anchors to edited files
* change ChibiOS/ARM to ARM/ChibiOS
Because ARM/ATSAM is also a thing that exists.
* fix code block language markers again
Used the wrong markers in a few spots. Also these are apparently always supposed to be lowercase.
* add section anchors to cli.md
* restore table formatting on GPIO Control doc
* remove changes to _summary.md
* fix some broken links
* remove duplicate and confusing material from cli.md
* Switch brazil to the 2 letter country code
* Update docs/_langs.md
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* add via keymap for doro67
* have more sensible VID and PID
* apply the same VIA changes to the regular PCB
* Update keyboards/doro67/rgb/keymaps/via/keymap.c
* Update keyboards/doro67/regular/config.h
* fix some formatting
* add via support for multi doro67
* added olkb_style layout for XD75
* removed unnecessary config.h
* cleaned up empty functions
* refactored fuction type for clarity
* renamed the layout
* Use pathlib everywhere we can
* Improvements based on @erovia's feedback
* rework qmk compile and qmk flash to use pathlib
* style
* Remove the subcommand_name argument from find_keyboard_keymap()
* add experimental decorators
* Create decorators for finding keyboard and keymap based on current directory.
Decorators were inspired by @Erovia's brilliant work on the proof of concept.
* Fix extra keyboard report during test_fixture teardown
* Add tests for pressing two keys with only different modifers
* Fix#1708
When two keys that use the same keycode, but different modifiers were
pressed at the same time, the second keypress wasn't registered. This is
fixed by forcing a key release when we detect a new press for the same
keycode.
* Fix the NKRO version of is_key_pressed
* Fix uninitalized loop variable
Co-authored-by: Jack Humbert <jack.humb@gmail.com>
* Candybar: split lefty and righty into subprojects.
* Update readme.md
* Update readme.md
* Candybar: Moved STM32 library files into project root folder.
* Update keyboards/candybar/righty/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/candybar/righty/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/candybar/righty/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/candybar/righty/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/candybar/righty/righty.c
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Candybar: remove Boards directory so project uses one from drivers
* Update keyboards/candybar/righty/readme.md
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update readme.md
* Update readme.md
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* Add new keymap with split right shift and split backspace for bananasplit PCB
* Remove unecessary config.h
* Remove unecessary line breaks
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Christopher Janzen <hello@christopherjanzen.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Rearrange the custom CSS a bit.
* fix css name
* add missing quote
* Fix up dark mode rendering. (#8392)
* Fix up dark mode rendering.
* Update index.html
* Fix up code blocks
* Fix code in page toc
* Update docs/qmk_custom_dark.css
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: skullY <skullydazed@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* feat(build): added script for compiling with docker easily
* chore: bring my own build with docker to master
* chore: delete a file that does not make sense anymore
* feat: first redox for danielo
* chore: basic compatibility between redox and my space
* refactor: removed some old stuff
* feat: added go coding symbols
* feat: name control_k and alt_j
* chore: reduce combo term
* feat: improved first layer of redox
* feat: add configurations to the redox
* feat: make alt tab more portable
* feat: small improvements to redox layout
* feat: added leader
* refactor: move leader defs to my userspace config
* chore: movement modified
* feat: more predefined keys and a a new combo
* feat: redox alt tab functionality
* refactor: move alt_tab processing to a separate file
* refactor: early return
* refactor: move process record to a separate file
* format leader function
* chore: backspace on digits layer
* feat: add extra combo
* feat: added more combos
* implement guard proposed by @drashna
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* chore: include @drashna placeholder suggestion
Co-Authored-By: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Add support for STM32L0/L1 onboard EEPROM.
* Update docs/eeprom_driver.md
Co-Authored-By: Joel Challis <git@zvecr.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Since #7773 caused a build error for `mxss:default`, I made similar changes to 'keyboards/mxss/rgblight.h' as #7773 did to 'quantum/rgblight.h'.
**This commit does not change the build result.**
Testing script
```shell
# build on versions earlier than PR #7773
git checkout 0.8.24
echo master > /tmp/master_md5.txt
make mxss:default:clean
make mxss:default
md5 mxss_default.hex >> /tmp/master_md5.txt
# build on this commit
git checkout fix-keyboards-mxss-rgblight.h
echo fix-keyboards-mxss-rgblight.h > /tmp/branch_md5.txt
make mxss:default:clean
make mxss:default
md5 mxss_default.hex >> /tmp/branch_md5.txt
diff -u /tmp/master_md5.txt /tmp/branch_md5.txt
```
Test result:
```
--- /tmp/master_md5.txt 2020-03-12 05:51:39.000000000 +0900
+++ /tmp/branch_md5.txt 2020-03-12 05:51:49.000000000 +0900
@@ -1,2 +1,2 @@
-master
+fix-keyboards-mxss-rgblight.h
MD5 (mxss_default.hex) = 3034b2504d0c7fc6bd8bf1dffb6b8486
```
* Initial commit of oddball keyboard
* Update oddball project url
* Update pointer functions to only run on master side
* Add unique product version
* Capitalise product name
* Convert oddball keymap layer flags to enum
* Remove commented keyboard boilerplate code
* Remove unused keymap config
* Fix incorrect layout in info.json
* Add markdown link text in readme
* VIA_ENABLE Tokyo60 PCB
* Update config.h
* Apply suggestions from code review
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* New feature: RGBLIGHT_LAYERS
This feature allows users to define multiple independent layers of lighting
that can be toggled on and off individually, making it easy to use your
RGB lighting to indicate things like active keyboard layer & modifier state.
* Demonstrate built in functions for layer state checking
Also link the video in the docs.
* Follow existing pattern for setting rgblight_status flags
* Eliminate rgblight_is_static_mode since it's not needed
Just check to see if the timer is enabled directly.
* Moved contents of rgblight_reconfig.h to rgblight_post_config.h.
In #3582, rgblight_reconfig.h had to be newly created. Now, the build system of qmk_firmware has a post_cofig feature, so that what was done in rgblight_reconfig.h can now be realized in rgblight_post_config.h.
**This commit does not change the build result.**
Testing script
```shell
# build on master
git checkout master
echo master > /tmp/master_md5.txt
# RGBLIGHT_ENABLE = no
make HELIX=verbose helix/rev2:default:clean
make HELIX=verbose helix/rev2:default
md5 helix_rev2_default.hex >> /tmp/master_md5.txt
# RGBLIGHT_ENABLE = yes, with animations
make HELIX=verbose helix/rev2/back:default:clean
make HELIX=verbose helix/rev2/back:default
md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt
# RGBLIGHT_ENABLE = yes, without animations
make HELIX=verbose,no_ani helix/rev2/back:default:clean
make HELIX=verbose,no_ani helix/rev2/back:default
md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt
# build on refactor_rgblight_reconfig.h
git checkout refactor_rgblight_reconfig.h
echo refactor_rgblight_reconfig.h > /tmp/branch_md5.txt
# RGBLIGHT_ENABLE = no
make HELIX=verbose helix/rev2:default:clean
make HELIX=verbose helix/rev2:default
md5 helix_rev2_default.hex >> /tmp/branch_md5.txt
# RGBLIGHT_ENABLE = yes, with animations
make HELIX=verbose helix/rev2/back:default:clean
make HELIX=verbose helix/rev2/back:default
md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt
# RGBLIGHT_ENABLE = yes, without animations
make HELIX=verbose,no_ani helix/rev2/back:default:clean
make HELIX=verbose,no_ani helix/rev2/back:default
md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt
diff -u /tmp/master_md5.txt /tmp/branch_md5.txt
```
Test result:
```
--- /tmp/master_md5.txt 2020-01-03 15:42:22.000000000 +0900
+++ /tmp/branch_md5.txt 2020-01-03 15:42:42.000000000 +0900
@@ -1,4 +1,4 @@
-master
+refactor_rgblight_reconfig.h
MD5 (helix_rev2_default.hex) = f360032edd522448366d471d8f4f8181
MD5 (helix_rev2_back_default.hex) = 0c663acc6cccc44476b3b969ad22a48f
MD5 (helix_rev2_back_default.hex) = e66b1195ff6d38e6e22c975b8ae42fd3
```
* Expressions that are too long are difficult to read, so wrap them.
* Edit the expression again
* remove `defined(RGBLIGHT_ANIMATIONS)` in `tmk_core/common/*/suspend.c`, `tmk_core/protocol/*/main.c`
move contents of rgblight_reconfig.h to rgblight.h.
The following changes were made to rgblight.h.
```diff
+#ifdef RGBLIGHT_USE_TIMER
void rgblight_task(void);
void rgblight_timer_init(void);
void rgblight_timer_enable(void);
void rgblight_timer_disable(void);
void rgblight_timer_toggle(void);
+#else
+#define rgblight_task()
+#define rgblight_timer_init()
+#define rgblight_timer_enable()
+#define rgblight_timer_disable()
+#define rgblight_timer_toggle()
+#endif
```
The following changes were made to tmk_core/common/avr/suspend.c, tmk_core/common/chibios/suspend.c, tmk_core/protocol/chibios/main.c, tmk_core/protocol/lufa/lufa.c, tmk_core/protocol/vusb/main.c.
```diff
-# ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_enable();
-# endif
```
```diff
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
+#if defined(RGBLIGHT_ENABLE)
rgblight_task();
#endif
```
* remove 'defined(RGBLIGHT_ANIMATIONS)' in tmk_core/common/keyboard.c
Co-authored-by: Joel Challis <git@zvecr.com>
* added Palette1202
* removed currently unused cords
* Update keyboards/palette1202/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Apply suggestions from code review
Co-Authored-By: Drashna Jaelre <drashna@live.com>
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Update readme.md
removed unnecessary horizontal line from readme.md
* Update readme.md
Fixed style, make command example
* Removed spaces
* removed unused config.h
* fixed defines
* fixed send string on rotate encoder
* fixed layer numbers for OLED Display
* fixed to use existing function to set default layer
https://github.com/qmk/qmk_firmware/pull/7736#discussion_r366699616
* flipped rotary encoder directions
* Added layer for Clip studio on iOS
* Update keyboards/palette1202/rules.mk
Co-Authored-By: Ryan <fauxpark@gmail.com>
* Update keyboards/palette1202/lib/oled_helper.h
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* is_master, has_usb() move to rev2.[hc]
* Do recent helix/rev2 changes to helix/pico as well.
helix/pico/matrix.c: remove 'is_master'
helix/pico/pico.c: add 'is_master'
helix/pico/pico.h: add 'has_usb()' macro
helix/pico/split_util.c: remove 'setup_handedness()' 'has_usb()', add 'is_helix_master()' etc
* add HELIX=scan option into {rev2/pico}/local_features.mk
Made DEBUG_MATRIX_SCAN_RATE easy to use.
* Changed rules.mk to link "helix/local_drivers/ssd1306.c" only when OLED_ENABLE = yes.
* Added option to use split_common for helix/rev2, helix/pico keyboard.
how to build:
### build helix/pico (HelixPico) with helix current codes
$ make helix/pico:KEY_MAP
$ make helix/pico/back:KEY_MAP
### build helix/rev2 (Helix or Helix beta) with helix current codes
$ make helix:KEY_MAP
$ make helix/rev2/back:KEY_MAP
$ make helix/rev2/under:KEY_MAP
$ make helix/rev2/oled:KEY_MAP
$ make helix/rev2/oled/back:KEY_MAP
$ make helix/rev2/oled/under:KEY_MAP
### build helix/pico (HelixPico) with split_common codes
$ make helix/pico/sc:KEY_MAP
$ make helix/pico/sc/back:KEY_MAP
$ make helix/pico/sc/under:KEY_MAP
### build helix/rev2 (Helix) with split_common codes
$ make helix/rev2/sc:KEY_MAP
$ make helix/rev2/sc/back:KEY_MAP
$ make helix/rev2/sc/under:KEY_MAP
$ make helix/rev2/sc/oled:KEY_MAP
$ make helix/rev2/sc/oledback:KEY_MAP
$ make helix/rev2/sc/oledunder:KEY_MAP
* add matrix_slave_scan_user() to helix/rev2/rev2.c, helix/pico/pico.h
* Changed 'helix:xulkal' to always use split_common and removed ad hoc code.
Added the following line to 'helix/rev2/keymaps/xulkal/rules.mk':
SPLIT_KEYBOARD = yes
Removed the following ad hoc code from 'users/xulkal/custom_oled.c':
#if KEYBOARD_helix_rev2
extern uint8_t is_master;
bool is_keyboard_master(void) { return is_master; }
#endif
* add '#define DIODE_DIRECTION COL2ROW' into helix/{rev2|pico}/config.h
This commit does not change the build result.
* update helix readme
* keyboards/helix/readme.md
* keyboards/helix/pico/keymaps/default/readme.md
* keyboards/helix/rev2/keymaps/default/readme.md
Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders.md).
This driver is currently AVR-only. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V).
This driver currently supports both AVR and a limited selection of ARM devices. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V for AVR, 3.3V only for ARM), however on ARM there is more flexibility in control of operation through `#define`s if you need more precision.
## Usage
@ -20,6 +20,8 @@ Then place this include at the top of your code:
@ -39,8 +41,84 @@ Then place this include at the top of your code:
<sup>\* The ATmega328P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these.</sup>
### ARM
Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC.
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-based, whereas the F3 has 4 ADCs and the channels are 1 based. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.|
@ -48,3 +126,28 @@ Then place this include at the top of your code:
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. |
|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". |
|`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. |
### ARM
Note that care was taken to match all of the functions used for AVR devices, however complications in the ARM platform prevent that from always being possible. For example, the `STM32` chips do not have assigned Arduino pins. We could use the default pin numbers, but those numbers change based on the package type of the device. For this reason, please specify your target pins with their identifiers (`A0`, `F3`, etc.). Also note that there are some variants of functions that accept the target ADC for the pin. Some pins can be used for multiple ADCs, and this specified can help you pick which ADC will be used to interact with that pin.
|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.|
|`analogReadPinAdc(pin, adc)`|Reads the value from the specified QMK pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function.|
|`pinToMux(pin)` |Translates a given QMK pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)".|
|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and adc combination. See your MCU's datasheet for more information.|
## Configuration
## ARM
The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates.
|ADC_CIRCULAR_BUFFER|`bool`|`false` |If `TRUE`, then the implementation will use a circular buffer.|
|ADC_NUM_CHANNELS |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`.|
|ADC_BUFFER_DEPTH |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to `2` bytes so we can contain our one value. This could be set to 1 if you opt for a 8-bit or lower result.|
|ADC_SAMPLING_RATE |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.|
|ADC_RESOLUTION |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.|
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
**Usage for Configurator Exports**:
```
qmk compile <configuratorExport.json>
```
**Usage for Keymaps**:
```
qmk compile -kb <keyboard_name> -km <keymap_name>
```
**Usage in Keyboard Directory**:
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
```
qmk compile
```
**Usage for building all keyboards that support a specific keymap**:
```
qmk compile -kb all -km <keymap_name>
```
**Example**:
```
$ qmk config compile.keymap=default
$ cd ~/qmk_firmware/keyboards/planck/rev6
$ qmk compile
Ψ Compiling keymap with make planck/rev6:default
...
```
or with optional keymap argument
```
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
$ qmk compile -km 66_iso
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
...
```
or in keymap directory
```
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
$ qmk compile
Ψ Compiling keymap with make make gh60/satan:colemak
...
```
**Usage in Layout Directory**:
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
```
qmk compile -kb <keyboard_name>
```
**Example**:
```
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
$ qmk compile -kb dz60
Ψ Compiling keymap with make dz60:mechmerlin-ansi
...
```
## `qmk flash`
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
**Usage**:
```
qmk doctor [-y] [-n]
```
**Examples**:
Check your environment for problems and prompt to fix them:
qmk doctor
Check your environment and automatically fix any problems found:
qmk doctor -y
Check your environment and report problems only:
qmk doctor -n
## `qmk json2c`
Creates a keymap.c from a QMK Configurator export.
**Usage**:
```
qmk json2c [-o OUTPUT] filename
```
## `qmk list-keyboards`
This command lists all the keyboards currently defined in `qmk_firmware`
**Usage**:
```
qmk list-keyboards
```
## `qmk list-keymaps`
This command lists all the keymaps for a specified keyboard (and revision).
**Usage**:
```
qmk list-keymaps -kb planck/ez
```
## `qmk new-keymap`
This command creates a new keymap based on a keyboard's existing default keymap.
**Usage**:
```
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```
---
# Developer Commands
## `qmk cformat`
This command formats C code using clang-format.
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
**Usage for specified files**:
```
qmk cformat [file1] [file2] [...] [fileN]
```
**Usage for all core files**:
```
qmk cformat -a
```
**Usage for only changed files against origin/master**:
```
qmk cformat
```
**Usage for only changed files against branch_name**:
```
qmk cformat -b branch_name
```
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
**Usage**:
```
qmk docs [-p PORT]
```
## `qmk kle2json`
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
**Usage**:
```
qmk kle2json [-f] <filename>
```
**Examples**:
```
$ qmk kle2json kle.txt
☒ File info.json already exists, use -f or --force to overwrite.
```
```
$ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```
## `qmk pyformat`
This command formats python code in `qmk_firmware`.
**Usage**:
```
qmk pyformat
```
## `qmk pytest`
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
@ -6,6 +6,18 @@ This document has useful information for developers wishing to write new `qmk` s
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
## Developer mode:
If you intend to maintain keyboards and/or contribute to QMK, you can enable the CLI's "Developer" mode:
`qmk config user.developer=True`
This will allow you to see all available subcommands.
**Note:** You will have to install additional requirements:
```bash
python3 -m pip install -r requirements-dev.txt
```
# Subcommands
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
@ -32,7 +44,7 @@ def hello(cli):
First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
# User Interaction
@ -44,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c
You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
You should never use the format operator (`%`) directly, always pass values as arguments.
### Logging (`cli.log`)
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.
@ -20,11 +20,11 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
* Do not put whitespace between `#` and `if`.
* When deciding how (or if) to indent directives keep these points in mind:
* Readability is more important than consistency.
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
* When deciding how (or if) to indent preprocessor directives, keep these points in mind:
* Readability is more important than consistency.
* Follow the file's existing style. If the file is mixed, follow the style that makes sense for the section you are modifying.
* When indenting, keep the hash at the start of the line and add whitespace between `#` and `if`, starting with 4 spaces after the `#`.
* You can follow the indention level of the surrounding C code, or preprocessor directives can have their own indentation levels. Choose the style that best communicates the intent of your code.
Most of our style follows PEP8 with some local modifications to make things less nit-picky.
* We target Python 3.5 for compatability with all supported platforms.
* We target Python 3.6 for compatability with all supported platforms.
* We indent using four (4) spaces (soft tabs)
* We encourage liberal use of comments
* Think of them as a story describing the feature
@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the
## Integration Tests
Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.5/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.
Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.
@ -115,9 +115,9 @@ If you define these options you will disable the associated feature, which can s
* `#define NO_ACTION_ONESHOT`
* disable one-shot modifiers
* `#define NO_ACTION_MACRO`
* disable old style macro handling: MACRO() & action_get_macro
* disable old-style macro handling using `MACRO()`, `action_get_macro()` _(deprecated)_
* `#define NO_ACTION_FUNCTION`
* disable calling of action_function() from the fn_actions array (deprecated)
* disable old-style function handling using `fn_actions`, `action_function()` _(deprecated)_
## Features That Can Be Enabled
@ -190,6 +190,8 @@ If you define these options you will enable the associated feature, which may in
* pin the DI on the WS2812 is hooked-up to
* `#define RGBLIGHT_ANIMATIONS`
* run RGB animations
* `#define RGBLIGHT_LAYERS`
* Lets you define [lighting layers](feature_rgblight.md) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
* `#define RGBLED_NUM 12`
* number of LEDs
* `#define RGBLIGHT_SPLIT`
@ -315,10 +317,10 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
* `LAYOUTS`
* A list of [layouts](feature_layouts.md) this keyboard supports.
* `LINK_TIME_OPTIMIZATION_ENABLE`
* Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled.
It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
* Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable).
However, this will automatically disable the legacy TMK Macros and Functions features, as these break when LTO is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`. (Note: This does not affect QMK [Macros](feature_macros.md) and [Layers](feature_layers.md).)
* `LTO_ENABLE`
* It has the same meaning as LINK_TIME_OPTIMIZATION_ENABLE. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
* Has the same meaning as `LINK_TIME_OPTIMIZATION_ENABLE`. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below.
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
`EEPROM_DRIVER = vendor`(default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
`EEPROM_DRIVER = i2c`| Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
`EEPROM_DRIVER = transient`| Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
## Vendor Driver Configuration
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
# Switching and Toggling Layers :id=switching-and-toggling-layers
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers). When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](one_shot_keys.md) for details and additional functionality.
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
## Caveats
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
# Working with Layers
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
## Beginners
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number).
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
## Intermediate Users
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
## Advanced Users
Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
# Modifier Keys :id=modifier-keys
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
@ -49,11 +6,11 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
@ -61,12 +18,16 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
You can also chain them, for example `LCTL(LALT(KC_DEL))`or `C(A(KC_DEL))`makes a key that sends Control+Alt+Delete with a single keypress.
# Legacy Content
# Legacy Content :id=legacy-content
This page used to encompass a large set of features. We have moved many sections that used to be part of this page to their own pages. Everything below this point is simply a redirect so that people following old links on the web find what they're looking for.
@ -123,7 +123,7 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes
# Bootmagic Lite :id=bootmagic-lite
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
To enable this version of Bootmagic, you need to enable it in your `rules.mk` with:
@ -131,7 +131,7 @@ To enable this version of Bootmagic, you need to enable it in your `rules.mk` wi
BOOTMAGIC_ENABLE = lite
```
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
```c
#define BOOTMAGIC_LITE_ROW 0
@ -144,9 +144,20 @@ And to trigger the bootloader, you hold this key down when plugging the keyboard
!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved.
## Split Keyboards
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. This To do so, add these entries to your `config.h` file:
```c
#define BOOTMAGIC_LITE_ROW_RIGHT 4
#define BOOTMAGIC_LITE_COLUMN_RIGHT 1
```
By default, these values are not set.
## Advanced Bootmagic Lite
The `bootmagic_lite` function is defined weakly, so that you can replace this in your code, if you need. A great example of this is the Zeal60 boards that have some additional handling needed.
The `bootmagic_lite` function is defined weakly, so that you can replace this in your code, if you need. A great example of this is the Zeal60 boards that have some additional handling needed.
To replace the function, all you need to do is add something like this to your code:
@ -163,4 +174,4 @@ void bootmagic_lite(void) {
}
```
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
@ -38,5 +38,6 @@ For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computati
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed.
* sym_pk - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occured on that key, the key status change is pushed.
One of the most powerful and well used features of QMK Firmware is the ability to use layers. For most people, this amounts to a function key that allows for different keys, much like what you would see on a laptop or tablet keyboard.
For a detailed explanation of how the layer stack works, checkout [Keymap Overview](keymap.md#keymap-and-layers).
## Switching and Toggling Layers :id=switching-and-toggling-layers
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](one_shot_keys.md) for details and additional functionality.
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
### Caveats :id=caveats
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-16, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
## Working with Layers :id=working-with-layers
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
### Beginners :id=beginners
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number).
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
### Intermediate Users :id=intermediate-users
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
### Advanced Users :id=advanced-users
Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
## Functions :id=functions
There are a number of functions (and variables) related to how you can use or manipulate the layers.
| `layer_state_set(layer_mask)` | Directly sets the layer state (recommended, do not use unless you know what you are doing). |
| `layer_clear()` | Clears all layers (turns them all off). |
| `layer_move(layer)` | Turns specified layer on, and all other layers off. |
| `layer_on(layer)` | Turns specified layer on, leaves all other layers in existing state. |
| `layer_off(layer)` | Turns specified layer off, leaves all other layers in existing state. |
| `layer_invert(layer)` | Interverts/toggles the state of the specified layer |
| `layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing layer state. |
| `layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing layer state. |
| `layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing layer state. |
| `layer_debug(layer_mask)` | Prints out the current bit mask and highest active layer to debugger console. |
| `default_layer_set(layer_mask)` | Directly sets the default layer state (recommended, do not use unless you know what you are doing). |
| `default_layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing default layer state. |
| `default_layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing default layer state. |
| `default_layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing default layer state. |
| `default_layer_debug(layer_mask)` | Prints out the current bit mask and highest active default layer to debugger console. |
| [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer) | Sets the default layer and writes it to persistent memory (EEPROM). |
| [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). |
| [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. |
In additional to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passed the layer state to the function, which can be read or modified.
| `layer_state_set_kb(layer_state_t state)` | Callback for layer functions, for keyboard. |
| `layer_state_set_user(layer_state_t state)` | Callback for layer functions, for users. |
| `default_layer_state_set_kb(layer_state_t state)` | Callback for default layer functions, for keyboard. Called on keyboard initialization. |
| `default_layer_state_set_user(layer_state_t state)` | Callback for default layer functions, for users. Called on keyboard initialization. |
?> For additional details on how you can use these callbacks, check out the [Layer Change Code](custom_quantum_functions.md#layer-change-code) document.
| `layer_state_cmp(cmp_layer_state, layer)` | This checks the `cmp_layer_state` to see if the specific `layer` is enabled. This is meant for use with the layer callbacks. |
| `layer_state_is(layer)` | This checks the layer state to see if the specific `layer` is enabled. (calls `layer_state_cmp` for the global layer state). |
!> There is `IS_LAYER_ON(layer)` as well, however the `layer_state_cmp` function has some additional handling to ensure that on layer 0 that it returns the correct value. Otherwise, if you check to see if layer 0 is on, you may get an incorrect value returned.
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_advanced_keycodes.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This well then disable the filtering, and you'll need to specify the whole keycode.
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This will then disable the filtering, and you'll need to specify the whole keycode.
## Customization
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.