aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/keymap.md267
1 files changed, 137 insertions, 130 deletions
diff --git a/doc/keymap.md b/doc/keymap.md
index ca48c6e5a..77e615a3e 100644
--- a/doc/keymap.md
+++ b/doc/keymap.md
@@ -3,20 +3,20 @@ Keymap framework - how to define your keymap
3***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.*** 3***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.***
4 4
5## 0. Keymap and layers 5## 0. Keymap and layers
6**Keymap** is comprised of multiple layers of key layout, you can define **16** layers at most. 6**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most.
7**Layer** is an array of **keycodes** to define **actions** on each physical keys. 7**Layer** is an array of **keycodes** to define **actions** for each physical keys.
8respective layers can be validated simultaneously. Layers are indexed with 0 to 15 and higher layer has precedence. 8respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
9 9
10 Keymap with 16 Layers Layer: array of Keycodes 10 Keymap: 32 Layers Layer: Keycode matrix
11 --------------------- ------------------------ 11 ----------------- ---------------------
12 stack of layers content of layer 12 stack of layers array_of_keycode[row][column]
13 ____________ precedence _______________________ 13 ____________ precedence _______________________
14 / / | high / ESC / F1 / F2 / F3 .... 14 / / | high / ESC / F1 / F2 / F3 ....
15 15 /___________// | /-----/-----/-----/----- 15 31 /___________// | /-----/-----/-----/-----
16 14 /___________// | / TAB / / / .... 16 30 /___________// | / TAB / Q / W / E ....
17 13 /___________/_ | /-----/-----/-----/----- 17 29 /___________/ | /-----/-----/-----/-----
18 : / : : : : : / | /LCtrl/ / / .... 18 : _:_:_:_:_:__ | : /LCtrl/ A / S / D ....
19 3 /___________// | : / : : : : 19 : / : : : : : / | : / : : : :
20 2 /___________// | 2 `-------------------------- 20 2 /___________// | 2 `--------------------------
21 1 /___________// | 1 `-------------------------- 21 1 /___________// | 1 `--------------------------
22 0 /___________/ V low 0 `-------------------------- 22 0 /___________/ V low 0 `--------------------------
@@ -25,42 +25,42 @@ respective layers can be validated simultaneously. Layers are indexed with 0 to
25 25
26### 0.1 Keymap status 26### 0.1 Keymap status
27Keymap has its state in two parameters: 27Keymap has its state in two parameters:
28**`default_layer`** indicates a base keymap layer(0-15) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. 28**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
29 29
30Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. 30Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
31To change `default_layer` will be useful when you want to switch key layout completely, say you use Colmak instead of Qwerty. 31To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
32 32
33 Initial state of Keymap Change base layout 33 Initial state of Keymap Change base layout
34 ----------------------- ------------------ 34 ----------------------- ------------------
35 35
36 15 15 36 31 31
37 14 14 37 30 30
38 13 13 38 29 29
39 : : 39 : :
40 3 3 ____________ 40 : : ____________
41 2 ____________ 2 / / 41 2 ____________ 2 / /
42 1 / / ,->1 /___________/ 42 1 / / ,->1 /___________/
43 ,->0 /___________/ | 0 43 ,->0 /___________/ | 0
44 | | 44 | |
45 `--- default_layer = 0 `--- default_layer = 1 45 `--- default_layer = 0 `--- default_layer = 1
46 keymap_stat = 0x0001 keymap_stat = 0x0002 46 layer_state = 0x00000001 layer_state = 0x00000002
47 47
48On the other hand, you shall change `keymap_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions. 48On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
49 49
50 Overlay feature layer 50 Overlay feature layer
51 --------------------- bit|status 51 --------------------- bit|status
52 ____________ ---+------ 52 ____________ ---+------
53 15 / / 15 | 0 53 31 / / 31 | 0
54 14 /___________// -----> 14 | 1 54 30 /___________// -----> 30 | 1
55 13 /___________/ -----> 13 | 1 55 29 /___________/ -----> 29 | 1
56 : : | 56 : : | :
57 3 ____________ 3 | 0 57 : ____________ : | :
58 2 / / 2 | 0 58 2 / / 2 | 0
59 ,->1 /___________/ -----> 1 | 1 59 ,->1 /___________/ -----> 1 | 1
60 | 0 0 | 0 60 | 0 0 | 0
61 | | 61 | +
62 `--- default_layer = 1 | 62 `--- default_layer = 1 |
63 keymap_stat = 0x6002 <-----' 63 layer_state = 0x60000002 <-'
64 64
65 65
66 66
@@ -146,9 +146,9 @@ You can find other keymap definitions in file `keymap.c` located on project dire
146 }; 146 };
147 147
148 static const uint16_t PROGMEM fn_actions[] = { 148 static const uint16_t PROGMEM fn_actions[] = {
149 ACTION_KEYMAP_MOMENTARY(1), // FN0 149 ACTION_LAYER_MOMENTARY(1), // FN0
150 ACTION_KEYMAP_TAP_KEY(2, KC_SCLN), // FN1 150 ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN1
151 ACTION_KEYMAP_TOGGLE(2), // FN2 151 ACTION_LAYER_TOGGLE(2), // FN2
152 }; 152 };
153 153
154 154
@@ -192,7 +192,7 @@ There are 8 modifiers which has discrimination between left and right.
192- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation 192- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
193 193
194### 1.5 Fn key 194### 1.5 Fn key
195`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keyocde indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.*** 195`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keyocde indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.***
196 196
197### 1.6 Keycode Table 197### 1.6 Keycode Table
198 See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes. 198 See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
@@ -205,128 +205,121 @@ There are 8 modifiers which has discrimination between left and right.
205## 2. Action 205## 2. Action
206See [`common/action.h`](../common/action.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping. 206See [`common/action.h`](../common/action.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping.
207 207
208Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory against using jsut keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP` instead of action codes. 208Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using jsut keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes.
209 209
210***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.*** 210***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.***
211 211
212Usually action codes are needed only when you want to use layer switching, or
213 212
214### 2.1 Key action 213### 2.1 Key action
215This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release. 214This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release.
216 215
217#### 2.1.1 Normal key and Modifier 216#### 2.1.1 Normal key and Modifier
218This action usually won't be used expressly because you can use keycodes in `KEYMAP()` instead. 217***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead.
219You can define `Key` action on *'A'* key and *'left shift'* modifier with: 218
219You can define these actions on *'A'* key and *'left shift'* modifier with:
220 220
221 ACTION_KEY(KC_A) 221 ACTION_KEY(KC_A)
222 ACTION_KEY(KC_LSHIFT) 222 ACTION_KEY(KC_LSFT)
223 223
224#### 2.1.2 Key with modifiers 224#### 2.1.2 Key with modifiers
225This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes. 225This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes.
226
226Say you want to assign a key to `Shift + 1` to get charactor *'!'* or `Alt + Tab` to switch application windows. 227Say you want to assign a key to `Shift + 1` to get charactor *'!'* or `Alt + Tab` to switch application windows.
227 228
228 ACTION_LMOD_KEY(KC_LSHIFT, KC_1) 229 ACTION_MOD_KEY(KC_LSFT, KC_1)
229 ACTION_LMOD_KEY(KC_LALT, KC_TAB) 230 ACTION_MOD_KEY(KC_LALT, KC_TAB)
230 231
231Or `Alt,Shift + Tab` can be defined. `ACTION_LMODS_KEY()` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro. 232Or `Alt,Shift + Tab` can be defined. `ACTION_LMODS_KEY()` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro.
232 233
233 ACTION_LMODS_KEY((MOD_BIT(KC_LALT) | MOD_BIT(KC_LSHIFT)), KC_TAB) 234 ACTION_MODS_KEY((MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)), KC_TAB)
234 235
236#### 2.1.3 Multiple Modifiers
237Registers multiple modifiers with a key.
235 238
239 ACTION_MODS(MOD_BIT(KC_ALT) | MOD_BIT(KC_LSFT))
240
241#### 2.1.3 Modifier with tap key
242
243 ACTION_MODS_TAP_KEY(KC_RSFT, KC_GRV)
236 244
237### 2.2 Layer Action
238These actions operate layers of keymap.
239 245
240Parameters:
241- layer: 0-15
242- on: { press | release | both }
243 246
247### 2.2 Layer Action
248These actions operate layers of keymap.
244 249
245#### 2.2.0 Default Layer 250**Parameters:**
246`default_layer` is layer which always is valid and referred to when actions is not defined on other layers.
247 251
248##### Return to Default Layer 252+ **layer**: 0-31
249Turns on only `default layer` with clearing other all layers. 253+ **on**: { press | release | both }
250 254
251 ACTION_DEFAULT_LAYER
252 255
253##### Set Default Layer 256#### 2.2.1 Default Layer
254Sets 'default layer' to layer and turn it on. 257`default_layer` is layer which always is valid and referred to when actions is not defined on other overlay layers.
255 258
256 ACTION_DEFAULT_LAYER_SET_TO(layer) 259Sets `default_layer` to given parameter `layer` and turn it on.
257 ACTION_DEFAULT_LAYER_SET(layer, on)
258 260
261 ACTION_DEFAULT_LAYER(layer)
259 262
260#### 2.2.1 Keymap
261These actions operate layer status of keymap.
262 263
263##### Momentary Switch 264#### 2.2.2 Momentary Switch
264Turns on layer momentary while holding, in other words turn on when key is pressed and off when released. 265Turns on `layer` momentarily while holding, in other words turn on when key is pressed and off when released.
265 266
266 ACTION_KEYMAP_MOMENTARY(layer) 267 ACTION_LAYER_MOMENTARY(layer)
267 268
268 269
269##### Toggle Switch 270#### 2.2.3 Toggle Switch
270Turns on layer on first type and turns off on next. 271Turns on layer on first type and turns off on next.
271 272
272 ACTION_KEYMAP_TOGGLE(layer) 273 ACTION_LAYER_TOGGLE(layer)
273 274
274 275
275##### Momentary Switch with tap key 276#### 2.2.4 Momentary Switch with tap key
276Turns on layer momentary while holding but registers key on tap. 277Turns on layer momentary while holding but registers key on tap.
277 278
278 ACTION_KEYMAP_TAP_KEY(layer, key) 279 ACTION_LAYER_TAP_KEY(layer, key)
279 280
280 281
281##### Momentary Switch with tap toggle 282#### 2.2.5 Momentary Switch with tap toggle
282Turns on layer momentary while holding but toggles it with serial taps. 283Turns on layer momentary while holding but toggles it with serial taps.
283 284
284 ACTION_KEYMAP_TAP_TOGGLE(layer) 285 ACTION_LAYER_TAP_TOGGLE(layer)
285 286
286 287
287##### Invert layer 288#### 2.2.6 Invert state of layer
288Inverts current layer state. If the layer is on it becomes off with this action. 289Inverts current layer state. If the layer is on it becomes off with this action.
289 290
290 ACTION_KEYMAP_INV(layer, on) 291 ACTION_LAYER_INVERT(layer, on)
291 292
292 293
293##### Turn On layer 294#### 2.2.7 Turn On layer
294Turns on layer state. 295Turns on layer state.
295 296
296 ACTION_KEYMAP_ON(layer, on) 297 ACTION_LAYER_ON(layer, on)
297 298
298Turns on layer state on press and turn off on release. This is identical to **'Switch to layer'** action. 299Turns on layer state on press and turns off on release.
299 300
300 ACTION_KEYMAP_ON_OFF(layer) 301 ACTION_LAYER_ON_OFF(layer)
301 302
302 303
303##### Turn Off layer 304#### 2.2.8 Turn Off layer
304Turns off layer state. 305Turns off layer state.
305 306
306 ACTION_KEYMAP_OFF(layer, on) 307 ACTION_LAYER_OFF(layer, on)
307 308
309Turns off layer state on press and activates on release.
308 310
309##### Set layer 311 ACTION_LAYER_OFF_ON(layer)
310Turn on layer only.
311`keymap_stat = (1<<layer) [layer: 0-15]`
312 312
313 ACTION_KEYMAP_SET(layer, on)
314 313
315Turns on layer only and clear all layer on release.. 314#### 2.2.9 Set layer
316 315Turn on layer only.
317 ACTION_KEYMAP_SET_CLEAR(layer) 316`layer_state = (1<<layer) [layer: 0-31]`
318
319
320#### 2.2.2 Overlay
321***TBD***
322 317
323In addition to actions of `Keymap` above these actions are also available. 318 ACTION_LAYER_SET(layer, on)
324 319
325##### Invert 4bit layer states 320Turns on layer only and clear all layer on release..
326Invert 4bits out of 16bits of overlay status on both press and release.
327`overlay_stat = (overlay_stat ^ bits<<(shift*4)) [bits: 0-15, shift: 0-3]`
328 321
329 ACTION_OVERLAY_INV4(bits, shift) 322 ACTION_LAYER_SET_CLEAR(layer)
330 323
331 324
332 325
@@ -355,6 +348,7 @@ Invert 4bits out of 16bits of overlay status on both press and release.
355See `keyboard/hhkb/keymap.c` for sample. 348See `keyboard/hhkb/keymap.c` for sample.
356 349
357 350
351
358### 2.4 Function action 352### 2.4 Function action
359***TBD*** 353***TBD***
360 354
@@ -403,52 +397,52 @@ See `keyboard/hhkb/keymap.c` for sample.
403 397
404 398
405 399
406## 4. Layer switching Example 400## 3. Layer switching Example
407There are some ways to switch layer with 'Layer' actions. 401There are some ways to switch layer with 'Layer' actions.
408 402
409### 4.1 Momentary switching 403### 3.1 Momentary switching
410Momentary switching changes layer only while holding Fn key. 404Momentary switching changes layer only while holding Fn key.
411 405
412This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on base layer temporarily with this. 406This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on base layer temporarily with this.
413 407
414 ACTION_KEYMAP_MOMENTARY(1) 408 ACTION_LAYER_MOMENTARY(1)
415 409
416 410
417After switch actions of destination layer are perfomed. 411After switch actions of destination layer are perfomed.
418***Thus you shall need to place action to come back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to palce same action or 'KC_TRNS` on destination layer to get back. 412***Thus you shall need to place action to come back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to palce same action or 'KC_TRNS` on destination layer to get back.
419 413
420 414
421### 4.2 Toggle switching 415### 3.2 Toggle switching
422Toggle switching changes layer after press then release. With this you can keep staying on the layer until you press the key again to return. 416Toggle switching changes layer after press then release. With this you can keep staying on the layer until you press the key again to return.
423 417
424This is toggle action of 'Layer 2'. 418This is toggle action of 'Layer 2'.
425 419
426 ACTION_KEYMAP_TOGGLE(2) 420 ACTION_LAYER_TOGGLE(2)
427 421
428 422
429 423
430### 4.3 Momentary switching with Tap key 424### 3.3 Momentary switching with Tap key
431These actions switch layer only while holding `Fn` key and register key on tap. **Tap** means to press and release key quickly. 425These actions switch layer only while holding `Fn` key and register key on tap. **Tap** means to press and release key quickly.
432 426
433 ACTION_KEYMAP_TAP_KEY(2, KC_SCLN) 427 ACTION_LAYER_TAP_KEY(2, KC_SCLN)
434 428
435With this you can place layer switching function on normal key like ';' without losing its original key register function. 429With this you can place layer switching function on normal key like ';' without losing its original key register function.
436 430
437 431
438 432
439### 4.4 Momentary switching with Tap Toggle 433### 3.4 Momentary switching with Tap Toggle
440This switches layer only while holding `Fn` key and toggle layer after several taps. **Tap** means to press and release key quickly. 434This switches layer only while holding `Fn` key and toggle layer after several taps. **Tap** means to press and release key quickly.
441 435
442 ACTION_KEYMAP_TAP_TOGGLE(1) 436 ACTION_LAYER_TAP_TOGGLE(1)
443 437
444Number of taps can be defined with `TAPPING_TOGGLE` in `config.h`, `5` by default. 438Number of taps can be defined with `TAPPING_TOGGLE` in `config.h`, `5` by default.
445 439
446 440
447 441
448## Tapping 442## 4. Tapping
449Tapping is to press and release key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default. 443Tapping is to press and release key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default.
450 444
451### Tap Key 445### 4.1 Tap Key
452This is feature to assign normal key action and modifier including `Fn` to just one physical key. This is a kind of [Dual role modifier][dual_role]. It works as modifier or `Fn` when holding a key but registers normal key when tapping. 446This is feature to assign normal key action and modifier including `Fn` to just one physical key. This is a kind of [Dual role modifier][dual_role]. It works as modifier or `Fn` when holding a key but registers normal key when tapping.
453 447
454Action for modifier with tap key. 448Action for modifier with tap key.
@@ -457,18 +451,18 @@ Action for modifier with tap key.
457 451
458Action for `Fn` with tap key. 452Action for `Fn` with tap key.
459 453
460 ACTION_KEYMAP_TAP_KEY(layer, key) 454 ACTION_LAYER_TAP_KEY(layer, key)
461 455
462[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_modifier_keys 456[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_modifier_keys
463 457
464 458
465### Tap Toggle 459### 4.2 Tap Toggle
466This is feature to assign both toggle layer and momentary switch layer action to just one physical key. It works as mementary switch when holding a key but toggle switch when tapping. 460This is feature to assign both toggle layer and momentary switch layer action to just one physical key. It works as mementary switch when holding a key but toggle switch when tapping.
467 461
468 ACTION_KEYMAP_TAP_TOGGLE(layer) 462 ACTION_LAYER_TAP_TOGGLE(layer)
469 463
470 464
471### One Shot Modifier 465### 4.3 One Shot Modifier
472This adds oneshot feature to modifier key. 'One Shot Modifier' is one time modifier which has effect only on following one alpha key. 466This adds oneshot feature to modifier key. 'One Shot Modifier' is one time modifier which has effect only on following one alpha key.
473It works as normal modifier key when holding but oneshot modifier when tapping. 467It works as normal modifier key when holding but oneshot modifier when tapping.
474 468
@@ -479,12 +473,16 @@ Say you want to type 'The', you have to push and hold Shift before type 't' then
479 473
480 474
481 475
482## Legacy Keymap 476## 5. Legacy Keymap
483This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. 477This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.***
478
479To enable Legacy Keymap support define this macro in `config.h`.
484 480
485In comparison with new keymap how to define Fn key is different. It uses two arrays `fn_layer[]` and `fn_keycode[]`. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key. 481 #define USE_LEGACY_KEYMAP
486 482
487In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tap while `Fn0` and `Fn1` doesn't send any key. 483Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
484
485In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
488 486
489 static const uint8_t PROGMEM fn_layer[] = { 487 static const uint8_t PROGMEM fn_layer[] = {
490 1, // Fn0 488 1, // Fn0
@@ -499,16 +497,25 @@ In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2
499 }; 497 };
500 498
501 499
502## Terminology 500## 6. Terminology
503- keymap 501***TBD***
504- layer 502### keymap
505- layout 503is comprised of multiple layers.
506- key 504### layer
507- keycode 505is matrix of keycodes.
508- scancode 506### key
509- action 507is physical button on keyboard or logical switch on software.
510- layer transparency 508### keycode
511- layer precedence 509is codes used on firmware.
512- register 510### action
513- tap 511is a function assigned on a key.
514- Fn key 512### layer transparency
513Using transparent keycode one layer can refer key definition on other lower layer.
514### layer precedence
515Top layer has higher precedence than lower layers.
516### tapping
517is to press and release a key quickly.
518### Fn key
519is key which executes a special action like layer switching, mouse key, macro or etc.
520### dual role modifier
521<http://en.wikipedia.org/wiki/Modifier_key#Dual-role_modifier_keys>