Compare commits

...
6 Commits
Author SHA1 Message Date
Ryan 4b1430fd09 Update Norman keymap and sendstring LUT (#8404) 2020-03-16 07:38:05 +11:00
Ryan f1c6fa3895 Update Plover keymap (#8405) 2020-03-16 07:37:32 +11:00
jotix fe1a055391 [Keymap] Update ortho 4x12 jotix layout (#8425)
* ortho 4x12 jotix layout

* jotix ortho_4x12 layout
2020-03-15 17:16:30 +00:00
Ryan c18b51e68e msys2_install.sh: wrap requirements.txt in quotes (#8424) 2020-03-15 17:15:42 +00:00
skullydazedandRyan dc68418660 Fix some broken links in the docs (#8394)
* fix some broken links

* remove duplicate and confusing material from cli.md

* Switch brazil to the 2 letter country code

* Update docs/_langs.md

Co-Authored-By: Ryan <[email protected]>

Co-authored-by: Ryan <[email protected]>
2020-03-15 07:48:44 -07:00
brickbots 499d7c8ce6 [Docs] Update to I2C docs: Clarify address expectation and return values (#8413)
* Clarifying docs for i2c

* Fix typo

* Fix up punctuation

* Implementing great suggestions

* Update docs/i2c_driver.md

* Update docs/i2c_driver.md
2020-03-15 00:17:48 -07:00
11 changed files with 443 additions and 369 deletions

No files matched your search

-2
View File
@@ -18,7 +18,6 @@
* [Overview](newbs_building_firmware_configurator.md) * [Overview](newbs_building_firmware_configurator.md)
* [Step by Step](configurator_step_by_step.md) * [Step by Step](configurator_step_by_step.md)
* [Troubleshooting](configurator_troubleshooting.md) * [Troubleshooting](configurator_troubleshooting.md)
* [Problems and Bugs](configurator_problems.md)
* QMK API * QMK API
* [Overview](api_overview.md) * [Overview](api_overview.md)
* [API Documentation](api_docs.md) * [API Documentation](api_docs.md)
@@ -128,7 +127,6 @@
* Python Development * Python Development
* [Coding Conventions](coding_conventions_python.md) * [Coding Conventions](coding_conventions_python.md)
* [QMK CLI Development](cli_development.md) * [QMK CLI Development](cli_development.md)
* [QMK CLI Config](cli_dev_configuration.md)
* Configurator Development * Configurator Development
* QMK API * QMK API
+6 -281
View File
@@ -1,24 +1,14 @@
# QMK CLI # QMK CLI
This page describes how to setup and use the QMK CLI. ## Overview
# Overview
The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more. The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
* [Global CLI](#global-cli) ### Requirements
* [Local CLI](#local-cli)
* [CLI Commands](#cli-commands)
# Requirements The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). ### Install Using Homebrew (macOS, some Linux)
# Global CLI
QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically.
## Install Using Homebrew (macOS, some Linux)
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK: If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
@@ -29,7 +19,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
``` ```
## Install Using easy_install or pip ### Install Using easy_install or pip
If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command: If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
@@ -39,7 +29,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
``` ```
## Packaging For Other Operating Systems ### Packaging For Other Operating Systems
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines: We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
@@ -47,268 +37,3 @@ We are looking for people to create and maintain a `qmk` package for more operat
* Document why in a comment when you do deviate * Document why in a comment when you do deviate
* Install using a virtualenv * Install using a virtualenv
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`. * Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
# Local CLI
If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
**Example**:
```
$ ~/qmk_firmware/bin/qmk hello
Ψ Hello, World!
```
## Local CLI Limitations
There are some limitations to the local CLI compared to the global CLI:
* The local CLI does not support `qmk setup` or `qmk clone`
* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
# CLI Commands
## `qmk cformat`
This command formats C code using clang-format.
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
**Usage for specified files**:
```
qmk cformat [file1] [file2] [...] [fileN]
```
**Usage for all core files**:
```
qmk cformat -a
```
**Usage for only changed files against origin/master**:
```
qmk cformat
```
**Usage for only changed files against branch_name**:
```
qmk cformat -b branch_name
```
## `qmk compile`
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
**Usage for Configurator Exports**:
```
qmk compile <configuratorExport.json>
```
**Usage for Keymaps**:
```
qmk compile -kb <keyboard_name> -km <keymap_name>
```
**Usage in Keyboard Directory**:
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
```
qmk compile
```
**Example**:
```
$ qmk config compile.keymap=default
$ cd ~/qmk_firmware/keyboards/planck/rev6
$ qmk compile
Ψ Compiling keymap with make planck/rev6:default
...
```
or with optional keymap argument
```
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
$ qmk compile -km 66_iso
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
...
```
or in keymap directory
```
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
$ qmk compile
Ψ Compiling keymap with make make gh60/satan:colemak
...
```
**Usage in Layout Directory**:
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
```
qmk compile -kb <keyboard_name>
```
**Example**:
```
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
$ qmk compile -kb dz60
Ψ Compiling keymap with make dz60:mechmerlin-ansi
...
```
## `qmk flash`
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
**Usage for Configurator Exports**:
```
qmk flash <configuratorExport.json> -bl <bootloader>
```
**Usage for Keymaps**:
```
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
```
**Listing the Bootloaders**
```
qmk flash -b
```
## `qmk config`
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
**Usage**:
```
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
```
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
**Usage**:
```
qmk docs [-p PORT]
```
## `qmk doctor`
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
**Usage**:
```
qmk doctor [-y] [-n]
```
**Examples**:
Check your environment for problems and prompt to fix them:
qmk doctor
Check your environment and automatically fix any problems found:
qmk doctor -y
Check your environment and report problems only:
qmk doctor -n
## `qmk json2c`
Creates a keymap.c from a QMK Configurator export.
**Usage**:
```
qmk json2c [-o OUTPUT] filename
```
## `qmk kle2json`
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
**Usage**:
```
qmk kle2json [-f] <filename>
```
**Examples**:
```
$ qmk kle2json kle.txt
☒ File info.json already exists, use -f or --force to overwrite.
```
```
$ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```
## `qmk list-keyboards`
This command lists all the keyboards currently defined in `qmk_firmware`
**Usage**:
```
qmk list-keyboards
```
## `qmk list-keymaps`
This command lists all the keymaps for a specified keyboard (and revision).
**Usage**:
```
qmk list-keymaps -kb planck/ez
```
## `qmk new-keymap`
This command creates a new keymap based on a keyboard's existing default keymap.
**Usage**:
```
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```
## `qmk pyformat`
This command formats python code in `qmk_firmware`.
**Usage**:
```
qmk pyformat
```
## `qmk pytest`
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
**Usage**:
```
qmk pytest
```
+247
View File
@@ -0,0 +1,247 @@
# QMK CLI Commands
# CLI Commands
## `qmk cformat`
This command formats C code using clang-format.
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
**Usage for specified files**:
```
qmk cformat [file1] [file2] [...] [fileN]
```
**Usage for all core files**:
```
qmk cformat -a
```
**Usage for only changed files against origin/master**:
```
qmk cformat
```
**Usage for only changed files against branch_name**:
```
qmk cformat -b branch_name
```
## `qmk compile`
This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
**Usage for Configurator Exports**:
```
qmk compile <configuratorExport.json>
```
**Usage for Keymaps**:
```
qmk compile -kb <keyboard_name> -km <keymap_name>
```
**Usage in Keyboard Directory**:
Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
```
qmk compile
```
**Example**:
```
$ qmk config compile.keymap=default
$ cd ~/qmk_firmware/keyboards/planck/rev6
$ qmk compile
Ψ Compiling keymap with make planck/rev6:default
...
```
or with optional keymap argument
```
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
$ qmk compile -km 66_iso
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
...
```
or in keymap directory
```
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
$ qmk compile
Ψ Compiling keymap with make make gh60/satan:colemak
...
```
**Usage in Layout Directory**:
Must be under `qmk_firmware/layouts/`, and in a keymap folder.
```
qmk compile -kb <keyboard_name>
```
**Example**:
```
$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
$ qmk compile -kb dz60
Ψ Compiling keymap with make dz60:mechmerlin-ansi
...
```
## `qmk flash`
This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
**Usage for Configurator Exports**:
```
qmk flash <configuratorExport.json> -bl <bootloader>
```
**Usage for Keymaps**:
```
qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
```
**Listing the Bootloaders**
```
qmk flash -b
```
## `qmk config`
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
**Usage**:
```
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
```
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
**Usage**:
```
qmk docs [-p PORT]
```
## `qmk doctor`
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
**Usage**:
```
qmk doctor [-y] [-n]
```
**Examples**:
Check your environment for problems and prompt to fix them:
qmk doctor
Check your environment and automatically fix any problems found:
qmk doctor -y
Check your environment and report problems only:
qmk doctor -n
## `qmk json2c`
Creates a keymap.c from a QMK Configurator export.
**Usage**:
```
qmk json2c [-o OUTPUT] filename
```
## `qmk kle2json`
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
**Usage**:
```
qmk kle2json [-f] <filename>
```
**Examples**:
```
$ qmk kle2json kle.txt
☒ File info.json already exists, use -f or --force to overwrite.
```
```
$ qmk kle2json -f kle.txt -f
Ψ Wrote out to info.json
```
## `qmk list-keyboards`
This command lists all the keyboards currently defined in `qmk_firmware`
**Usage**:
```
qmk list-keyboards
```
## `qmk list-keymaps`
This command lists all the keymaps for a specified keyboard (and revision).
**Usage**:
```
qmk list-keymaps -kb planck/ez
```
## `qmk new-keymap`
This command creates a new keymap based on a keyboard's existing default keymap.
**Usage**:
```
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
```
## `qmk pyformat`
This command formats python code in `qmk_firmware`.
**Usage**:
```
qmk pyformat
```
## `qmk pytest`
This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
**Usage**:
```
qmk pytest
```
File renamed without changes.
+24 -11
View File
@@ -2,27 +2,40 @@
The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs. The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs.
## An important note on I2C Addresses
All of the addresses expected by this driver should be pushed to the upper 7 bits of the address byte. Setting
the lower bit (indicating read/write) will be done by the respective functions. Almost all I2C addresses listed
on datasheets and the internet will be represented as 7 bits occupying the lower 7 bits and will need to be
shifted to the left (more significant) by one bit. This is easy to do via the bitwise shift operator `<< 1`.
You can either do this on each call to the functions below, or once in your definition of the address. For example if your device has an address of `0x18`:
`#define MY_I2C_ADDRESS (0x18 << 1)`
See https://www.robot-electronics.co.uk/i2c-tutorial for more information about I2C addressing and other technical details.
## Available functions ## Available functions
|Function |Description | |Function |Description |
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. | |`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. |
|`uint8_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. | |`i2c_status_t i2c_start(uint8_t address, uint16_t timeout);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. |
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. | |`i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. |
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. | |`i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. | |`i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. | |`i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. |
|`uint8_t i2c_stop(void);` |Ends an I2C transaction. | |`i2c_status_t i2c_stop(void);` |Ends an I2C transaction. |
### Function Return ### Function Return
All the above functions, except `void i2c_init(void);` return the following truth table: All the above functions, except `void i2c_init(void);` return the following truth table:
|Return Value |Description | |Return Constant |Value|Description |
|---------------|---------------------------------------------------| |--------------------|-----|--------------------------------|
|0 |Operation executed successfully. | |`I2C_STATUS_SUCCESS`|0 |Operation executed successfully.|
|-1 |Operation failed. | |`I2C_STATUS_ERROR` |-1 |Operation failed. |
|-2 |Operation timed out. | |`I2C_STATUS_TIMEOUT`|-2 |Operation timed out. |
## AVR ## AVR
+1
View File
@@ -33,6 +33,7 @@
// Moved pages // Moved pages
'/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines', '/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines',
'/build_environment_setup': '/getting_started_build_tools', '/build_environment_setup': '/getting_started_build_tools',
'/cli_dev_configuration': '/cli_configuration',
'/dynamic_macros': '/feature_dynamic_macros', '/dynamic_macros': '/feature_dynamic_macros',
'/feature_common_shortcuts': '/feature_advanced_keycodes', '/feature_common_shortcuts': '/feature_advanced_keycodes',
'/glossary': '/reference_glossary', '/glossary': '/reference_glossary',
+8 -8
View File
@@ -24,17 +24,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_ENT, KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_ENT,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT KC_LCTL,KC_LGUI,KC_LALT,KC_DEL, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
), ),
[_LOWER] = LAYOUT_ortho_4x12 ( [_LOWER] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______, _______,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS,KC_GRV, _______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_BTN1,KC_BTN2,_______,_______,_______,_______, _______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_TILD,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
@@ -42,13 +42,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT_ortho_4x12 ( [_RAISE] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_CAPS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, _______,KC_F11, KC_F12, _______,_______,_______,KC_HOME,KC_PGUP,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, _______,_______,_______,KC_CAPS,_______,KC_PGDN,KC_END, KC_PGDN,_______,KC_BTN1,KC_BTN2,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,TGLOWER,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END _______,_______,_______,_______,TGLOWER,_______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
), ),
+105 -33
View File
@@ -1,4 +1,3 @@
/* Copyright 2019 Torben Hoffmann /* Copyright 2019 Torben Hoffmann
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -14,40 +13,113 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include "keymap.h" #include "keymap.h"
// For software implementation of norman
#define NM_Q KC_Q
#define NM_W KC_W
#define NM_D KC_E
#define NM_F KC_R
#define NM_K KC_T
#define NM_J KC_Y
#define NM_U KC_U
#define NM_R KC_I
#define NM_L KC_O
#define NM_SCLN KC_P
#define NM_COLN LSFT(NM_SCLN)
#define NM_A KC_A // clang-format off
#define NM_S KC_S
#define NM_E KC_D
#define NM_T KC_F
#define NM_G KC_G
#define NM_Y KC_H
#define NM_N KC_J
#define NM_I KC_K
#define NM_O KC_L
#define NM_H KC_SCLN
#define NM_Z KC_Z /*
#define NM_X KC_X * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
#define NM_C KC_C * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │       │
#define NM_V KC_V * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
#define NM_B KC_B * │     │ Q │ W │ D │ F │ K │ J │ U │ R │ L │ ; │ [ │ ] │  \  │
#define NM_P KC_N * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
#define NM_M KC_M * │      │ A │ S │ E │ T │ G │ Y │ N │ I │ O │ H │ ' │        │
#define NM_COMM KC_COMM * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
#define NM_DOT KC_DOT * │        │ Z │ X │ C │ V │ B │ P │ M │ , │ . │ / │          │
#define NM_SLSH KC_SLSH * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │    │    │    │                        │    │    │    │    │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define NM_GRV KC_GRV // `
#define NM_1 KC_1 // 1
#define NM_2 KC_2 // 2
#define NM_3 KC_3 // 3
#define NM_4 KC_4 // 4
#define NM_5 KC_5 // 5
#define NM_6 KC_6 // 6
#define NM_7 KC_7 // 7
#define NM_8 KC_8 // 8
#define NM_9 KC_9 // 9
#define NM_0 KC_0 // 0
#define NM_MINS KC_MINS // -
#define NM_EQL KC_EQL // =
// Row 2
#define NM_Q KC_Q // Q
#define NM_W KC_W // W
#define NM_D KC_E // D
#define NM_F KC_R // F
#define NM_K KC_T // K
#define NM_J KC_Y // J
#define NM_U KC_U // U
#define NM_R KC_I // R
#define NM_L KC_O // L
#define NM_SCLN KC_P // ;
#define NM_LBRC KC_LBRC // [
#define NM_RBRC KC_RBRC // ]
#define NM_BSLS KC_BSLS // (backslash)
// Row 3
#define NM_A KC_A // A
#define NM_S KC_S // S
#define NM_E KC_D // E
#define NM_T KC_F // T
#define NM_G KC_G // G
#define NM_Y KC_H // Y
#define NM_N KC_J // N
#define NM_I KC_K // I
#define NM_O KC_L // O
#define NM_H KC_SCLN // H
#define NM_QUOT KC_QUOT // '
// Row 4
#define NM_Z KC_Z // Z
#define NM_X KC_X // X
#define NM_C KC_C // C
#define NM_V KC_V // V
#define NM_B KC_B // B
#define NM_P KC_N // P
#define NM_M KC_M // M
#define NM_COMM KC_COMM // ,
#define NM_DOT KC_DOT // .
#define NM_SLSH KC_SLSH // /
/* Shifted symbols
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │       │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │     │   │   │   │   │   │   │   │   │   │ ; │ { │ } │  |  │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
* │      │   │   │   │   │   │   │   │   │   │   │ " │        │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
* │        │   │   │   │   │   │   │   │ < │ > │ ? │          │
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │    │    │    │                        │    │    │    │    │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define NM_TILD S(NM_GRV) // ~
#define NM_EXLM S(NM_1) // !
#define NM_AT S(NM_2) // @
#define NM_HASH S(NM_3) // #
#define NM_DLR S(NM_4) // $
#define NM_PERC S(NM_5) // %
#define NM_CIRC S(NM_6) // ^
#define NM_AMPR S(NM_7) // &
#define NM_ASTR S(NM_8) // *
#define NM_LPRN S(NM_9) // (
#define NM_RPRN S(NM_0) // )
#define NM_UNDS S(NM_MINS) // _
#define NM_PLUS S(NM_EQL) // +
// Row 2
#define NM_COLN S(NM_SCLN) // :
#define NM_LCBR S(NM_LBRC) // {
#define NM_RCBR S(NM_RBRC) // }
#define NM_PIPE S(NM_BSLS) // |
// Row 3
#define NM_DQUO S(NM_QUOT) // "
// Row 4
#define NM_LABK S(NM_COMM) // <
#define NM_RABK S(NM_DOT) // >
#define NM_QUES S(NM_SLSH) // ?
+43 -25
View File
@@ -13,35 +13,53 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef KEYMAP_PLOVER_H
#define KEYMAP_PLOVER_H #pragma once
#include "keymap.h" #include "keymap.h"
#define PV_NUM KC_1 // clang-format off
#define PV_LS KC_Q
#define PV_LT KC_W
#define PV_LP KC_E
#define PV_LH KC_R
#define PV_LK KC_S
#define PV_LW KC_D
#define PV_LR KC_F
/*
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
* │   │Num│   │   │   │   │   │   │   │   │   │   │   │       │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
* │     │ S │ T │ P │ H │   │ * │ F │ P │ L │ T │ D │   │     │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
* │      │   │ K │ W │ R │   │   │ R │ B │ G │ S │ Z │        │
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
* │        │   │   │ A │ O │   │ E │ U │   │   │   │          │
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
* │    │    │    │                        │    │    │    │    │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
*/
// Row 1
#define PV_NUM KC_1
// Row 2
#define PV_LS KC_Q
#define PV_LT KC_W
#define PV_LP KC_E
#define PV_LH KC_R
#define PV_STAR KC_Y #define PV_STAR KC_Y
#define PV_RF KC_U #define PV_RF KC_U
#define PV_RP KC_I #define PV_RP KC_I
#define PV_RL KC_O #define PV_RL KC_O
#define PV_RT KC_P #define PV_RT KC_P
#define PV_RD KC_LBRC #define PV_RD KC_LBRC
#define PV_RR KC_J
#define PV_RB KC_K
#define PV_RG KC_L
#define PV_RS KC_SCLN
#define PV_RZ KC_QUOT
#define PV_A KC_C // Row 3
#define PV_O KC_V #define PV_LK KC_S
#define PV_E KC_N #define PV_LW KC_D
#define PV_U KC_M #define PV_LR KC_F
#define PV_RR KC_J
#define PV_RB KC_K
#define PV_RG KC_L
#define PV_RS KC_SCLN
#define PV_RZ KC_QUOT
#endif // Row 4
#define PV_A KC_C
#define PV_O KC_V
#define PV_E KC_N
#define PV_U KC_M
+8 -8
View File
@@ -33,27 +33,27 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// ! " # $ % & ' // ! " # $ % & '
KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, KC_SPC, NM_1, NM_QUOT, NM_3, NM_4, NM_5, NM_7, NM_QUOT,
// ( ) * + , - . / // ( ) * + , - . /
KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, NM_9, NM_0, NM_8, NM_EQL, NM_COMM, NM_MINS, NM_DOT, NM_SLSH,
// 0 1 2 3 4 5 6 7 // 0 1 2 3 4 5 6 7
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, NM_0, NM_1, NM_2, NM_3, NM_4, NM_5, NM_6, NM_7,
// 8 9 : ; < = > ? // 8 9 : ; < = > ?
KC_8, KC_9, NM_SCLN, NM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, NM_8, NM_9, NM_SCLN, NM_SCLN, NM_COMM, NM_EQL, NM_DOT, NM_SLSH,
// @ A B C D E F G // @ A B C D E F G
KC_2, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, NM_2, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G,
// H I J K L M N O // H I J K L M N O
NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O,
// P Q R S T U V W // P Q R S T U V W
NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W,
// X Y Z [ \ ] ^ _ // X Y Z [ \ ] ^ _
NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, NM_X, NM_Y, NM_Z, NM_LBRC, NM_BSLS, NM_RBRC, NM_6, NM_MINS,
// ` a b c d e f g // ` a b c d e f g
KC_GRV, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, NM_GRV, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G,
// h i j k l m n o // h i j k l m n o
NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O,
// p q r s t u v w // p q r s t u v w
NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W,
// x y z { | } ~ DEL // x y z { | } ~ DEL
NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL NM_X, NM_Y, NM_Z, NM_LBRC, NM_BSLS, NM_RBRC, NM_GRV, KC_DEL
}; };
+1 -1
View File
@@ -81,7 +81,7 @@ else
fi fi
popd popd
pip3 install -r ${util_dir}/../requirements.txt pip3 install -r "${util_dir}/../requirements.txt"
cp -f "$dir/activate_msys2.sh" "$download_dir/" cp -f "$dir/activate_msys2.sh" "$download_dir/"