Compare commits
115 Commits
Author | SHA1 | Date | |
---|---|---|---|
4a42e10ccd | |||
81ae0fb10e | |||
e659bc4467 | |||
e3541853a9 | |||
0ea6cf719e | |||
c9d23f50f6 | |||
c5c35f5f4b | |||
6b584a23c0 | |||
6bb3fbd4e0 | |||
9e0b244a34 | |||
4b7fcf0af0 | |||
22b9303e2a | |||
e956c11bc9 | |||
cbc5de67be | |||
9cb1d36974 | |||
0a5d302622 | |||
6c24e28b8d | |||
d19805f9de | |||
4beb5e72f8 | |||
5f0a2e078f | |||
feac994f6f | |||
4931510ad3 | |||
d6215ad6af | |||
eba4cb7a04 | |||
85ea963931 | |||
492a16308a | |||
17200f4712 | |||
eb903c7623 | |||
c58921c64c | |||
9fc3e26f70 | |||
e9f44ee96d | |||
9cb80d68e2 | |||
4932f9566a | |||
97c6b8143c | |||
3b9e4967b8 | |||
7c57104b51 | |||
846598541b | |||
c68597d9ad | |||
5ffec5d9b0 | |||
a8eaf0b666 | |||
4f484bc1c9 | |||
a1fa70f94d | |||
d8f0faabda | |||
818042b2c3 | |||
8910f9b87e | |||
9dd3e08fdd | |||
b3bcafcc4b | |||
b8f08d936d | |||
dd37245373 | |||
eab41f7b38 | |||
cca3dcc5ec | |||
12e66330c5 | |||
d91c9858c5 | |||
8a0997709b | |||
0e1a731446 | |||
57ef8a54e4 | |||
1add90a6d2 | |||
e4230c84d0 | |||
1485cc1d26 | |||
4ea3bbdb4c | |||
bad839e6ac | |||
3aec9a4354 | |||
163ddd5d15 | |||
dc7cc26dff | |||
a6e46b99b9 | |||
ab197af2ea | |||
1226c69f4f | |||
8a1e656099 | |||
56f266173c | |||
2dfdafbd5b | |||
5fe0fe3756 | |||
cc0d4b6513 | |||
23b1889241 | |||
6cd001e337 | |||
e4f26a9fcc | |||
9cda36238f | |||
52630f6611 | |||
2ec1ab2b35 | |||
557745ba9f | |||
f229d22416 | |||
98ac32b417 | |||
eeb6443767 | |||
c1a6ca46a7 | |||
7c5428b56d | |||
d9983082c2 | |||
41d5d3e655 | |||
e6b91549e3 | |||
58898f77e3 | |||
c2f4c4e29e | |||
a7c61f2947 | |||
d1feb8744a | |||
6d1b45fb84 | |||
2c2e103457 | |||
7235c93827 | |||
bb53635f33 | |||
af37bb2f78 | |||
4c675a83ba | |||
7b0356d1d4 | |||
6eb89ae906 | |||
b781cbf7e2 | |||
a14518bf57 | |||
f74f0ac06b | |||
a9a46adba0 | |||
c51dfef958 | |||
8b1862330a | |||
dc6b341cf9 | |||
155660ff9d | |||
6e25220eed | |||
16546ee06f | |||
1620d78e73 | |||
fc54d62111 | |||
f5422a70b6 | |||
e3b3c1ef82 | |||
bba871df2f | |||
5bbad3147c |
24
.clang_complete
Normal file
24
.clang_complete
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
-I.
|
||||
-I./drivers
|
||||
-I./drivers/avr
|
||||
-I./keyboards/ergodox_ez
|
||||
-I./keyboards/ergodox_ez/keymaps/vim
|
||||
-I./lib
|
||||
-I./lib/lufa
|
||||
-I./quantum
|
||||
-I./quantum/api
|
||||
-I./quantum/audio
|
||||
-I./quantum/keymap_extras
|
||||
-I./quantum/process_keycode
|
||||
-I./quantum/serial_link
|
||||
-I./quantum/template
|
||||
-I./quantum/tools
|
||||
-I./quantum/visualizer
|
||||
-I./tmk_core
|
||||
-I./tmk_core/common
|
||||
-I./tmk_core/common/debug.h
|
||||
-I./tmk_core/protocol
|
||||
-I./tmk_core/protocol/lufa
|
||||
-I./util
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
@ -11,7 +11,7 @@ env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
before_install:
|
||||
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
@ -38,4 +38,4 @@ notifications:
|
||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.
|
||||
|
||||
## How to get it {#how-to-get-it}
|
||||
## How to Get It {#how-to-get-it}
|
||||
|
||||
If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork.
|
||||
|
||||
Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`).
|
||||
|
||||
## How to compile {#how-to-compile}
|
||||
## How to Compile {#how-to-compile}
|
||||
|
||||
Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:
|
||||
|
||||
@ -20,6 +20,6 @@ This would build the `rev4` revision of the `planck` with the `default` keymap.
|
||||
|
||||
make preonic:default
|
||||
|
||||
## How to customize {#how-to-customize}
|
||||
## How to Customize {#how-to-customize}
|
||||
|
||||
QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
|
||||
|
@ -1,9 +1,9 @@
|
||||
* [Getting started](README.md)
|
||||
* [Getting Started](README.md)
|
||||
* [QMK Introduction](getting_started_introduction.md)
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
* Alternative: [Vagrant Guide](getting_started_vagrant.md)
|
||||
* [Build/Compile instructions](getting_started_make_guide.md)
|
||||
* [Flashing instructions](flashing.md)
|
||||
* [Build/Compile Instructions](getting_started_make_guide.md)
|
||||
* [Flashing Instructions](flashing.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
|
||||
@ -26,14 +26,14 @@
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_escape.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
* [Layouts](feature_layouts.md)
|
||||
* [Leader Key](feature_leader_key.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse keys](feature_mouse_keys.md)
|
||||
* [Mouse Keys](feature_mouse_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS2 Mouse](feature_ps2_mouse.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
@ -65,12 +65,12 @@
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Keymap Overview](keymap.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP flashing guide](isp_flashing_guide.md)
|
||||
* [ISP Flashing Guide](isp_flashing_guide.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](how_keyboards_work.md)
|
||||
|
@ -4,4 +4,4 @@ A QMK collaborator is a keyboard maker/designer that is interested in helping QM
|
||||
* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core.
|
||||
* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own.
|
||||
|
||||
If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard!
|
||||
If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard!
|
||||
|
@ -22,4 +22,4 @@ You can also use any ARM processor that [ChibiOS](http://www.chibios.org) suppor
|
||||
* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
|
||||
* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
|
||||
* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
|
||||
* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
|
||||
* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
|
||||
|
@ -25,7 +25,7 @@ Some keyboards have folders and sub-folders to allow for different hardware conf
|
||||
|
||||
This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||
|
||||
# The `config.h` file
|
||||
# The `config.h` File
|
||||
|
||||
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
|
||||
|
||||
@ -70,6 +70,10 @@ This is a C header file that is one of the first things included, and will persi
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* number of levels your backlight will have (not including off)
|
||||
* `#define BACKLIGHT_BREATHING`
|
||||
* enables backlight breathing (only works with backlight pins B5, B6 and B7)
|
||||
* `#define BREATHING_PERIOD 6`
|
||||
* the length of one backlight "breath" in seconds
|
||||
* `#define DEBOUNCING_DELAY 5`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
@ -84,7 +88,7 @@ This is a C header file that is one of the first things included, and will persi
|
||||
If you define these options you will disable the associated feature, which can save on code size.
|
||||
|
||||
* `#define NO_DEBUG`
|
||||
* disable debuging
|
||||
* disable debugging
|
||||
* `#define NO_PRINT`
|
||||
* disable printing/debugging using hid_listen
|
||||
* `#define NO_ACTION_LAYER`
|
||||
@ -103,7 +107,7 @@ If you define these options you will disable the associated feature, which can s
|
||||
If you define these options you will enable the associated feature, which may increase your code size.
|
||||
|
||||
* `#define FORCE_NKRO`
|
||||
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of eeprom setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||
* `#define PREVENT_STUCK_MODIFIERS`
|
||||
* when switching layers, this will release all mods
|
||||
|
||||
@ -146,11 +150,11 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define RGBLIGHT_HUE_STEP 12`
|
||||
* units to step when in/decreasing hue
|
||||
* `#define RGBLIGHT_SAT_STEP 25`
|
||||
* units to step when in/decresing saturation
|
||||
* units to step when in/decreasing saturation
|
||||
* `#define RGBLIGHT_VAL_STEP 12`
|
||||
* units to step when in/decreasing value (brightness)
|
||||
* `#define RGBW_BB_TWI`
|
||||
* bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
* bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
|
||||
### Mouse Key Options
|
||||
|
||||
@ -164,7 +168,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
|
||||
## `rules.mk` options
|
||||
## `rules.mk` Options
|
||||
|
||||
### Build Options
|
||||
|
||||
@ -204,7 +208,7 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `NKRO_ENABLE`
|
||||
* USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* `AUDIO_ENABLE`
|
||||
* Enable the audio subsystem.
|
||||
* `RGBLIGHT_ENABLE`
|
||||
|
@ -1,4 +1,4 @@
|
||||
# How To Contribute
|
||||
# How to Contribute
|
||||
|
||||
👍🎉 First off, thanks for taking the time to read this and contribute! 🎉👍
|
||||
|
||||
@ -9,7 +9,7 @@ Third-party contributions help us grow and improve QMK. We want to make the pull
|
||||
* [General Guidelines](#general-guidelines)
|
||||
* [What does the Code of Conduct mean for me?](#what-does-the-code-of-conduct-mean-for-me)
|
||||
|
||||
## I Don't Want To Read This Whole Thing I Just Have a Question!
|
||||
## I Don't Want to Read This Whole Thing! I Just Have a Question!
|
||||
|
||||
If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
|
||||
@ -27,7 +27,7 @@ QMK is largely written in C, with specific features and parts written in C++. It
|
||||
|
||||
<!-- FIXME: We should include a list of resources for learning C here. -->
|
||||
|
||||
# Where can I go for help?
|
||||
# Where Can I Go for Help?
|
||||
|
||||
If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on gitter](http://gitter.im/QMK/qmk_firmware).
|
||||
|
||||
@ -52,7 +52,7 @@ Never made an open source contribution before? Wondering how contributions work
|
||||
14. Make changes to the pull request if the reviewing maintainer recommends them.
|
||||
15. Celebrate your success after your pull request is merged!
|
||||
|
||||
# Coding conventions
|
||||
# Coding Conventions
|
||||
|
||||
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
|
||||
|
||||
@ -64,7 +64,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
||||
* Optional Braces: Always include optional braces.
|
||||
* Good: if (condition) { return false; }
|
||||
* Bad: if (condition) return false;
|
||||
* We use C style comments: /* */
|
||||
* We use C style comments: `/* */`
|
||||
* Think of them as a story describing the feature
|
||||
* Use them liberally to explain why particular decisions were made.
|
||||
* Do not write obvious comments
|
||||
@ -75,7 +75,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
||||
|
||||
We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.
|
||||
|
||||
* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
|
||||
* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Make sure your code change actually compiles.
|
||||
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
|
||||
@ -111,7 +111,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
||||
|
||||
Keyboards are the raison d'être for QMK. Some keyboards are community maintained, while others are maintained by the people responsible for making a particular keyboard. The `readme.md` should tell you who maintains a particular keyboard. If you have questions relating to a particular keyboard you can [Open An Issue](https://github.com/qmk/qmk_firmware/issues) and tag the maintainer in your question.
|
||||
|
||||
We also ask that you follow these guidelines:
|
||||
We also ask that you follow these guidelines:
|
||||
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
@ -122,7 +122,7 @@ We also ask that you follow these guidelines:
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.md), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understanding QMK](understanding_qmk.md), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||
|
||||
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
||||
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
@ -136,7 +136,7 @@ Here are some things to keep in mind when working on your feature or bug fix.
|
||||
* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
|
||||
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
|
||||
|
||||
We also ask that you follow these guidelines:
|
||||
We also ask that you follow these guidelines:
|
||||
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump keyboards or keymaps in with core changes. Submit your core changes first.
|
||||
@ -147,6 +147,6 @@ We also ask that you follow these guidelines:
|
||||
|
||||
To maintain a clear vision of how things are laid out in QMK we try to plan out refactors in-depth and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved.
|
||||
|
||||
# What does the Code of Conduct mean for me?
|
||||
# What Does the Code of Conduct Mean for Me?
|
||||
|
||||
Our [Code of Conduct](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# How To Customize Your Keyboard's Behavior
|
||||
# How to Customize Your Keyboard's Behavior
|
||||
|
||||
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
||||
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
||||
|
||||
This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level.
|
||||
|
||||
@ -34,13 +34,13 @@ enum my_keycodes {
|
||||
};
|
||||
```
|
||||
|
||||
## Programming The Behavior Of Any Keycode
|
||||
## Programming the Behavior of Any Keycode
|
||||
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up to you to send any key up or down events that are required.
|
||||
|
||||
These function are called every time a key is pressed or released.
|
||||
|
||||
### Example `process_record_user()` implementation
|
||||
### Example `process_record_user()` Implementation
|
||||
|
||||
This example does two things. It defines the behavior for a custom keycode called `FOO`, and it supplements our Enter key by playing a tone whenever it is pressed.
|
||||
|
||||
@ -60,18 +60,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
PLAY_NOTE_ARRAY(tone_qwerty);
|
||||
}
|
||||
return true; // Let QMK send the enter press/release events
|
||||
default:
|
||||
return true; // Process all other keycodes normally
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### `process_record_*` Function documentation
|
||||
### `process_record_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
|
||||
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
|
||||
* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
|
||||
|
||||
The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events.
|
||||
|
||||
The `record` argument contains infomation about the actual press:
|
||||
The `record` argument contains information about the actual press:
|
||||
|
||||
```
|
||||
keyrecord_t record {
|
||||
@ -96,7 +98,7 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
|
||||
* `USB_LED_COMPOSE`
|
||||
* `USB_LED_KANA`
|
||||
|
||||
### Example `led_set_kb()` implementation
|
||||
### Example `led_set_kb()` Implementation
|
||||
|
||||
```
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
@ -128,16 +130,16 @@ void led_set_kb(uint8_t usb_led) {
|
||||
}
|
||||
```
|
||||
|
||||
### `led_set_*` Function documentation
|
||||
### `led_set_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
|
||||
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
|
||||
* Keymap: `void led_set_user(uint8_t usb_led)`
|
||||
|
||||
# Matrix Initialization Code
|
||||
|
||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
||||
|
||||
### Example `matrix_init_kb()` implementation
|
||||
### Example `matrix_init_kb()` Implementation
|
||||
|
||||
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
|
||||
|
||||
@ -153,20 +155,20 @@ void matrix_init_kb(void) {
|
||||
}
|
||||
```
|
||||
|
||||
### `matrix_init_*` Function documentation
|
||||
### `matrix_init_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void matrix_init_kb(void)`
|
||||
* Keyboard/Revision: `void matrix_init_kb(void)`
|
||||
* Keymap: `void matrix_init_user(void)`
|
||||
|
||||
# Matrix Scanning Code
|
||||
|
||||
Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second.
|
||||
|
||||
### Example `matrix_scan_*` implementation
|
||||
### Example `matrix_scan_*` Implementation
|
||||
|
||||
This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware).
|
||||
|
||||
### `matrix_scan_*` Function documentation
|
||||
### `matrix_scan_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void matrix_scan_kb(void)`
|
||||
* Keymap: `void matrix_scan_user(void)`
|
||||
|
@ -4,7 +4,7 @@ This page exists to document best practices when writing documentation for QMK.
|
||||
|
||||
# Page Opening
|
||||
|
||||
Your documentation page should generally start with an H1 heading, followed by a 1 paragrah description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace.
|
||||
Your documentation page should generally start with an H1 heading, followed by a 1 paragraph description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace.
|
||||
|
||||
Example:
|
||||
|
||||
@ -78,7 +78,7 @@ What about an error message?
|
||||
|
||||
# Documenting Features
|
||||
|
||||
If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentances describing your feature and a table listing any relevant keycodes is enough. Here is a basic template:
|
||||
If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentences describing your feature and a table listing any relevant keycodes is enough. Here is a basic template:
|
||||
|
||||
```markdown
|
||||
# My Cool Feature
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Setting Up Eclipse for QMK Development
|
||||
# Setting up Eclipse for QMK Development
|
||||
|
||||
[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
|
||||
|
||||
@ -16,16 +16,16 @@ The purpose of the is page is to document how to set-up Eclipse for developing A
|
||||
Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
|
||||
|
||||
# Prerequisites
|
||||
## Build environment
|
||||
## Build Environment
|
||||
Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
|
||||
|
||||
## Java
|
||||
Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
|
||||
|
||||
# Install Eclipse and its plugins
|
||||
# Install Eclipse and Its Plugins
|
||||
Eclipse comes in [several flavours](http://www.eclipse.org/downloads/eclipse-packages/) depending on the target usage that you will have. There is no package comprising the AVR stack, so we will need to start from Eclipse CDT (C/C++ Development Tooling) and install the necessary plugins.
|
||||
|
||||
## Download and install Eclipse CDT
|
||||
## Download and Install Eclipse CDT
|
||||
If you already have Eclipse CDT on your system, you can skip this step. However it is advised to keep it up-to-date for better support.
|
||||
|
||||
If you have another Eclipse package installed, it is normally possible to [install the CDT plugin over it](https://eclipse.org/cdt/downloads.php). However it is probably better to reinstall it from scratch to keep it light and avoid the clutter of tools that you don't need for the projects you will be working on.
|
||||
@ -41,10 +41,10 @@ When you are prompted with the Workspace Selector, select a directory that will
|
||||
|
||||
Once started, click the <kbd>Workbench</kbd> button at the top right to switch to the workbench view (there is a also checkbox at the bottom to skip the welcome screen at startup).
|
||||
|
||||
## Install the necessary plugins
|
||||
## Install the Necessary Plugins
|
||||
Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed.
|
||||
|
||||
### [The AVR plugin](http://avr-eclipse.sourceforge.net/)
|
||||
### [The AVR Plugin](http://avr-eclipse.sourceforge.net/)
|
||||
This is the most important plugin as it will allow Eclipse to _understand_ AVR C code. Follow [the instructions for using the update site](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site), and agree with the security warning for unsigned content.
|
||||
|
||||
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
|
||||
@ -58,7 +58,7 @@ This plugin is necessary to properly display the colored build output generated
|
||||
Once both plugins are installed, restart Eclipse as prompted.
|
||||
|
||||
# Configure Eclipse for QMK
|
||||
## Importing the project
|
||||
## Importing the Project
|
||||
1. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
|
||||
2. On the next screen:
|
||||
* Select the directory where you cloned the repository as _Existing Code Location_;
|
||||
@ -72,7 +72,7 @@ Once both plugins are installed, restart Eclipse as prompted.
|
||||
|
||||
¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
|
||||
|
||||
## Build your keyboard
|
||||
## Build Your Keyboard
|
||||
We will now configure a make target that cleans the project and builds the keymap of your choice.
|
||||
|
||||
1. On the right side of the screen, select the <kbd>Make Target</kbd> tab
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides.
|
||||
|
||||
## Can't program on Linux
|
||||
## Can't Program on Linux
|
||||
You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
|
||||
|
||||
In short when your controller is ATMega32u4,
|
||||
|
||||
|
||||
$ sudo dfu-programmer atmega32u4 erase --force
|
||||
$ sudo dfu-programmer atmega32u4 flash your.hex
|
||||
$ sudo dfu-programmer atmega32u4 reset
|
||||
@ -17,7 +17,7 @@ or just
|
||||
|
||||
But to run `make` with root privilege is not good idea. Use former method if possible.
|
||||
|
||||
## WINAVR is obsolete
|
||||
## WINAVR is Obsolete
|
||||
It is no longer recommended and may cause some problem.
|
||||
See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
|
||||
|
||||
@ -33,7 +33,7 @@ You can buy a really unique VID:PID here. I don't think you need this for person
|
||||
- http://www.obdev.at/products/vusb/license.html
|
||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||
|
||||
## Linux udev rules
|
||||
## Linux `udev` Rules
|
||||
On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`.
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
@ -53,7 +53,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
||||
```
|
||||
|
||||
|
||||
## Cortex: cstddef: No such file or directory
|
||||
## Cortex: `cstddef: No such file or directory`
|
||||
GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
|
||||
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
|
||||
|
||||
@ -62,7 +62,7 @@ https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstdd
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
|
||||
## `clock_prescale_set` and `clock_div_1` not available
|
||||
## `clock_prescale_set` and `clock_div_1` Not Available
|
||||
Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
|
||||
|
||||
```
|
||||
@ -81,11 +81,11 @@ make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
|
||||
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
|
||||
|
||||
```
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 2048
|
||||
# Atmel DFU loader 4096 (TMK Alt Controller)
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
||||
```
|
||||
|
@ -4,14 +4,14 @@ This page details various common questions people have about troubleshooting the
|
||||
|
||||
# Debug Console
|
||||
|
||||
## hid_listen can't recognize device
|
||||
## `hid_listen` Can't Recognize Device
|
||||
When debug console of your device is not ready you will see like this:
|
||||
|
||||
```
|
||||
Waiting for device:.........
|
||||
```
|
||||
|
||||
once the device is pluged in then *hid_listen* finds it you will get this message:
|
||||
once the device is plugged in then *hid_listen* finds it you will get this message:
|
||||
|
||||
```
|
||||
Waiting for new device:.........................
|
||||
@ -23,7 +23,7 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes
|
||||
You may need privilege to access the device on OS like Linux.
|
||||
- try `sudo hid_listen`
|
||||
|
||||
## Can't get message on console
|
||||
## Can't Get Message on Console
|
||||
Check:
|
||||
- *hid_listen* finds your device. See above.
|
||||
- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
|
||||
@ -31,7 +31,7 @@ Check:
|
||||
- try using 'print' function instead of debug print. See **common/print.h**.
|
||||
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
||||
|
||||
## Linux or UNIX like system requires Super User privilege
|
||||
## Linux or UNIX Like System Requires Super User Privilege
|
||||
Just use 'sudo' to execute *hid_listen* with privilege.
|
||||
```
|
||||
$ sudo hid_listen
|
||||
@ -82,46 +82,46 @@ Size after:
|
||||
consume extra memory; watch out for BOOTMAGIC_ENABLE,
|
||||
MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
|
||||
- DFU tools do /not/ allow you to write into the bootloader (unless
|
||||
you throw in extra fruitsalad of options), so there is little risk
|
||||
you throw in extra fruit salad of options), so there is little risk
|
||||
there.
|
||||
- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
|
||||
firmware repeatedly and continually; that'll burn the EEPROM
|
||||
eventually.
|
||||
## NKRO Doesn't work
|
||||
First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
|
||||
First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**.
|
||||
|
||||
Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
|
||||
|
||||
If your firmware built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
|
||||
If your firmware built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and kept over power cycles.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
|
||||
|
||||
|
||||
## TrackPoint needs reset circuit(PS/2 mouse support)
|
||||
Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
|
||||
## TrackPoint Needs Reset Circuit (PS/2 Mouse Support)
|
||||
Without reset circuit you will have inconsistent result due to improper initialize of the hardware. See circuit schematic of TPM754.
|
||||
|
||||
- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
|
||||
- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
|
||||
|
||||
|
||||
## Can't read column of matrix beyond 16
|
||||
## Can't Read Column of Matrix Beyond 16
|
||||
Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
|
||||
|
||||
In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
|
||||
In C `1` means one of [int] type which is [16 bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
|
||||
|
||||
http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
|
||||
|
||||
|
||||
## Bootloader jump doesn't work
|
||||
## Bootloader Jump Doesn't Work
|
||||
Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
|
||||
```
|
||||
# Size of Bootloaders in bytes:
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Atmel DFU loader(ATmega32U4) 4096
|
||||
# Atmel DFU loader(AT90USB128) 8192
|
||||
# LUFA bootloader(ATmega32U4) 4096
|
||||
# Arduino Caterina(ATmega32U4) 4096
|
||||
# USBaspLoader(ATmega***) 2048
|
||||
# Teensy halfKay(ATmega32U4) 512
|
||||
# Teensy++ halfKay(AT90USB128) 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
```
|
||||
@ -135,14 +135,14 @@ byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
|
||||
| | | |
|
||||
| | | |
|
||||
| Application | | Application |
|
||||
| | | |
|
||||
| | | |
|
||||
= = = =
|
||||
| | 32KB-4KB | | 128KB-8KB
|
||||
0x6000 +---------------+ 0x1E000 +---------------+
|
||||
| Bootloader | 4KB | Bootloader | 8KB
|
||||
0x7FFF +---------------+ 0x1FFFF +---------------+
|
||||
|
||||
|
||||
|
||||
byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
0x0000 +---------------+ 0x00000 +---------------+
|
||||
| | | |
|
||||
@ -161,14 +161,14 @@ https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra key doesn't work(System, Audio control keys)
|
||||
## Special Extra Key Doesn't Work (System, Audio Control Keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
||||
```
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
```
|
||||
|
||||
## Wakeup from sleep doesn't work
|
||||
## Wakeup from Sleep Doesn't Work
|
||||
|
||||
In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
|
||||
|
||||
@ -181,11 +181,11 @@ Pressing any key during sleep should wake host.
|
||||
- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
|
||||
- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
|
||||
|
||||
Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||
Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
|
||||
|
||||
|
||||
## Using PF4-7 pins of USB AVR?
|
||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
|
||||
## Using PF4-7 Pins of USB AVR?
|
||||
You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affected with this.
|
||||
|
||||
If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
|
||||
|
||||
@ -200,7 +200,7 @@ https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
|
||||
And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
|
||||
|
||||
|
||||
## Adding LED indicators of Lock keys
|
||||
## Adding LED Indicators of Lock Keys
|
||||
You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
|
||||
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
|
||||
@ -218,26 +218,26 @@ http://arduino.cc/en/Main/ArduinoBoardMicro
|
||||
https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
|
||||
|
||||
|
||||
## USB 3 compatibility
|
||||
## USB 3 Compatibility
|
||||
I heard some people have a problem with USB 3 port, try USB 2 port.
|
||||
|
||||
|
||||
## Mac compatibility
|
||||
## Mac Compatibility
|
||||
### OS X 10.11 and Hub
|
||||
https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
||||
|
||||
|
||||
## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
|
||||
## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
|
||||
Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
|
||||
|
||||
As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
|
||||
As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
|
||||
|
||||
https://github.com/tmk/tmk_keyboard/issues/266
|
||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||
|
||||
|
||||
|
||||
## FLIP doesn't work
|
||||
### AtLibUsbDfu.dll not found
|
||||
## FLIP Doesn't Work
|
||||
### `AtLibUsbDfu.dll` Not Found
|
||||
Remove current driver and reinstall one FLIP provides from DeviceManager.
|
||||
http://imgur.com/a/bnwzy
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
|
||||
|
||||
### Why the name Quantum?
|
||||
### Why the Name Quantum?
|
||||
|
||||
<!-- FIXME -->
|
||||
|
||||
@ -17,4 +17,3 @@ From a technical standpoint QMK builds upon TMK by adding several new features.
|
||||
From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
|
||||
|
||||
Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
|
||||
|
||||
|
@ -7,7 +7,7 @@ See [Keycodes](keycodes.md) for an index of keycodes available to you. These lin
|
||||
|
||||
Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
|
||||
|
||||
## What Are The Default Keycodes?
|
||||
## What Are the Default Keycodes?
|
||||
|
||||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
@ -18,25 +18,25 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
|
||||
|
||||
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
|
||||
|
||||
## `KC_SYSREQ` isn't working
|
||||
## `KC_SYSREQ` Isn't Working
|
||||
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
|
||||
|
||||
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
|
||||
- http://en.wikipedia.org/wiki/Magic_SysRq_key
|
||||
- http://en.wikipedia.org/wiki/System_request
|
||||
|
||||
## Power key doesn't work
|
||||
## Power Key Doesn't Work
|
||||
Use `KC_PWR` instead of `KC_POWER` or vice versa.
|
||||
- `KC_PWR` works with Windows and Linux, not with OSX.
|
||||
- `KC_POWER` works with OSX and Linux, not with Windows.
|
||||
|
||||
More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
|
||||
|
||||
## Oneshot modifier
|
||||
Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me.
|
||||
## One Shot Modifier
|
||||
Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. One Shot Shift mitigates this for me.
|
||||
https://github.com/tmk/tmk_keyboard/issues/67
|
||||
|
||||
## Modifier/Layer stuck
|
||||
## Modifier/Layer Stuck
|
||||
Modifier keys or layers can be stuck unless layer switching is configured properly.
|
||||
For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
|
||||
|
||||
@ -48,7 +48,7 @@ For Modifier keys and layer actions you have to place `KC_TRANS` on same positio
|
||||
## Mechanical Lock Switch Support
|
||||
|
||||
This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`:
|
||||
|
||||
|
||||
```
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
@ -58,7 +58,7 @@ After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in y
|
||||
|
||||
Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.***
|
||||
|
||||
## Input special charactors other than ASCII like Cédille 'Ç'
|
||||
## Input Special Characters Other Than ASCII like Cédille 'Ç'
|
||||
NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
|
||||
|
||||
See this post for example **MACRO** code.
|
||||
@ -79,7 +79,7 @@ And see this for **Unicode** input.
|
||||
- http://en.wikipedia.org/wiki/Unicode_input
|
||||
|
||||
|
||||
## Apple/Mac keyboard Fn
|
||||
## Apple/Mac Keyboard `Fn`
|
||||
Not supported.
|
||||
|
||||
Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards.
|
||||
@ -88,13 +88,13 @@ I think you can send Apple Fn key using Apple venter specific Page 0xff01 and us
|
||||
https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h
|
||||
|
||||
|
||||
## Media control keys in Mac OSX
|
||||
#### KC_MNXT and KC_MPRV does not work on Mac
|
||||
## Media Control Keys in Mac OSX
|
||||
#### KC_MNXT and KC_MPRV Does Not Work on Mac
|
||||
Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
|
||||
See https://github.com/tmk/tmk_keyboard/issues/195
|
||||
|
||||
|
||||
## Keys supported in Mac OSX?
|
||||
## Keys Supported in Mac OSX?
|
||||
You can know which keycodes are supported in OSX from this source code.
|
||||
|
||||
`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes).
|
||||
@ -106,7 +106,7 @@ And `IOHIDConsumer::dispatchConsumerEvent` handles Consumer page usages.
|
||||
https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
|
||||
|
||||
|
||||
## JIS keys in Mac OSX
|
||||
## JIS Keys in Mac OSX
|
||||
Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options.
|
||||
|
||||
* Enable NFER Key on PC keyboard
|
||||
@ -116,21 +116,21 @@ Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`
|
||||
https://pqrs.org/osx/karabiner/seil.html
|
||||
|
||||
|
||||
## RN-42 Bluetooth doesn't work with Karabiner
|
||||
## RN-42 Bluetooth Doesn't Work with Karabiner
|
||||
Karabiner - Keymapping tool on Mac OSX - ignores inputs from RN-42 module by default. You have to enable this option to make Karabiner working with your keyboard.
|
||||
https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
|
||||
|
||||
See these for the deail of this problem.
|
||||
See these for the detail of this problem.
|
||||
https://github.com/tmk/tmk_keyboard/issues/213
|
||||
https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
|
||||
## Esc and `~ on a single key
|
||||
## Esc and <code>`</code> on a Single Key
|
||||
|
||||
See the [Grave Escape](feature_grave_escape.md) feature.
|
||||
See the [Grave Escape](feature_grave_esc.md) feature.
|
||||
|
||||
## Arrow on Right Modifier keys with Dual-Role
|
||||
This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
## Arrow on Right Modifier Keys with Dual-Role
|
||||
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
```
|
||||
|
||||
#include "keymap_common.h"
|
||||
@ -181,18 +181,18 @@ It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mappin
|
||||
Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably.
|
||||
|
||||
|
||||
## What's weak_mods and real_mods in action_util.c
|
||||
## What's `weak_mods` and `real_mods` in `action_util.c`
|
||||
___TO BE IMPROVED___
|
||||
|
||||
real_mods is intended to retains state of real/physical modifier key state, while
|
||||
weak_mods retains state of virtual or temprary modifiers which should not affect state real modifier key.
|
||||
weak_mods retains state of virtual or temporary modifiers which should not affect state real modifier key.
|
||||
|
||||
Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
|
||||
Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
|
||||
|
||||
with weak_mods,
|
||||
* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
|
||||
* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT)
|
||||
* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): waek_mods &= ~MOD_BIT(LSHIFT)
|
||||
* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT)
|
||||
real_mods still keeps modifier state.
|
||||
|
||||
without weak mods,
|
||||
@ -204,7 +204,7 @@ here real_mods lost state for 'physical left shift'.
|
||||
weak_mods is ORed with real_mods when keyboard report is sent.
|
||||
https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
|
||||
|
||||
## Timer functionality
|
||||
## Timer Functionality
|
||||
|
||||
It's possible to start timers and read values for time-specific events - here's an example:
|
||||
|
||||
|
@ -13,11 +13,11 @@ People often define custom names using `#define`. For example:
|
||||
|
||||
This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
|
||||
|
||||
### Limits of these aliases
|
||||
### Limits of These Aliases
|
||||
|
||||
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.md).
|
||||
|
||||
# Switching and toggling layers
|
||||
# Switching and Toggling Layers
|
||||
|
||||
These functions allow you to activate layers in various ways.
|
||||
|
||||
@ -27,7 +27,7 @@ These functions allow you to activate layers in various ways.
|
||||
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
|
||||
|
||||
# Working With Layers
|
||||
# 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.
|
||||
|
||||
@ -41,7 +41,7 @@ If you are just getting started with QMK you will want to keep everything simple
|
||||
|
||||
### 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.
|
||||
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
|
||||
|
||||
@ -51,7 +51,7 @@ Layers stack on top of each other in numerical order. When determining what a ke
|
||||
|
||||
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](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier keys
|
||||
# Modifier Keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
|
||||
@ -75,29 +75,29 @@ You can also chain these, like this:
|
||||
|
||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
| KC_TILD | ~ |
|
||||
| KC_EXLM | ! |
|
||||
| KC_QUES | ? |
|
||||
| KC_AT | @ |
|
||||
| KC_HASH | # |
|
||||
| KC_DLR | $ |
|
||||
| KC_PERC | % |
|
||||
| KC_CIRC | ^ |
|
||||
| KC_AMPR | & |
|
||||
| KC_ASTR | * |
|
||||
| KC_LPRN | ( |
|
||||
| KC_RPRN | ) |
|
||||
| KC_UNDS | _ |
|
||||
| KC_PLUS | + |
|
||||
| KC_DQUO | " |
|
||||
| KC_LCBR | { |
|
||||
| KC_RCBR | } |
|
||||
| KC_LABK | < |
|
||||
| KC_RABK | > |
|
||||
| KC_PIPE | | |
|
||||
| KC_COLN | : |
|
||||
|Key |Aliases |Description |
|
||||
|------------------------|------------------|-------------------|
|
||||
|`KC_TILDE` |`KC_TILD` |`~` |
|
||||
|`KC_EXCLAIM` |`KC_EXLM` |`!` |
|
||||
|`KC_AT` | |`@` |
|
||||
|`KC_HASH` | |`#` |
|
||||
|`KC_DOLLAR` |`KC_DLR` |`$` |
|
||||
|`KC_PERCENT` |`KC_PERC` |`%` |
|
||||
|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` |
|
||||
|`KC_AMPERSAND` |`KC_AMPR` |`&` |
|
||||
|`KC_ASTERISK` |`KC_ASTR` |`*` |
|
||||
|`KC_LEFT_PAREN` |`KC_LPRN` |`(` |
|
||||
|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` |
|
||||
|`KC_UNDERSCORE` |`KC_UNDS` |`_` |
|
||||
|`KC_PLUS` | |`+` |
|
||||
|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` |
|
||||
|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` |
|
||||
|`KC_PIPE` | |<code>|</code>|
|
||||
|`KC_COLON` |`KC_COLN` |`:` |
|
||||
|`KC_DOUBLE_QUOTE` |`KC_DQT`/`KC_DQUO`|`"` |
|
||||
|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<` |
|
||||
|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` |
|
||||
|`KC_QUESTION` |`KC_QUES` |`?` |
|
||||
|
||||
# Mod Tap
|
||||
|
||||
|
@ -47,9 +47,9 @@ PLAY_LOOP(my_song);
|
||||
|
||||
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
||||
|
||||
## Music mode
|
||||
## Music Mode
|
||||
|
||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||
|
||||
Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
|
||||
|
||||
@ -82,7 +82,7 @@ The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, a
|
||||
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
|
||||
## MIDI functionalty
|
||||
## MIDI Functionality
|
||||
|
||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Auto Shift: Why do we need a shift key?
|
||||
# Auto Shift: Why Do We Need a Shift Key?
|
||||
|
||||
Tap a key and you get its character. Tap a key, but hold it *slightly* longer
|
||||
and you get its shifted state. Viola! No shift key needed!
|
||||
@ -10,7 +10,7 @@ fingers repetitively long distances. For us on the keyboard, the pinky does that
|
||||
all too often when reaching for the shift key. Auto Shift looks to alleviate that
|
||||
problem.
|
||||
|
||||
## How does it work?
|
||||
## How Does It Work?
|
||||
|
||||
When you tap a key, it stays depressed for a short period of time before it is
|
||||
then released. This depressed time is a different length for everyone. Auto Shift
|
||||
@ -20,7 +20,7 @@ when you release the key. If the time depressed is greater than or equal to the
|
||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
||||
|
||||
## Are there limitations to Auto Shift?
|
||||
## Are There Limitations to Auto Shift?
|
||||
|
||||
Yes, unfortunately.
|
||||
|
||||
@ -38,7 +38,7 @@ Yes, unfortunately.
|
||||
tapping the keys, but really we have held it for a little longer than
|
||||
anticipated.
|
||||
|
||||
## How do I enable Auto Shift?
|
||||
## How Do I Enable Auto Shift?
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
@ -66,7 +66,7 @@ A sample is
|
||||
|
||||
#endif
|
||||
|
||||
### AUTO_SHIFT_TIMEOUT (value in ms)
|
||||
### AUTO_SHIFT_TIMEOUT (Value in ms)
|
||||
|
||||
This controls how long you have to hold a key before you get the shifted state.
|
||||
Obviously, this is different for everyone. For the common person, a setting of
|
||||
@ -75,7 +75,7 @@ is the default value. Then work down from there. The idea is to have the shortes
|
||||
|
||||
Play with this value until things are perfect. Many find that all will work well
|
||||
at a given value, but one or two keys will still emit the shifted state on
|
||||
occassion. This is simply due to habit and holding some keys a little longer
|
||||
occasion. This is simply due to habit and holding some keys a little longer
|
||||
than others. Once you find this value, work on tapping your problem keys a little
|
||||
quicker than normal and you will be set.
|
||||
|
||||
@ -86,7 +86,7 @@ quick. See "Auto Shift Setup" for more details!
|
||||
|
||||
### NO_AUTO_SHIFT_SPECIAL (simple define)
|
||||
|
||||
Do not Auto Shift special keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>,
|
||||
Do not Auto Shift special keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
|
||||
and /?
|
||||
|
||||
### NO_AUTO_SHIFT_NUMERIC (simple define)
|
||||
@ -99,7 +99,7 @@ Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
This will enable you to define three keys temporailiy to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
|
||||
### Setup
|
||||
|
||||
@ -110,6 +110,9 @@ Map three keys temporarily in your keymap:
|
||||
| KC_ASDN | Lower the Auto Shift timeout variable (down) |
|
||||
| KC_ASUP | Raise the Auto Shift timeout variable (up) |
|
||||
| KC_ASRP | Report your current Auto Shift timeout value |
|
||||
| KC_ASON | Turns on the Auto Shift Function |
|
||||
| KC_ASOFF | Turns off the Auto Shift Function |
|
||||
| KC_ASTG | Toggles the statn of the Auto Shift feature |
|
||||
|
||||
Compile and upload your new firmware.
|
||||
|
||||
@ -134,7 +137,7 @@ completely normal and with no intention of shifted keys.
|
||||
9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`.
|
||||
10. Compile and upload your new firmware.
|
||||
|
||||
#### An example run
|
||||
#### An Example Run
|
||||
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
@ -155,4 +158,4 @@ completely normal and with no intention of shifted keys.
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
||||
in the testing and you'll be golden.
|
||||
in the testing and you'll be golden.
|
||||
|
@ -6,12 +6,34 @@
|
||||
|
||||
These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`BL_x`|Set a specific backlight level between 0-9|
|
||||
|`BL_ON`|An alias for `BL_9`|
|
||||
|`BL_OFF`|An alias for `BL_0`|
|
||||
|`BL_DEC`|Turn the backlight level down by 1|
|
||||
|`BL_INC`|Turn the backlight level up by 1|
|
||||
|`BL_TOGG`|Toggle the backlight on or off|
|
||||
|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.|
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set backlight to max brightness |
|
||||
|`BL_OFF` |Turn backlight off |
|
||||
|`BL_INC` |Increase backlight level |
|
||||
|`BL_DEC` |Decrease backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h.
|
||||
|
||||
## Configuration Options in `config.h`
|
||||
|
||||
* `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this.
|
||||
* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (excluding OFF).
|
||||
* `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7.
|
||||
* `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds.
|
||||
|
||||
## Notes on Implementation
|
||||
|
||||
To change the brightness when using pins B5, B6 or B7, the PWM (Pulse Width Modulation) functionality of the on-chip timer is used.
|
||||
The timer is a counter that counts up to a certain TOP value (`0xFFFF` set in ICR1) before resetting to 0.
|
||||
We also set an OCR1x register.
|
||||
When the counter reaches the value stored in that register, the PWM pin drops to low.
|
||||
The PWM pin is pulled high again when the counter resets to 0.
|
||||
Therefore, OCR1x basically sets the duty cycle of the LEDs and as such the brightness where `0` is the darkest and `0xFFFF` the brightest setting.
|
||||
|
||||
To enable the breathing effect, we register an interrupt handler to be called whenever the counter resets (with `ISR(TIMER1_OVF_vect)`).
|
||||
In this handler, which gets called roughly 244 times per second, we compute the desired brightness using a precomputed brightness curve.
|
||||
To disable breathing, we can just disable the respective interrupt vector and reset the brightness to the desired level.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Bluetooth
|
||||
|
||||
## Bluetooth functionality
|
||||
## Bluetooth Functionality
|
||||
|
||||
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
|
||||
|
||||
@ -10,8 +10,8 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar
|
||||
|
||||
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`OUT_AUTO`|auto mode|
|
||||
|`OUT_USB`|usb only|
|
||||
|`OUT_BT`|bluetooth|
|
||||
|Name |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
||||
|
@ -6,24 +6,24 @@
|
||||
|
||||
Shortcuts for bootmagic options. You can use these even when bootmagic is off.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control|
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key|
|
||||
|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys|
|
||||
|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys|
|
||||
|`MAGIC_NO_GUI`|Disable the GUI key|
|
||||
|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.|
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslash and backspace|
|
||||
|`MAGIC_HOST_NKRO`|Force NKRO on|
|
||||
|`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`|Swap Alt and Gui on both sides|
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK`|Disable the Control/Capslock swap|
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching|
|
||||
|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching|
|
||||
|`MAGIC_UNNO_GUI`|Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap |
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap|
|
||||
|`MAGIC_UNHOST_NKRO`|Force NKRO off|
|
||||
|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching|
|
||||
|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off|
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Dynamic macros: record and replay macros in runtime
|
||||
# Dynamic Macros: Record and Replay Macros in Runtime
|
||||
|
||||
QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
|
||||
@ -52,7 +52,7 @@ For users of the earlier versions of dynamic macros: It is still possible to fin
|
||||
|
||||
```c
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
|
||||
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Grave Escape
|
||||
|
||||
Grave Escape is a feature that allows you to share the grave key (`\`` and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`.
|
||||
Grave Escape is a feature that allows you to share the grave key (<code>`</code> and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`.
|
||||
|
||||
|
||||
| Key | Alias | Description |
|
||||
|-----|-------|-------------|
|
||||
| `GRAVE_ESC` | `KC_GESC` | Act as `KC_ESC` normally, or `KC_GRAVE` when GUI or Shift are held. |
|
||||
|Key |Aliases |Description |
|
||||
|---------|-----------|------------------------------------------------------------------|
|
||||
|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, <code>`</code> when Shift or GUI are held|
|
||||
|
||||
There are several possible key combinations this will break, among them Ctrl+Shift+Esc on Windows and Cmd+Opt+Esc on macOS. You can use these options in your `config.h` to work around this:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
## Key Lock: Holding down keys for you
|
||||
## Key Lock: Holding Down Keys for You
|
||||
|
||||
Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Layouts: Using a keymap with multiple keyboards
|
||||
# Layouts: Using a Keymap with Multiple Keyboards
|
||||
|
||||
The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
|
||||
The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
|
||||
|
||||
```
|
||||
layouts/
|
||||
@ -21,7 +21,7 @@ layouts/
|
||||
| + ...
|
||||
```
|
||||
|
||||
The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple reposistories here.
|
||||
The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.
|
||||
|
||||
Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:
|
||||
|
||||
@ -33,9 +33,9 @@ Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layo
|
||||
|
||||
New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue.
|
||||
|
||||
## Supporting a layout
|
||||
## Supporting a Layout
|
||||
|
||||
For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferrably the physical layout):
|
||||
For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
|
||||
@ -49,7 +49,7 @@ The folder name must be added to the keyboard's `rules.mk`:
|
||||
|
||||
but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
## Tips for making layouts keyboard-agnostic
|
||||
## Tips for Making Layouts Keyboard-Agnostic
|
||||
|
||||
Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# The Leader key: A new kind of modifier
|
||||
# The Leader Key: A New Kind of Modifier
|
||||
|
||||
If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
|
||||
|
||||
@ -34,4 +34,4 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
|
||||
As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Macros
|
||||
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
|
||||
{% hint style='danger' %}
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets ahold of your keyboard will be able to access that information by opening a text editor.
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor.
|
||||
{% endhint %}
|
||||
|
||||
## The new way: `SEND_STRING()` & `process_record_user`
|
||||
## The New Way: `SEND_STRING()` & `process_record_user`
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`).
|
||||
|
||||
@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
### TAP, DOWN and UP
|
||||
|
||||
You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`.
|
||||
You can send arbitary keycodes by wrapping them in:
|
||||
You can send arbitrary keycodes by wrapping them in:
|
||||
|
||||
* `SS_TAP()` presses and releases a key.
|
||||
* `SS_DOWN()` presses (but does not release) a key.
|
||||
@ -105,13 +105,13 @@ They can be used like this:
|
||||
|
||||
Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
|
||||
|
||||
### Alternative keymaps
|
||||
### Alternative Keymaps
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
#include <sendstring_colemak.h>
|
||||
|
||||
### Strings in memory
|
||||
### Strings in Memory
|
||||
|
||||
If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this:
|
||||
|
||||
@ -129,7 +129,7 @@ send_string(my_str);
|
||||
SEND_STRING(".."SS_TAP(X_END));
|
||||
```
|
||||
|
||||
## The old way: `MACRO()` & `action_get_macro`
|
||||
## The Old Way: `MACRO()` & `action_get_macro`
|
||||
|
||||
{% hint style='info' %}
|
||||
This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
|
||||
@ -166,7 +166,7 @@ A macro can include the following commands:
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
### Mapping a Macro to a key
|
||||
### Mapping a Macro to a Key
|
||||
|
||||
Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
@ -192,7 +192,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
### Naming your macros
|
||||
### Naming Your Macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
@ -207,7 +207,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
```
|
||||
|
||||
## Advanced macro functions
|
||||
## Advanced Macro Functions
|
||||
|
||||
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||
|
||||
@ -243,9 +243,9 @@ This will clear all mods currently pressed.
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
## Advanced Example: Single-key copy/paste
|
||||
## Advanced Example: Single-Key Copy/Paste
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
@ -262,5 +262,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
|
||||
|
||||
## Adding Mousekeys To a Keymap
|
||||
## Adding Mousekeys to a Keymap
|
||||
|
||||
There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard.
|
||||
|
||||
### Adding Mousekeys support in the `Makefile`
|
||||
### Adding Mousekeys Support in the `Makefile`
|
||||
|
||||
To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`:
|
||||
|
||||
@ -17,34 +17,34 @@ MOUSEKEY_ENABLE = yes
|
||||
|
||||
You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile
|
||||
|
||||
### Mapping Mouse Actions To Keyboard Keys
|
||||
### Mapping Mouse Actions to Keyboard Keys
|
||||
|
||||
You can use these keycodes within your keymap to map button presses to mouse actions:
|
||||
|
||||
|Long Name|Short Name|Description|
|
||||
|---------|----------|-----------|
|
||||
|KC_MS_UP|KC_MS_U|Mouse Cursor Up|
|
||||
|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down|
|
||||
|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left|
|
||||
|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right|
|
||||
|KC_MS_BTN1|KC_BTN1|Mouse Button 1|
|
||||
|KC_MS_BTN2|KC_BTN2|Mouse Button 2|
|
||||
|KC_MS_BTN3|KC_BTN3|Mouse Button 3|
|
||||
|KC_MS_BTN4|KC_BTN4|Mouse Button 4|
|
||||
|KC_MS_BTN5|KC_BTN5|Mouse Button 5|
|
||||
|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up|
|
||||
|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down|
|
||||
|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left|
|
||||
|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right|
|
||||
|KC_MS_ACCEL0|KC_ACL0|Set Mouse Acceleration Speed to 0|
|
||||
|KC_MS_ACCEL1|KC_ACL1|Set Mouse Acceleration Speed to 1|
|
||||
|KC_MS_ACCEL2|KC_ACL2|Set Mouse Acceleration Speed to 2|
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46
|
||||
|
||||
## Configuring the behavior of Mousekeys
|
||||
## Configuring the Behavior of Mousekeys
|
||||
|
||||
The default speed for controlling the mouse with the keyboard is intentionaly slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in miliseconds (ms).
|
||||
The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
|
||||
|
||||
```
|
||||
#define MOUSEKEY_DELAY 300
|
||||
@ -78,4 +78,4 @@ The top speed for scrolling movements.
|
||||
|
||||
### `MOUSEKEY_WHEEL_TIME_TO_MAX`
|
||||
|
||||
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickling your scrolling will accelerate.
|
||||
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Pointing Device
|
||||
|
||||
Pointing Device is a generic name for a feature intended to be generic: moving the system pointer arround. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you.
|
||||
Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you.
|
||||
|
||||
To enable Pointing Device, uncomment the following line in your rules.mk:
|
||||
|
||||
@ -44,4 +44,4 @@ case MS_SPECIAL:
|
||||
break;
|
||||
```
|
||||
|
||||
Recall that the mouse report is set to zero (except the buttons) whenever it is sent, so the scrolling would only occur once in each case.
|
||||
Recall that the mouse report is set to zero (except the buttons) whenever it is sent, so the scrolling would only occur once in each case.
|
||||
|
@ -6,7 +6,7 @@ To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest fr
|
||||
|
||||
There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
|
||||
|
||||
### Busywait version
|
||||
### Busywait Version
|
||||
|
||||
Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
|
||||
|
||||
@ -32,7 +32,7 @@ In your keyboard config.h:
|
||||
#endif
|
||||
```
|
||||
|
||||
### Interrupt version
|
||||
### Interrupt Version
|
||||
|
||||
The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
|
||||
|
||||
@ -70,7 +70,7 @@ In your keyboard config.h:
|
||||
#endif
|
||||
```
|
||||
|
||||
### USART version
|
||||
### USART Version
|
||||
|
||||
To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
|
||||
|
||||
@ -129,13 +129,13 @@ In your keyboard config.h:
|
||||
|
||||
### Additional Settings
|
||||
|
||||
#### PS/2 mouse features
|
||||
#### PS/2 Mouse Features
|
||||
|
||||
These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
|
||||
|
||||
```
|
||||
/* Use remote mode instead of the default stream mode (see link) */
|
||||
#define PS2_MOUSE_USE_REMOTE_MODE
|
||||
#define PS2_MOUSE_USE_REMOTE_MODE
|
||||
|
||||
/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
|
||||
#define PS2_MOUSE_ENABLE_SCROLLING
|
||||
@ -170,7 +170,7 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
|
||||
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
|
||||
```
|
||||
|
||||
#### Fine control
|
||||
#### Fine Control
|
||||
|
||||
Use the following defines to change the sensitivity and speed of the mouse.
|
||||
Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
|
||||
@ -181,7 +181,7 @@ Note: you can also use `ps2_mouse_set_resolution` for the same effect (not suppo
|
||||
#define PS2_MOUSE_V_MULTIPLIER 1
|
||||
```
|
||||
|
||||
#### Scroll button
|
||||
#### Scroll Button
|
||||
|
||||
If you're using a trackpoint, you will likely want to be able to use it for scrolling.
|
||||
Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
|
||||
@ -227,7 +227,7 @@ Fine control over the scrolling is supported with the following defines:
|
||||
#define PS2_MOUSE_SCROLL_DIVISOR_V 2
|
||||
```
|
||||
|
||||
#### Invert mouse and scroll axes
|
||||
#### Invert Mouse and Scroll Axes
|
||||
|
||||
To invert the X and Y axes you can put:
|
||||
|
||||
@ -247,7 +247,7 @@ To reverse the scroll axes you can put:
|
||||
|
||||
into config.h.
|
||||
|
||||
#### Debug settings
|
||||
#### Debug Settings
|
||||
|
||||
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user