Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (154 commits)
  Fix typo in freebsd_install.sh (qmk#9655)
  [Keymap] Add Alice rev2 to my userspace (qmk#9600)
  [Keyboard] RART67 : add support via (qmk#9589)
  [Keyboard] XD87 Caps Lock LED refactor (qmk#9585)
  [Keyboard] Updated VIA Support for DP60 (qmk#9508)
  fixed link to Eclipse instructions (qmk#9647)
  format code according to conventions [skip ci]
  add DIP_SWITCH_MATRIX_GRID support (qmk#8772)
  add SPLIT_HAND_MATRIX_GRID support (qmk#8685)
  [Keyboard] Gowla Macro Board (qmk#9643)
  Fix “G” in Neo2 keymap (qmk#9645)
  Rotr - Updated README and default keymap (qmk#9598)
  Add missing dependency for Void Linux to util/linux-install.sh (qmk#9637)
  Backlight docs wordsmithing (qmk#9631)
  Fix incorrect layout for GHS.rar (qmk#9597)
  Add movement hook to ps2_mouse (qmk#8805)
  Make sendstring respect `TAP_CODE_DELAY` (qmk#9623)
  [Keymap] Adding a Custom Keymap for Matrix Noah (qmk#9581)
  Fix sharing of mouse button state from mousekeys to ps2_mouse (qmk#9124)
  Add xjtian keymap for Planck (qmk#9502)
  ...
  • Loading branch information
Shinichi-Ohki committed Jul 6, 2020
2 parents b93d5c8 + 85e20a5 commit 0cf8305
Show file tree
Hide file tree
Showing 704 changed files with 38,815 additions and 4,109 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PR Lint keyboards

on:
pull_request:
paths:
- 'keyboards/**'

jobs:
info:
runs-on: ubuntu-latest

container: qmkfm/base_container

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Print info
run: |
git rev-parse --short HEAD
echo ${{ github.event.pull_request.base.sha }}
git diff --name-only ${{ github.event.pull_request.base.sha }}...
- name: Run qmk info
shell: 'bash {0}'
run: |
QMK_CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...)
QMK_KEYBOARDS=$(qmk list-keyboards)
exit_code=0
for KB in $QMK_KEYBOARDS; do
KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)')
if [[ -z "$KEYBOARD_CHANGES" ]]; then
# skip as no changes for this keyboard
continue
fi
KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/)
if [[ $KEYMAP_ONLY -gt 0 ]]; then
echo "linting ${KB}"
# TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines
qmk info -kb ${KB} 2>&1 | tee /tmp/$$
!(grep -cq ☒ /tmp/$$)
: $((exit_code = $exit_code + $?))
fi
done
exit $exit_code
9 changes: 8 additions & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif

VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom

LED_MATRIX_ENABLE ?= no
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
Expand Down Expand Up @@ -205,6 +205,13 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
QUANTUM_LIB_SRC += i2c_master.c
endif

ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3741.c
QUANTUM_LIB_SRC += i2c_master.c
endif

ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
OPT_DEFS += -DWS2812
WS2812_DRIVER_REQUIRED := yes
Expand Down
5 changes: 4 additions & 1 deletion docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_HAND_PIN B7`
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.

* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined)
* `#define SPLIT_HAND_MATRIX_GRID <out_pin>,<in_pin>`
* The handedness is determined by using the intersection of the keyswitches in the key matrix, which does not exist. Normally, when this intersection is shorted (level low), it is considered left. If you define `#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT`, it is determined to be right when the level is low.

* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` and `SPLIT_HAND_MATRIX_GRID` are not defined)
* Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves.

* `#define MASTER_RIGHT`
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation_best_practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ This page describes my cool feature. You can use my cool feature to make coffee
|KC_SUGAR||Order Sugar|
```

Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
259 changes: 115 additions & 144 deletions docs/feature_backlight.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/feature_dip_switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ DIP switches are supported by adding this to your `rules.mk`:
and this to your `config.h`:

```c
// Connects each switch in the dip switch to the GPIO pin of the MCU
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
```
or
```c
// Connect each switch in the DIP switch to an unused intersections in the key matrix.
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs
```

## Callbacks

The callback functions can be inserted into your `<keyboard>.c`:
Expand Down Expand Up @@ -87,4 +95,10 @@ void dip_switch_update_mask_user(uint32_t state) {

## Hardware

### Connects each switch in the dip switch to the GPIO pin of the MCU

One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.

### Connect each switch in the DIP switch to an unused intersections in the key matrix.

As with the keyswitch, a diode and DIP switch connect the ROW line to the COL line.
2 changes: 1 addition & 1 deletion docs/feature_encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If your encoder's clockwise directions are incorrect, you can swap the A & B pad
#define ENCODER_DIRECTION_FLIP
```
Additionally, the resolution can be specified in the same file (the default & suggested is 4):
Additionally, the resolution, which defines how many pulses the encoder registers between each detent, can be defined with:
```c
#define ENCODER_RESOLUTION 4
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ These functions allow you to activate layers in various ways. Note that layers a

### Caveats :id=caveats

Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-16, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only.

Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.

Expand Down
89 changes: 46 additions & 43 deletions docs/feature_macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has

## The New Way: `SEND_STRING()` & `process_record_user`

Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`).
Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`).

Here is an example `keymap.c` for a two-key keyboard:

```c
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKBEST = SAFE_RANGE,
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;

}
return true;
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
}
return true;
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = {
{QMKBEST, KC_ESC}
}
[0] = {
{QMKBEST, KC_ESC},
// ...
},
};
```
Expand All @@ -49,42 +49,45 @@ You can do that by adding another keycode and adding another case to the switch
```c
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL,
MY_OTHER_MACRO
QMKBEST = SAFE_RANGE,
QMKURL,
MY_OTHER_MACRO,
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/\n");
} else {
// when keycode QMKURL is released
}
break;
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/\n");
} else {
// when keycode QMKURL is released
}
break;
case MY_OTHER_MACRO:
if (record->event.pressed) {
SEND_STRING(SS_LCTL("ac")); // selects all and copies
}
break;
}
return true;
if (record->event.pressed) {
SEND_STRING(SS_LCTL("ac")); // selects all and copies
}
break;
}
return true;
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = {
{MY_CUSTOM_MACRO, MY_OTHER_MACRO}
}
[0] = {
{MY_CUSTOM_MACRO, MY_OTHER_MACRO},
// ...
},
};
```

Expand Down
10 changes: 10 additions & 0 deletions docs/feature_ps2_mouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,13 @@ To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
#define PS2_MOUSE_DEBUG_HID
#define PS2_MOUSE_DEBUG_RAW
```
### Movement Hook :id=movement-hook
Process mouse movement in the keymap before it is sent to the host. Example
uses include filtering noise, adding acceleration, and automatically activating
a layer. To use, define the following function in your keymap:
```c
void ps2_mouse_moved_user(report_mouse_t *mouse_report);
```
11 changes: 10 additions & 1 deletion docs/feature_rgb_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,16 @@ All RGB keycodes are currently shared with the RGBLIGHT system:
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Full gradient scrolling left to right (uses the `RGB_MATRIX_CYCLE_LEFT_RIGHT` mode) |
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Full gradient spinning pinwheel around center of keyboard (uses `RGB_MATRIX_CYCLE_PINWHEEL` mode) |

* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
* `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system.

`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped.

!> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.

## RGB Matrix Effects :id=rgb-matrix-effects

Expand Down Expand Up @@ -385,6 +393,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
```

## EEPROM storage :id=eeprom-storage
Expand Down
4 changes: 4 additions & 0 deletions docs/feature_rgblight.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ Changing the **Value** sets the overall brightness.<br>
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |

!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.


## Configuration

Your RGB lighting can be configured by placing these `#define`s in your `config.h`:
Expand All @@ -76,6 +79,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|`RGBLIGHT_DISABLE_KEYCODES`|*not defined*|If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature|

## Effects and Animations

Expand Down
18 changes: 18 additions & 0 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ You can configure the firmware to read a pin on the controller to determine hand
This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
#### Handedness by Matrix Pin
You can configure the firmware to read key matrix pins on the controller to determine handedness. To do this, add the following to your `config.h` file:
```c
#define SPLIT_HAND_MATRIX_GRID D0, F1
```

The first pin is the output pin and the second is the input pin.

Some keyboards have unused intersections in the key matrix. This setting uses one of these unused intersections to determine the handness.

Normally, when a diode is connected to an intersection, it is judged to be left. If you add the following definition, it will be judged to be right.

```c
#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
```

#### Handedness by EEPROM

This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
Expand Down
Loading

0 comments on commit 0cf8305

Please sign in to comment.