Update keyboard layout doc with suggested changes
This commit is contained in:
parent
0e20b71702
commit
aa69bd6939
@ -1,20 +1,28 @@
|
||||
# How to customize your keyboard layout with System76 EC
|
||||
# Keyboard layout customization
|
||||
|
||||
## Dependencies
|
||||
* Install [sdcc](http://sdcc.sourceforge.net/): `sudo apt install sdcc`
|
||||
* Install rust nightly
|
||||
- Install [rustup](https://rustup.rs/)
|
||||
- Reboot
|
||||
- Run `rustup install nightly`)
|
||||
|
||||
* Dependencies are listed in the README file for the EC project.
|
||||
|
||||
## Adding your layout
|
||||
* In `src/board/system76/{your-model}/keymap/`, copy `default.c` and rename it. There are two examples to reference in the `lemp9` directory: `jeremy.c` and `levi.c`.
|
||||
* In `src/common/include/common/keymap.h` you will find a list of the key definitions.h
|
||||
* You will notice two sets of keys in these layout files. The top one is the standard mapping. The bottom one is the Fn layer, meaning it is active when the Fn key is being held. If you look at the Fn layer in the `levi.c` layout, you will see that there are arrow keys at WASD, media and volume keys on the bottom row, etc.
|
||||
* Hint: To avoid losing your place change one key at a time, referencing the key code you are deleting to keep yourself positioned correctly in the list of keycodes.
|
||||
* In `src/board/system76/{your-model}/keymap/`, copy `default.c` and rename it.
|
||||
There are two examples to reference in the `lemp9` directory: `jeremy.c` and
|
||||
`levi.c`.
|
||||
* In `src/common/include/common/keymap.h` you will find a list of the key
|
||||
definitions.
|
||||
* You will notice two sets of keys in these layout files. The top one is the
|
||||
standard mapping. The bottom one is the Fn layer, meaning it is active when
|
||||
the Fn key is being held. If you look at the Fn layer in the `levi.c` layout,
|
||||
you will see that there are arrow keys at WASD, media and volume keys on the
|
||||
bottom row, etc.
|
||||
* Hint: To avoid losing your place change one key at a time, referencing the key
|
||||
code you are deleting to keep yourself positioned correctly in the list of
|
||||
keycodes.
|
||||
|
||||
## Configure your EC to build with your layout
|
||||
* Create a file in the project's root directory called `config.mk` and add your board and keyboard layout to it. For example, if you want to build lemp9 firmware with Jeremy's layout (which is at `ec/src/board/system76/lemp9/keymap/jeremy.c`):
|
||||
* Create a file in the project's root directory called `config.mk` and add your
|
||||
board and keyboard layout to it. For example, if you want to build lemp9
|
||||
firmware with Jeremy's layout (which is at
|
||||
`ec/src/board/system76/lemp9/keymap/jeremy.c`):
|
||||
```
|
||||
BOARD?=system76/lemp9
|
||||
KEYMAP?=jeremy
|
||||
@ -28,6 +36,11 @@ KEYMAP?=jeremy
|
||||
- Close all running applications.
|
||||
- Unplug everything from your laptop except the charger.
|
||||
- Flash with `make flash_internal`
|
||||
- When it says, "Waiting 5 seconds for all keys to be released", it is important to not touch the keyboard or trackpad until it finishes writing the new EC and turns itself off.
|
||||
- Once it shuts down, you can power it back on, and your keymap will be active.
|
||||
- If you changed your layout in such a way that you can't easily type, just plug in a USB keyboard and fix the layout. The USB keyboard's layout will be unaffected.
|
||||
- When it says, "Waiting 5 seconds for all keys to be released", it is
|
||||
important to not touch the keyboard or trackpad until it finishes writing
|
||||
the new EC and turns itself off.
|
||||
- Once it shuts down, you can power it back on, and your keymap will be
|
||||
active.
|
||||
- If you changed your layout in such a way that you can't easily type, just
|
||||
plug in a USB keyboard and re-flash to the default layout until you can
|
||||
fix. The USB keyboard's layout will be unaffected.
|
||||
|
Loading…
x
Reference in New Issue
Block a user