aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/feature_auto_shift.md161
-rw-r--r--docs/understanding_qmk.md1
2 files changed, 162 insertions, 0 deletions
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
new file mode 100644
index 000000000..a054c3652
--- /dev/null
+++ b/docs/feature_auto_shift.md
@@ -0,0 +1,161 @@
1# Auto Shift: Why do we need a shift key?
2
3Tap a key and you get its character. Tap a key, but hold it *slightly* longer
4and you get its shifted state. Viola! No shift key needeed!
5
6## Why Auto Shift?
7
8Many people suffer from various forms of RSI. A common cause is stretching your
9fingers repeitively long distances. For us on the keyboard, the pinky does that
10all too often when reaching for the shift key. Auto Shift looks to aliviate that
11problem.
12
13## How does it work?
14
15When you tap a key, it stays depressed for a short period of time before it is
16then released. This depressed time is a different length everyone. Auto Shift
17defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your
18normal pressed state time. When you press a key, a timer starts and then stops
19when you release the key. If the time depressed is greater than or equal to the
20`AUTO_SHIFT_TIMEOUT` then a shifted version of the key is emitted. If the time
21is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
22
23## Are there limitations to Auto Shift?
24
25Yes, unfortunately.
26
271. Key repeat will cease to work. For example, before if you wanted 20 'a'
28 characters, you could press and hold the 'a' key for a second or two. This no
29 longer works with Auto Shift because it is timing your depressed time instead
30 of emitting a depressed key state to your operating system.
312. Auto Shift is disabled for any key press that is accompanied by one or more
32 modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
33 as Ctrl+Shift+A.
343. You will have characters that are shifted you did not intend on shifting, and
35 other characters you wanted shifted, but were not. This simply comes down to
36 practice. As we get in a hurry, we think we might have hit the key long enough
37 for a shifted version, but we did not. On the other hand, we may think we are
38 tapping the keys, but really we have held it for a little longer than
39 anticipated.
40
41## How do I enable Auto Shift?
42
43Add to your `rules.mk` in the keymap folder:
44
45 AUTO_SHIFT_ENABLE = YES
46
47If no `rules.mk` exists, you can create one.
48
49Then compile and install your new firmware with Auto Key enabled! That's it!
50
51## Configuring Auto Shift
52
53If desired, there is some configuration that can be done to change the
54behavior of Auto Shift. This is done by setting various variables the
55`config.h` file located in your keymap folder.
56
57If no `config.h` file exists, you can create one. A sample is
58
59 #ifndef CONFIG_USER_H
60 #define CONFIG_USER_H
61
62 #include "../../config.h"
63
64 #define AUTO_SHIFT_TIMEOUT 150
65 #define NO_AUTO_SHIFT_SPECIAL
66
67 #endif
68
69### AUTO_SHIFT_TIMEOUT (value in ms)
70
71This controls how long you have to hold a key before you get the shifted state.
72Obviously, this is different for everyone. For the common person a setting of
73135 to 150 works great but one should start with a value of at least 175, which
74is the default value. Then work down from there. The idea is to have as short
75of a time required to get the shifted state without having false positives.
76
77Play with this value until things are perfect. Many find that all will work well
78at a given value, but one or two keys will still emit the shifted state on
79occassion. This is simply due to habit and holding some keys a little longer
80than others. Once you find this value, work on tapping your problem keys a little
81quicker than normal and you will be set.
82
83{% hint style='info' %}
84Auto Shift has three special keys that can help you get this value right very
85quick. See "Auto Shift Setup" for more details!
86{% endhint %}
87
88### NO_AUTO_SHIFT_SPECIAL (simple define)
89
90Do not Auto Shift special keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>,
91and /?
92
93### NO_AUTO_SHIFT_NUMERIC (simple define)
94
95Do not Auto Shift numeric keys, zero through nine.
96
97### NO_AUTO_SHIFT_ALPHA (simple define)
98
99Do not Auto Shift alpha characters, which include A through Z.
100
101## Using Auto Shift Setup
102
103This will enable you to define three keys temporailiy to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
104
105### Setup
106
107Map three keys temporarily in your keymap:
108
109| Key Name | Description |
110|----------|-----------------------------------------------------|
111| KC_ASDN | Lower the Auto Shift timeout variable (down) |
112| KC_ASUP | Raise the Auto Shift timeout variable (up) |
113| KC_ASRP | Report your current Auto Shift timeout value |
114
115Compile and upload your new firmware.
116
117### Use
118
119It is important to note that during these tests, you should be typing
120completely normal and with no intention of shifted keys.
121
1221. Type multiple sentences of alphabetical letters.
1232. Observe any upper case letters.
1243. If there are none, press the key you have mapped to `KC_ASDN` to decrease
125 time Auto Shift timeout value and go back to step 1.
1264. If there are some upper case letters, decide if you need to work on tapping
127 those keys with less down time, or if you need to increase the timeout.
1285. If you decide to increase the timeout, press the key you have mapped to
129 `KC_ASUP` and go back to step 1.
1306. Once you are happy with your results, press the key you have mapped to
131 `KC_ASRP`. The keyboard will type by itself the value of your
132 `AUTO_SHIFT_TIMEOUT`.
1337. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported.
1348. Remove `AUTO_SHIFT_SETUP` from your `config.h`.
1359. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`.
13610. Compile and upload your new firmware.
137
138#### An example run
139
140\'\'\'
141hello world. my name is john doe. i am a computer programmer playing with
142keyboards right now.
143
144[PRESS KC_ASDN quite a few times]
145
146heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
147KEYboArDS RiGHT NOw.
148
149[PRESS KC_ASUP a few times]
150
151hello world. my name is john Doe. i am a computer programmer play with
152keyboarDs right now.
153
154[PRESS KC_ASRP]
155
156115
157\'\'\'
158
159The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
160value. You are now set! Practice on the *D* key a little bit that showed up
161in the testing and you'll be golden.
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 2ac4f3036..99c2306d6 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -147,6 +147,7 @@ The `process_record()` function itself is deceptively simple, but hidden within
147 * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22) 147 * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22)
148 * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91) 148 * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91)
149 * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77) 149 * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77)
150 * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47)
150 * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47) 151 * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47)
151 * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211) 152 * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211)
152 153