Skip to content

Commit

Permalink
Added initial key lock documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
333fred authored and jackhumbert committed Aug 8, 2017
1 parent 8e1be7c commit 5fc4a66
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [Mouse keys](mouse_keys.md)
* [Unicode](unicode.md)
* [Stenography](stenography.md)
* [Key Lock](key_lock.md)

* Reference
* [Glossary](glossary.md)
Expand Down
11 changes: 11 additions & 0 deletions docs/key_lock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 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.

Here's how to use it:

1. Pick a key on your keyboard. This will be the key lock key. Assign it the keycode `KC_LOCK`. This will be a single-action key: you won't be able to use it for anything else.
2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile.
3. That's it!

Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys. This does not include any of the QMK special functions, or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be.
4 changes: 4 additions & 0 deletions docs/make_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ This enables using the Quantum SYSEX API to send strings (somewhere?)

This consumes about 5390 bytes.

`KEY_LOCK_ENABLE`

This enables [key lock](key_lock.md). This consumes an additional 260 bytes.

## Customizing Makefile options on a per-keymap basis

If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
Expand Down
1 change: 1 addition & 0 deletions docs/quantum_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|`FUNC(n)`/`F(n)`|Call `fn_action(n)`|
|`M(n)`|to call macro n|
|`MACROTAP(n)`|to macro-tap n idk FIXME|
|`KC_LOCK`|The [lock key](key_lock.md)|

## Bootmagic Keycodes

Expand Down

0 comments on commit 5fc4a66

Please sign in to comment.