Compare commits
No commits in common. "18596b85e9d280004204e1e5a4fc08c7f392e2ff" and "254c0f8de06ce2d421aa8e81f31273495cb4e07d" have entirely different histories.
18596b85e9
...
254c0f8de0
|
@ -1,7 +1,3 @@
|
||||||
# The docker container places firmware
|
|
||||||
# in this directory
|
|
||||||
output
|
output
|
||||||
|
|
||||||
# Secret information that shouldn't be
|
|
||||||
# added to git.
|
|
||||||
secrets.h
|
secrets.h
|
|
@ -1,6 +0,0 @@
|
||||||
[submodule "docker/qmk_cli"]
|
|
||||||
path = docker/qmk_cli
|
|
||||||
url = ssh://git@git.betalupi.com:33/QMK/qmk_cli.git
|
|
||||||
[submodule "docker/qmk_firmware"]
|
|
||||||
path = docker/qmk_firmware
|
|
||||||
url = ssh://git@git.betalupi.com:33/QMK/qmk_firmware.git
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
//"files.exclude": {
|
|
||||||
// "**/.build": true,
|
|
||||||
// "**/*.hex": true,
|
|
||||||
// "**/*.bin": true,
|
|
||||||
// "**/*.uf2": true
|
|
||||||
//},
|
|
||||||
"files.associations": {
|
|
||||||
"*.h": "c",
|
|
||||||
"*.c": "c",
|
|
||||||
"*.inc": "c",
|
|
||||||
"*.cpp": "cpp",
|
|
||||||
"*.hpp": "cpp",
|
|
||||||
"xstddef": "c",
|
|
||||||
"type_traits": "c",
|
|
||||||
"utility": "c",
|
|
||||||
"ranges": "c"
|
|
||||||
},
|
|
||||||
"C_Cpp.errorSquiggles": "disabled",
|
|
||||||
}
|
|
13
build.sh
13
build.sh
|
@ -1,18 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Uses the docker container defined in
|
# Uses the qmk container found here:
|
||||||
# the `docker` directory of this repo.
|
# https://git.betalupi.com/Mark/docker
|
||||||
# Run from the root directory of this repo.
|
|
||||||
|
|
||||||
# Targets in this repo:
|
|
||||||
# betalupi_ergodox:default
|
|
||||||
#
|
#
|
||||||
# Usage:
|
# Be careful, it may not be using the latest QMK.
|
||||||
# bash build.sh betalupi_ergodox:default
|
|
||||||
|
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
--user $(id -u):$(id -g) \
|
--user $(id -u):$(id -g) \
|
||||||
-v "$(pwd)/output:/build_output" \
|
-v "$(pwd)/output:/build_output" \
|
||||||
-v "$(pwd)/keyboards:/qmk_firmware/keyboards:ro" \
|
-v "$(pwd)/keyboards:/qmk_firmware/keyboards:ro" \
|
||||||
-e QMK_TARGET="$1" \
|
-e QMK_TARGET="betalupi_ergodox:default" \
|
||||||
git.betalupi.com/mark/qmk
|
git.betalupi.com/mark/qmk
|
|
@ -1,15 +0,0 @@
|
||||||
root = false
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[qmk_cli/*]
|
|
||||||
indent_style = space
|
|
||||||
|
|
||||||
[qmk_firmware/*]
|
|
||||||
indent_style = space
|
|
|
@ -1,83 +0,0 @@
|
||||||
## Build qmk-cli
|
|
||||||
FROM python:3.8-slim-buster AS qmk_cli_builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY qmk_cli .
|
|
||||||
RUN pip3 install build
|
|
||||||
RUN python3 -m build
|
|
||||||
|
|
||||||
|
|
||||||
## Base container
|
|
||||||
FROM debian:11-slim
|
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install --no-install-recommends -y \
|
|
||||||
avrdude \
|
|
||||||
binutils-arm-none-eabi \
|
|
||||||
binutils-riscv64-unknown-elf \
|
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
|
||||||
clang-format-11 \
|
|
||||||
dfu-programmer \
|
|
||||||
dfu-util \
|
|
||||||
dos2unix \
|
|
||||||
ca-certificates \
|
|
||||||
gcc \
|
|
||||||
gcc-arm-none-eabi \
|
|
||||||
gcc-riscv64-unknown-elf \
|
|
||||||
git \
|
|
||||||
libfl2 \
|
|
||||||
libnewlib-arm-none-eabi \
|
|
||||||
picolibc-riscv64-unknown-elf \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
software-properties-common \
|
|
||||||
tar \
|
|
||||||
teensy-loader-cli \
|
|
||||||
unzip \
|
|
||||||
tar \
|
|
||||||
wget \
|
|
||||||
zip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install python packages
|
|
||||||
RUN python3 -m pip install --upgrade \
|
|
||||||
pip \
|
|
||||||
setuptools \
|
|
||||||
wheel \
|
|
||||||
nose2 \
|
|
||||||
yapf
|
|
||||||
|
|
||||||
# upgrade avr-gcc... for reasons?
|
|
||||||
RUN /bin/bash -c "set -o pipefail && \
|
|
||||||
wget -q https://github.com/ZakKemble/avr-gcc-build/releases/download/v8.3.0-1/avr-gcc-8.3.0-x64-linux.tar.bz2 -O - | tee /tmp/asdf.tar.bz2 | md5sum -c <(echo '588D0BEA4C5D21A1A06AA17625684417 -') && \
|
|
||||||
tar xfj /tmp/asdf.tar.bz2 --strip-components=1 -C / && \
|
|
||||||
rm -rf /share/ /tmp/*"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Install qmk-cli
|
|
||||||
COPY --from=qmk_cli_builder /app/dist /tmp/dist
|
|
||||||
RUN python3 -m pip install /tmp/dist/qmk-*.whl && \
|
|
||||||
rm -rf /tmp/dist
|
|
||||||
|
|
||||||
# Copy qmk repo.
|
|
||||||
# Make sure you've pulled submodules first!
|
|
||||||
COPY qmk_firmware /qmk_firmware
|
|
||||||
RUN chmod -R 777 /qmk_firmware
|
|
||||||
|
|
||||||
VOLUME /qmk_firmware/keyboards
|
|
||||||
VOLUME /build_output
|
|
||||||
WORKDIR /qmk_firmware
|
|
||||||
|
|
||||||
ENV SKIP_GIT true
|
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
CMD ["/bin/bash", "/entrypoint.sh"]
|
|
||||||
|
|
||||||
# How to use:
|
|
||||||
# docker run -it \
|
|
||||||
# --user 1000:1001 \
|
|
||||||
# -v "$(pwd)/kb:/qmk_firmware/keyboards" \
|
|
||||||
#
|
|
|
@ -1,24 +0,0 @@
|
||||||
# QMK Build Container
|
|
||||||
|
|
||||||
This container contains everything you need to build QMK, including a pinned version of QMK itself. **Be careful, this container may not use the latest version of QMK.**
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
This container takes two volumes:
|
|
||||||
- `/build_output`: QMK binaries are copied here.
|
|
||||||
- `/qmk_firmware/keyboards`: QMK keyboard dir. Link this to your code.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -it \
|
|
||||||
--user $(id -u):$(id -g) \
|
|
||||||
-v "$(pwd)/output:/build_output" \
|
|
||||||
-v "$(pwd)/kb:/qmk_firmware/keyboards:ro" \
|
|
||||||
-e QMK_TARGET="betalupi_ergodox:default" \
|
|
||||||
git.betalupi.com/mark/qmk
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
1. Before building, run `git submodule update --init --recursive`.
|
|
||||||
2. Checkout whatever version of `qmk_firmware` you need
|
|
||||||
3. Run `docker build . -t git.betalupi.com/mark/qmk`
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
if [[ -z "$QMK_TARGET" ]]; then
|
|
||||||
echo "You must provide a target to build!" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
make $QMK_TARGET
|
|
||||||
|
|
||||||
# Move output files to output directory.
|
|
||||||
# These are the only extensions qmk can produce,
|
|
||||||
# as far as I know.
|
|
||||||
mv *.{bin,hex,uf2} /build_output > /dev/null 2>&1
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit bb0094063183e31ce6a2d7a8ef73a00f67d89f1a
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b56c0fa67484b965f7efdbcc46e2e7c2571e367a
|
|
|
@ -181,7 +181,7 @@ void suspend_wakeup_init_kb(void) {
|
||||||
suspend_wakeup_init_user();
|
suspend_wakeup_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
//{driver, R location, G location, B location}
|
//{driver, R location, G location, B location}
|
||||||
|
|
||||||
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
{0, C3_1, C2_1, C4_1}, // LED1 on right
|
||||||
|
@ -476,7 +476,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
uint32_t layer_state_set_kb(uint32_t state) {
|
||||||
//uint8_t layer = biton32(state);
|
//uint8_t layer = biton32(state);
|
||||||
|
|
||||||
hid_send_state(
|
hid_send_state(
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
|
|
||||||
|
|
||||||
// USB parameters
|
// USB parameters
|
||||||
|
#define VENDOR_ID 0x3297 // ZSA Labs
|
||||||
|
#define PRODUCT_ID 0x4976 // Ergodox glow variant
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER Betalupi
|
||||||
|
#define PRODUCT Betalupi ErgoDox
|
||||||
|
#define WEBUSB_LANDING_PAGE_URL u8"betalupi.com"
|
||||||
#define USB_MAX_POWER_CONSUMPTION 500
|
#define USB_MAX_POWER_CONSUMPTION 500
|
||||||
#define USB_SUSPEND_WAKEUP_DELAY 0
|
#define USB_SUSPEND_WAKEUP_DELAY 0
|
||||||
|
|
||||||
|
@ -69,6 +75,7 @@
|
||||||
#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO)
|
#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// RGBLight (Underglow) config
|
// RGBLight (Underglow) config
|
||||||
#define RGBLED_NUM 8
|
#define RGBLED_NUM 8
|
||||||
#define RGB_DI_PIN D7
|
#define RGB_DI_PIN D7
|
||||||
|
@ -79,7 +86,7 @@
|
||||||
// Max brightness
|
// Max brightness
|
||||||
#define RGBLIGHT_LIMIT_VAL 200
|
#define RGBLIGHT_LIMIT_VAL 200
|
||||||
|
|
||||||
#define RGBLIGHT_OFF_AT_START
|
//#define RGBLIGHT_OFF_AT_START
|
||||||
//#define RGBLIGHT_NO_EEPROM
|
//#define RGBLIGHT_NO_EEPROM
|
||||||
|
|
||||||
// Prevents RGB keycodes from affecting underglow.
|
// Prevents RGB keycodes from affecting underglow.
|
||||||
|
@ -100,7 +107,7 @@
|
||||||
#define DRIVER_COUNT 2
|
#define DRIVER_COUNT 2
|
||||||
#define DRIVER_1_LED_TOTAL 24
|
#define DRIVER_1_LED_TOTAL 24
|
||||||
#define DRIVER_2_LED_TOTAL 24
|
#define DRIVER_2_LED_TOTAL 24
|
||||||
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||||
|
|
||||||
#define RGB_MATRIX_HUE_STEP 10
|
#define RGB_MATRIX_HUE_STEP 10
|
||||||
#define RGB_MATRIX_SAT_STEP 16
|
#define RGB_MATRIX_SAT_STEP 16
|
||||||
|
|
|
@ -1,114 +1,104 @@
|
||||||
{
|
{
|
||||||
"keyboard_name": "Betalupi ErgoDox",
|
"keyboard_name": "Betalupi ErgoDox",
|
||||||
"url": "betalupi.com",
|
"url": "betalupi.com",
|
||||||
"maintainer": "mark@betalupi",
|
"maintainer": "mark@betalupi",
|
||||||
"manufacturer": "Betalupi",
|
"width": 17,
|
||||||
|
"height": 8,
|
||||||
|
|
||||||
"usb": {
|
"layouts": {
|
||||||
// ZSA Labs
|
"LAYOUT_ergodox": {
|
||||||
"vid": "0x3297",
|
"layout": [
|
||||||
// Ergodox glow variant
|
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
||||||
"pid": "0x4976",
|
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
||||||
"device_version": "1.0.0"
|
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
||||||
},
|
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
||||||
|
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
||||||
|
|
||||||
"width": 17,
|
{"x":6, "y":5}, {"x":7, "y":5},
|
||||||
"height": 8,
|
{"x":7, "y":6},
|
||||||
|
{"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
|
||||||
"layouts": {
|
|
||||||
"LAYOUT_ergodox": {
|
|
||||||
"layout": [
|
|
||||||
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
|
||||||
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
|
||||||
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
|
||||||
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
|
||||||
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
|
||||||
|
|
||||||
{"x":6, "y":5}, {"x":7, "y":5},
|
|
||||||
{"x":7, "y":6},
|
|
||||||
{"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
|
|
||||||
|
|
||||||
|
|
||||||
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
||||||
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
||||||
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
||||||
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
||||||
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
||||||
|
|
||||||
|
|
||||||
{"x":9, "y":5}, {"x":10, "y":5},
|
{"x":9, "y":5}, {"x":10, "y":5},
|
||||||
{"x":9, "y":6},
|
{"x":9, "y":6},
|
||||||
{"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
|
{"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_ergodox_pretty": {
|
"LAYOUT_ergodox_pretty": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
||||||
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
||||||
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
||||||
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
||||||
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
||||||
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
||||||
|
|
||||||
{"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
|
{"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
|
||||||
{"x":7, "y":6}, {"x":9, "y":6},
|
{"x":7, "y":6}, {"x":9, "y":6},
|
||||||
{"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
|
{"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_ergodox_80": {
|
"LAYOUT_ergodox_80": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
||||||
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
||||||
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
||||||
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
||||||
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
||||||
|
|
||||||
{"x":6, "y":5}, {"x":7, "y":5},
|
{"x":6, "y":5}, {"x":7, "y":5},
|
||||||
{"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6},
|
{"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6},
|
||||||
{"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7},
|
{"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7},
|
||||||
|
|
||||||
|
|
||||||
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
||||||
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
||||||
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
||||||
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
||||||
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
||||||
|
|
||||||
|
|
||||||
{"x":9, "y":5}, {"x":10, "y":5},
|
{"x":9, "y":5}, {"x":10, "y":5},
|
||||||
{"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
|
{"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
|
||||||
{"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
|
{"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_ergodox_pretty_80": {
|
"LAYOUT_ergodox_pretty_80": {
|
||||||
"layout": [
|
"layout": [
|
||||||
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
{"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
|
||||||
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
{"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
{"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
|
||||||
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
{"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
{"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
|
||||||
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
{"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
{"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
|
||||||
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
{"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
|
||||||
|
|
||||||
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
{"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
|
||||||
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
{"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
|
||||||
|
|
||||||
{"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
|
{"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
|
||||||
{"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
|
{"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
|
||||||
{"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
|
{"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,77 +1,25 @@
|
||||||
#include QMK_KEYBOARD_H
|
#include "keymap.h"
|
||||||
#include "version.h"
|
#include "layers/layers.h"
|
||||||
#include "keymap_russian.h"
|
|
||||||
#include "keymap_us_international.h"
|
|
||||||
|
|
||||||
|
|
||||||
// Values that should not be saved to git.
|
|
||||||
// There should be a`secrets.h` in this directory
|
|
||||||
// with the following contents:
|
|
||||||
//
|
|
||||||
// #define SECRET_EMAIL "value"
|
|
||||||
// #define SECRET_GMAIL "value"
|
|
||||||
// #define SECRET_SCHOOL_EMAIL "value"
|
|
||||||
#include "secrets.h"
|
|
||||||
|
|
||||||
// Macro keycodes
|
|
||||||
enum custom_keycodes {
|
|
||||||
M_SHUTDOWN = BETA_SAFE_RANGE,
|
|
||||||
|
|
||||||
// Macros
|
|
||||||
M_RESETWM,
|
|
||||||
M_RU_CTRL,
|
|
||||||
M_RU_ALT,
|
|
||||||
|
|
||||||
// Special characters.
|
|
||||||
// M_SPECIAL_TOP and M_SPECIAL_BOTTOM are
|
|
||||||
// bounds used to parse these. Only special
|
|
||||||
// characters should be between them.
|
|
||||||
//
|
|
||||||
// Сharacters here should be in the same
|
|
||||||
// order as they are in the host inteface.
|
|
||||||
M_SPECIAL_TOP,
|
|
||||||
M_SC_GRAVE,
|
|
||||||
M_SC_TILD,
|
|
||||||
M_SC_QUOT,
|
|
||||||
M_SC_LBR,
|
|
||||||
M_SC_RBR,
|
|
||||||
M_SC_LCBR,
|
|
||||||
M_SC_RCBR,
|
|
||||||
M_SC_LKVCH,
|
|
||||||
M_SC_RKVCH,
|
|
||||||
M_SPECIAL_BOTTOM
|
|
||||||
};
|
|
||||||
|
|
||||||
// Tapdance keycodes
|
|
||||||
enum tap_dance_codes {
|
|
||||||
TD_WMLAYOUT,
|
|
||||||
TD_SCREENSHOT,
|
|
||||||
TD_OCR
|
|
||||||
};
|
|
||||||
|
|
||||||
// LED colors
|
|
||||||
#define LC_OFF LC_HSV( 0, 0, 0)
|
|
||||||
#define LC_GREEN LC_HSV( 85, 203, 158)
|
|
||||||
#define LC_YELLOW LC_HSV( 32, 176, 255)
|
|
||||||
#define LC_PINK LC_HSV(243, 222, 234)
|
|
||||||
#define LC_CYAN LC_HSV(134, 255, 213)
|
|
||||||
#define LC_ORANGE LC_HSV( 14, 255, 255)
|
|
||||||
#define LC_WHITE LC_HSV( 0, 0, 150)
|
|
||||||
|
|
||||||
#define LC_RU_B LC_HSV( 0, 0, 165)
|
|
||||||
#define LC_RU_G LC_HSV(153, 255, 153)
|
|
||||||
#define LC_RU_K LC_HSV( 0, 255, 145)
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_HID_SPELLCHECK
|
#ifdef ENABLE_HID_SPELLCHECK
|
||||||
#include "features/hid_spellcheck.h"
|
#include "features/hid_spellcheck.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "features/beta_rawhid.h"
|
||||||
|
|
||||||
#ifdef ENABLE_AUTOCORRECT
|
#ifdef ENABLE_AUTOCORRECT
|
||||||
#include "features/autocorrect/autocorrect.h"
|
#include "features/autocorrect/autocorrect.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "features/beta_rawhid.h"
|
// Values that should not be saved to git.
|
||||||
|
// Create a `secrets.h` in the keymap directory.
|
||||||
|
//
|
||||||
|
// It should contain the following:
|
||||||
|
// #define SECRET_EMAIL "val"
|
||||||
|
// #define SECRET_GMAIL "val"
|
||||||
|
// #define SECRET_SCHOOL_EMAIL "val"
|
||||||
|
#include "secrets.h"
|
||||||
|
|
||||||
|
|
||||||
// Send a special character.
|
// Send a special character.
|
||||||
// Returns false if character was caught, true otherwise.
|
// Returns false if character was caught, true otherwise.
|
||||||
|
@ -83,13 +31,42 @@ bool send_special_character(uint16_t keycode) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
void leader_start(void) { ergodox_right_led_3_on(); }
|
||||||
|
void leader_end(void) { ergodox_right_led_3_off(); }
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
// Include all other parts of configuration
|
SEQ_TWO_KEYS(KC_E, KC_M) {
|
||||||
#include "layers/layers.c"
|
SEND_STRING(SECRET_EMAIL);
|
||||||
#include "parts/leader.c"
|
}
|
||||||
#include "parts/tapdance.c"
|
|
||||||
|
SEQ_TWO_KEYS(KC_G, KC_M) {
|
||||||
|
SEND_STRING(SECRET_GMAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_L, KC_I) {
|
||||||
|
SEND_STRING(SECRET_SCHOOL_EMAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_P, KC_L) {
|
||||||
|
layer_move(LAYER_PLAIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
//SEQ_ONE_KEY(KC_F) {}
|
||||||
|
//
|
||||||
|
//SEQ_TWO_KEYS(KC_A, KC_S) {
|
||||||
|
// register_code(KC_LGUI);
|
||||||
|
// register_code(KC_S);
|
||||||
|
// unregister_code(KC_S);
|
||||||
|
// unregister_code(KC_LGUI);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Process macros.
|
|
||||||
// Return FALSE to halt key processing,
|
// Return FALSE to halt key processing,
|
||||||
// Return TRUE to allow QMK to handle keypress.
|
// Return TRUE to allow QMK to handle keypress.
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
@ -124,9 +101,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
case M_RU_CTRL:
|
case M_RU_CTRL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_move(LAYER_MAIN);
|
layer_move(LAYER_MAIN);
|
||||||
register_code16(KC_LCTL);
|
register_code16(KC_LCTRL);
|
||||||
} else {
|
} else {
|
||||||
unregister_code16(KC_LCTL);
|
unregister_code16(KC_LCTRL);
|
||||||
layer_move(LAYER_RUSSIAN);
|
layer_move(LAYER_RUSSIAN);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -144,4 +121,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "betalupi_ergodox.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "keymap_russian.h"
|
||||||
|
#include "keymap_us_international.h"
|
||||||
|
|
||||||
|
#include "tapdance/tapdance.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
|
// LED colors, in HSV.
|
||||||
|
#define LC_OFF LC_HSV( 0, 0, 0)
|
||||||
|
#define LC_GREEN LC_HSV( 85, 203, 158)
|
||||||
|
#define LC_YELLOW LC_HSV( 32, 176, 255)
|
||||||
|
#define LC_PINK LC_HSV(243, 222, 234)
|
||||||
|
#define LC_CYAN LC_HSV(134, 255, 213)
|
||||||
|
#define LC_ORANGE LC_HSV( 14, 255, 255)
|
||||||
|
#define LC_WHITE LC_HSV( 0, 0, 150)
|
||||||
|
|
||||||
|
#define LC_RU_B LC_HSV( 0, 0, 165)
|
||||||
|
#define LC_RU_G LC_HSV(153, 255, 153)
|
||||||
|
#define LC_RU_K LC_HSV( 0, 255, 145)
|
||||||
|
|
||||||
|
// Define custom keys
|
||||||
|
// (Must be done before keymaps are loaded)
|
||||||
|
enum custom_keycodes {
|
||||||
|
M_SHUTDOWN = BETA_SAFE_RANGE,
|
||||||
|
|
||||||
|
// Macros
|
||||||
|
M_RESETWM,
|
||||||
|
M_RU_CTRL,
|
||||||
|
M_RU_ALT,
|
||||||
|
|
||||||
|
// Special characters.
|
||||||
|
// M_SPECIAL_TOP and M_SPECIAL_BOTTOM are
|
||||||
|
// bounds used to parse these. Only special
|
||||||
|
// characters should be between them.
|
||||||
|
//
|
||||||
|
// Сharacters here should be in the same
|
||||||
|
// order as they are in the host inteface.
|
||||||
|
M_SPECIAL_TOP,
|
||||||
|
M_SC_GRAVE,
|
||||||
|
M_SC_TILD,
|
||||||
|
M_SC_QUOT,
|
||||||
|
M_SC_LBR,
|
||||||
|
M_SC_RBR,
|
||||||
|
M_SC_LCBR,
|
||||||
|
M_SC_RCBR,
|
||||||
|
M_SC_LKVCH,
|
||||||
|
M_SC_RKVCH,
|
||||||
|
M_SPECIAL_BOTTOM
|
||||||
|
};
|
|
@ -11,8 +11,8 @@
|
||||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||||
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
KC_TRANSPARENT, LGUI(LCTL(KC_ENTER)), KC_NO, KC_UP, KC_NO, KC_PGUP, KC_TRANSPARENT,\
|
KC_TRANSPARENT, LGUI(LCTL(KC_ENTER)), KC_NO, KC_UP, KC_NO, KC_PGUP, KC_TRANSPARENT,\
|
||||||
KC_LGUI, LALT(KC_LCTL), KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,\
|
KC_LGUI, LALT(KC_LCTRL), KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,\
|
||||||
KC_TRANSPARENT, LGUI(KC_LCTL), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
|
KC_TRANSPARENT, LGUI(KC_LCTRL), KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,\
|
||||||
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
|
KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT,\
|
||||||
\
|
\
|
||||||
KC_TRANSPARENT, KC_TRANSPARENT,\
|
KC_TRANSPARENT, KC_TRANSPARENT,\
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
#ifdef BETA_LAYER_KEYS
|
#ifdef BETA_LAYER_KEYS
|
||||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||||
KC_TRANSPARENT, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), TO(LAYER_MAIN),\
|
KC_TRANSPARENT, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), TO(LAYER_MAIN),\
|
||||||
KC_NO, KC_NO, LGUI(LCTL(KC_ENTER)), KC_NO, KC_NO, LGUI(KC_T), KC_NO,\
|
KC_NO, KC_NO, LGUI(LCTL(KC_ENTER)), KC_NO, KC_NO, LGUI(KC_T), LGUI(KC_ENTER),\
|
||||||
KC_NO, LGUI(KC_EQL), LGUI(KC_MINUS), KC_NO, LGUI(KC_F), LGUI(KC_G),\
|
KC_NO, LGUI(KC_EQL), LGUI(KC_MINUS), KC_NO, LGUI(KC_F), LGUI(KC_G),\
|
||||||
KC_NO, KC_NO, KC_NO, LGUI(LSFT(KC_C)), LGUI(KC_N), LGUI(KC_M), KC_NO,\
|
KC_NO, KC_NO, KC_NO, LGUI(LSFT(KC_C)), LGUI(KC_N), LGUI(KC_M), LGUI(KC_BSLASH),\
|
||||||
TO(LAYER_MAIN), KC_NO, KC_NO, KC_NO, KC_NO,\
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
\
|
\
|
||||||
KC_NO, M_RESETWM,\
|
KC_NO, M_RESETWM,\
|
||||||
KC_NO,\
|
KC_NO,\
|
||||||
LGUI(KC_ENTER), LGUI(KC_BSLS), KC_NO,\
|
KC_NO, KC_NO, TO(LAYER_MAIN),\
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
M_SHUTDOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
M_SHUTDOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
\
|
\
|
||||||
KC_NO, RGB_TOG,\
|
KC_NO, RGB_TOG,\
|
||||||
KC_NO,\
|
KC_NO,\
|
||||||
QK_BOOTLOADER, KC_NO, KC_NO\
|
RESET, KC_NO, KC_NO\
|
||||||
)
|
)
|
||||||
|
|
||||||
BETA_LAYER_MAGIC_MACRO
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
|
|
||||||
#ifdef BETA_LAYER_KEYS
|
#ifdef BETA_LAYER_KEYS
|
||||||
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
#define BETA_LAYER_CONTEXT_DATA LAYOUT_ergodox(\
|
||||||
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, TO(LAYER_NUMPAD),\
|
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(LAYER_DESKTOP),\
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,\
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,\
|
||||||
KC_DELETE, KC_A, KC_S, KC_D, KC_F, KC_G,\
|
KC_DELETE, KC_A, KC_S, KC_D, KC_F, KC_G,\
|
||||||
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT,\
|
KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, TO(LAYER_NUMPAD),\
|
||||||
OSL(LAYER_DESKTOP), KC_NO, KC_NO, KC_LSFT, MO(LAYER_ARROWS),\
|
KC_LALT, KC_NO, KC_NO, KC_LSHIFT, MO(LAYER_ARROWS),\
|
||||||
\
|
\
|
||||||
TD(TD_SCREENSHOT), TD(TD_OCR),\
|
TD(TD_SCREENSHOT), TD(TD_OCR),\
|
||||||
TD(TD_WMLAYOUT),\
|
TD(TD_WMLAYOUT),\
|
||||||
KC_SPACE, KC_BSPC, KC_NO,\
|
KC_SPACE, KC_BSPACE, OSL(LAYER_DESKTOP),\
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_TAB),\
|
KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_TAB),\
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
\
|
\
|
||||||
KC_LNG1, KC_LNG2,\
|
KC_LNG1, KC_LNG2,\
|
||||||
KC_LNG3,\
|
KC_LNG3,\
|
||||||
TO(LAYER_RUSSIAN), KC_RSFT, KC_ENTER\
|
TO(LAYER_RUSSIAN), KC_RSHIFT, KC_ENTER\
|
||||||
)
|
)
|
||||||
|
|
||||||
BETA_LAYER_MAGIC_MACRO
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
|
|
@ -12,12 +12,12 @@
|
||||||
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PSCR,\
|
KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PSCR,\
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,\
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI,\
|
||||||
KC_DELETE, KC_A, KC_S, KC_D, KC_F, KC_G,\
|
KC_DELETE, KC_A, KC_S, KC_D, KC_F, KC_G,\
|
||||||
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,\
|
KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,\
|
||||||
KC_LALT, KC_NO, KC_NO, KC_LSFT, MO(LAYER_ARROWS),\
|
KC_LALT, KC_NO, KC_NO, KC_LSHIFT, MO(LAYER_ARROWS),\
|
||||||
\
|
\
|
||||||
KC_F1, KC_F2,\
|
KC_F1, KC_F2,\
|
||||||
KC_F3,\
|
KC_F3,\
|
||||||
KC_SPACE, KC_BSPC, KC_F4,\
|
KC_SPACE, KC_BSPACE, KC_F4,\
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
KC_SCRL, KC_6, KC_7, KC_8, KC_9, KC_0, TO(LAYER_MAIN),\
|
KC_SCRL, KC_6, KC_7, KC_8, KC_9, KC_0, TO(LAYER_MAIN),\
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
\
|
\
|
||||||
KC_F7, KC_F8,\
|
KC_F7, KC_F8,\
|
||||||
KC_F6,\
|
KC_F6,\
|
||||||
KC_F5, KC_RSFT, KC_ENTER\
|
KC_F5, KC_RSHIFT, KC_ENTER\
|
||||||
)
|
)
|
||||||
|
|
||||||
BETA_LAYER_MAGIC_MACRO
|
BETA_LAYER_MAGIC_MACRO
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO,\
|
KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO,\
|
||||||
KC_NO, KC_GRAVE, KC_LPRN, KC_RPRN, KC_QUES, KC_LCBR, KC_TRNS,\
|
KC_NO, KC_GRAVE, KC_LPRN, KC_RPRN, KC_QUES, KC_LCBR, KC_TRNS,\
|
||||||
KC_NO, KC_TILD, KC_QUOTE, KC_COMMA, KC_DOT, KC_DQUO,\
|
KC_NO, KC_TILD, KC_QUOTE, KC_COMMA, KC_DOT, KC_DQUO,\
|
||||||
KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_EXLM, KC_RCBR, KC_NO,\
|
KC_NO, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_EXLM, KC_RCBR, KC_NO,\
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
\
|
\
|
||||||
KC_NO, KC_NO,\
|
KC_NO, KC_NO,\
|
||||||
|
@ -48,9 +48,9 @@
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO,\
|
KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO,\
|
||||||
KC_NO, KC_LABK, KC_RABK, KC_SLASH, KC_NO, KC_BSLS, KC_NO,\
|
KC_NO, KC_LABK, KC_RABK, KC_SLASH, KC_NO, KC_BSLASH, KC_NO,\
|
||||||
KC_UNDS, KC_MINUS, KC_COLN, KC_TRANSPARENT, KC_PIPE, KC_NO,\
|
KC_UNDS, KC_MINUS, KC_COLN, KC_TRANSPARENT, KC_PIPE, KC_NO,\
|
||||||
KC_NO, KC_EQUAL, KC_PLUS, KC_SCLN, KC_NO, KC_NO, KC_NO,\
|
KC_NO, KC_EQUAL, KC_PLUS, KC_SCOLON, KC_NO, KC_NO, KC_NO,\
|
||||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||||
\
|
\
|
||||||
KC_NO, KC_NO,\
|
KC_NO, KC_NO,\
|
||||||
|
|
|
@ -1,39 +1,5 @@
|
||||||
|
#include "layers.h"
|
||||||
#include "extra_mappings.h"
|
#include "extra_mappings.h"
|
||||||
#define LAYER_INCLUDE_FILE "definitions/layers.inc"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Setup
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Generate layer ids
|
|
||||||
#define BETA_LAYER_KEYS
|
|
||||||
#define BETA_LAYER(name) LAYER_##name,
|
|
||||||
enum layer_indices {
|
|
||||||
#include LAYER_INCLUDE_FILE
|
|
||||||
X_LAYER_MAX
|
|
||||||
};
|
|
||||||
#undef BETA_LAYER
|
|
||||||
#undef BETA_LAYER_KEYS
|
|
||||||
|
|
||||||
|
|
||||||
// Generate RGBMatrix ids
|
|
||||||
// We don't use the same id for layers and layer colors
|
|
||||||
// to save memory. Not every layer has colors!
|
|
||||||
#define BETA_LAYER_LEDS
|
|
||||||
#define BETA_LAYER(name) LAYER_##name##_LEDS,
|
|
||||||
enum led_indices {
|
|
||||||
#include LAYER_INCLUDE_FILE
|
|
||||||
X_LAYER_LEDS_MAX
|
|
||||||
};
|
|
||||||
#undef BETA_LAYER
|
|
||||||
#undef BETA_LAYER_LEDS
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Load layers
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Create keymap array
|
// Create keymap array
|
||||||
#define BETA_LAYER_KEYS
|
#define BETA_LAYER_KEYS
|
||||||
|
@ -48,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
// Create led map array
|
// Create led map array
|
||||||
#define BETA_LAYER_LEDS
|
#define BETA_LAYER_LEDS
|
||||||
#define BETA_LAYER(name) [LAYER_##name##_LEDS] = BETA_LAYER_CONTEXT_DATA,
|
#define BETA_LAYER(name) [LAYER_##name##_LEDS] = BETA_LAYER_CONTEXT_DATA,
|
||||||
const uint8_t PROGMEM ledmaps[][RGB_MATRIX_LED_COUNT][3] = {
|
const uint8_t PROGMEM ledmaps[][DRIVER_LED_TOTAL][3] = {
|
||||||
#include LAYER_INCLUDE_FILE
|
#include LAYER_INCLUDE_FILE
|
||||||
};
|
};
|
||||||
#undef BETA_LAYER
|
#undef BETA_LAYER
|
||||||
|
@ -65,7 +31,7 @@ uint8_t layer_layouts[] = {
|
||||||
|
|
||||||
|
|
||||||
void set_layer_color(int layer) {
|
void set_layer_color(int layer) {
|
||||||
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
HSV hsv = {
|
HSV hsv = {
|
||||||
.h = pgm_read_byte(&ledmaps[layer][i][0]),
|
.h = pgm_read_byte(&ledmaps[layer][i][0]),
|
||||||
.s = pgm_read_byte(&ledmaps[layer][i][1]),
|
.s = pgm_read_byte(&ledmaps[layer][i][1]),
|
||||||
|
@ -83,9 +49,9 @@ void set_layer_color(int layer) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool rgb_matrix_indicators_user(void) {
|
void rgb_matrix_indicators_user(void) {
|
||||||
if (keyboard_config.disable_layer_led) {
|
if (keyboard_config.disable_layer_led) {
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
|
@ -108,13 +74,11 @@ bool rgb_matrix_indicators_user(void) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
uint8_t layer = biton32(state);
|
uint8_t layer = biton32(state);
|
||||||
|
|
||||||
ergodox_board_led_off();
|
ergodox_board_led_off();
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
// This header declares custom keycodes
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
#define LAYER_INCLUDE_FILE "definitions/layers.inc"
|
||||||
|
|
||||||
|
// Generate layer ids
|
||||||
|
#define BETA_LAYER_KEYS
|
||||||
|
#define BETA_LAYER(name) LAYER_##name,
|
||||||
|
enum layer_indices {
|
||||||
|
#include LAYER_INCLUDE_FILE
|
||||||
|
X_LAYER_MAX
|
||||||
|
};
|
||||||
|
#undef BETA_LAYER
|
||||||
|
#undef BETA_LAYER_KEYS
|
||||||
|
|
||||||
|
|
||||||
|
// Generate RGBMatrix ids
|
||||||
|
// We don't use the same id for layers and layer colors
|
||||||
|
// to save memory. Not every layer has colors!
|
||||||
|
#define BETA_LAYER_LEDS
|
||||||
|
#define BETA_LAYER(name) LAYER_##name##_LEDS,
|
||||||
|
enum led_indices {
|
||||||
|
#include LAYER_INCLUDE_FILE
|
||||||
|
X_LAYER_LEDS_MAX
|
||||||
|
};
|
||||||
|
#undef BETA_LAYER
|
||||||
|
#undef BETA_LAYER_LEDS
|
||||||
|
|
||||||
|
|
||||||
|
// We don't need these in the header,
|
||||||
|
// they shouldn't be used anywhere else.
|
||||||
|
//const uint16_t PROGMEM keymaps[X_LAYER_MAX][MATRIX_ROWS][MATRIX_COLS];
|
||||||
|
//const uint8_t PROGMEM ledmaps[X_LAYER_LEDS_MAX][DRIVER_LED_TOTAL][3];
|
||||||
|
|
||||||
|
extern uint8_t layer_layouts[];
|
||||||
|
|
||||||
|
void set_layer_color(int layer); // Helper method
|
||||||
|
void rgb_matrix_indicators_user(void); // QMK method
|
||||||
|
uint32_t layer_state_set_user(uint32_t state); // QMK method
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
LEADER_EXTERNS();
|
|
||||||
void leader_start(void) { ergodox_right_led_3_on(); }
|
|
||||||
void leader_end(void) { ergodox_right_led_3_off(); }
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
LEADER_DICTIONARY() {
|
|
||||||
leading = false;
|
|
||||||
leader_end();
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS(KC_E, KC_M) {
|
|
||||||
SEND_STRING(SECRET_EMAIL);
|
|
||||||
}
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS(KC_G, KC_M) {
|
|
||||||
SEND_STRING(SECRET_GMAIL);
|
|
||||||
}
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS(KC_L, KC_I) {
|
|
||||||
SEND_STRING(SECRET_SCHOOL_EMAIL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS(KC_P, KC_L) {
|
|
||||||
layer_move(LAYER_PLAIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
//SEQ_ONE_KEY(KC_F) {}
|
|
||||||
//
|
|
||||||
//SEQ_TWO_KEYS(KC_A, KC_S) {
|
|
||||||
// register_code(KC_LGUI);
|
|
||||||
// register_code(KC_S);
|
|
||||||
// unregister_code(KC_S);
|
|
||||||
// unregister_code(KC_LGUI);
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,3 +2,7 @@
|
||||||
|
|
||||||
LEADER_ENABLE = yes
|
LEADER_ENABLE = yes
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += \
|
||||||
|
tapdance/tapdance.c \
|
||||||
|
layers/layers.c
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
|
#include "keymap.h"
|
||||||
|
#include "tapdance.h"
|
||||||
|
|
||||||
void td_screenshot(qk_tap_dance_state_t *state, void *user_data) {
|
void td_screenshot(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
tap_code16(KC_PSCR);
|
tap_code16(KC_PSCREEN);
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
tap_code16(LSFT(KC_PSCR));
|
tap_code16(LSFT(KC_PSCREEN));
|
||||||
} else if (state->count == 3) {
|
} else if (state->count == 3) {
|
||||||
tap_code16(LALT(KC_PSCR));
|
tap_code16(LALT(KC_PSCREEN));
|
||||||
} else {
|
} else {
|
||||||
reset_tap_dance(state);
|
reset_tap_dance(state);
|
||||||
}
|
}
|
||||||
|
@ -12,9 +15,9 @@ void td_screenshot(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
|
||||||
void td_ocr(qk_tap_dance_state_t *state, void *user_data) {
|
void td_ocr(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) {
|
if (state->count == 1) {
|
||||||
tap_code16(LCTL(KC_PSCR));
|
tap_code16(LCTL(KC_PSCREEN));
|
||||||
} else if (state->count == 2) {
|
} else if (state->count == 2) {
|
||||||
tap_code16(LCTL(LSFT(KC_PSCR)));
|
tap_code16(LCTL(LSFT(KC_PSCREEN)));
|
||||||
} else {
|
} else {
|
||||||
reset_tap_dance(state);
|
reset_tap_dance(state);
|
||||||
}
|
}
|
||||||
|
@ -30,8 +33,10 @@ void td_wmlayout(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN(td_wmlayout),
|
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN(td_wmlayout),
|
||||||
[TD_SCREENSHOT] = ACTION_TAP_DANCE_FN(td_screenshot),
|
[TD_SCREENSHOT] = ACTION_TAP_DANCE_FN(td_screenshot),
|
||||||
[TD_OCR] = ACTION_TAP_DANCE_FN(td_ocr),
|
[TD_OCR] = ACTION_TAP_DANCE_FN(td_ocr),
|
||||||
};
|
};
|
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
|
enum tap_dance_codes {
|
||||||
|
TD_WMLAYOUT,
|
||||||
|
TD_SCREENSHOT,
|
||||||
|
TD_OCR
|
||||||
|
};
|
||||||
|
|
||||||
|
void td_screenshot(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void td_ocr(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
void td_wmlayout(qk_tap_dance_state_t *state, void *user_data);
|
|
@ -1,3 +1,32 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Note for ErgoDox EZ customizers: Here be dragons!
|
||||||
|
This is not a file you want to be messing with.
|
||||||
|
All of the interesting stuff for you is under keymaps/ :)
|
||||||
|
Love, Erez
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||||
|
Copyright 2015 ZSA Technology Labs Inc (@zsa)
|
||||||
|
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* scan matrix
|
||||||
|
*/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
|
|
|
@ -3,18 +3,44 @@
|
||||||
This is a modified version of the [ZSA ErgoDox firmware](https://git.betalupi.com/mirrors-QMK/zsa_firmware), based on the `ergodox_ex/glow` keyboard.
|
This is a modified version of the [ZSA ErgoDox firmware](https://git.betalupi.com/mirrors-QMK/zsa_firmware), based on the `ergodox_ex/glow` keyboard.
|
||||||
|
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
- Layer switch cleanup
|
||||||
|
- Define indicator in keymap
|
||||||
|
- Define language in keymap
|
||||||
|
- Auto-switch all
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
# Setup
|
||||||
|
|
||||||
|
Clone this repo into `keyboards/betalupi_ergodox` in your qmk directory.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make betalupi_ergodox:default:flash
|
||||||
|
|
||||||
|
|
||||||
|
If you get array-bounds errors on build, you may have a bad avr-gcc version. Read [this issue](https://github.com/qmk/qmk_firmware/issues/17064), and try
|
||||||
|
|
||||||
|
AVR_CFLAGS="-Wno-array-bounds"
|
||||||
|
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
# Notes
|
# Notes
|
||||||
|
|
||||||
This keyboard adds a few extra options in `config.h`:
|
Custom configuration defines
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#define RGBLIGHT_OFF_AT_START
|
// Enable fft animation (requires RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||||
#define RGBLIGHT_NO_EEPROM
|
#def ENABLE_RGB_MATRIX_FFT_ANIM
|
||||||
#ifdef ENABLE_HID_SPELLCHECK
|
|
||||||
#ifdef ENABLE_AUTOCORRECT
|
// Enable spellcheck over hid (features/spellcheck)
|
||||||
|
#def ENABLE_SPELLCHECK
|
||||||
```
|
```
|
||||||
|
|
||||||
Also, there are a few custom kecodes defined in `betalupi_keyboard.c`. This allows us to control the rgb matrix and rgb lighting seperately---my keyboard has both.
|
Custom keycodes (betalupi_keyboard.c)
|
||||||
|
|
||||||
```
|
```
|
||||||
// Custom RGBLIGHT macros
|
// Custom RGBLIGHT macros
|
||||||
|
|
|
@ -28,12 +28,10 @@ UNICODE_ENABLE = no # Unicode
|
||||||
SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard
|
||||||
SLEEP_LED_ENABLE = no
|
SLEEP_LED_ENABLE = no
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
MOUSE_SHARED_EP = no
|
|
||||||
|
# Disable some unused qmk features
|
||||||
|
# to save space
|
||||||
MAGIC_ENABLE = no
|
MAGIC_ENABLE = no
|
||||||
LEADER_ENABLE = yes
|
|
||||||
TAP_DANCE_ENABLE = yes
|
|
||||||
AUDIO_SUPPORTED = no
|
|
||||||
BACKLIGHT_SUPPORTED = no
|
|
||||||
|
|
||||||
DEBOUNCE_TYPE = sym_eager_pr
|
DEBOUNCE_TYPE = sym_eager_pr
|
||||||
|
|
||||||
|
@ -56,6 +54,7 @@ LTO_ENABLE = yes
|
||||||
# Enable keyboard-specific effects
|
# Enable keyboard-specific effects
|
||||||
RGB_MATRIX_CUSTOM_KB = yes
|
RGB_MATRIX_CUSTOM_KB = yes
|
||||||
|
|
||||||
|
MOUSE_SHARED_EP = no
|
||||||
|
|
||||||
# FROM glow dir
|
# FROM glow dir
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
|
Loading…
Reference in New Issue