From 00a0c81f8ea0d0ae3e8fe794370e218a42f93800 Mon Sep 17 00:00:00 2001 From: Donald Kjer Date: Sat, 20 Mar 2021 17:11:22 -0700 Subject: Durgod keyboard refactor in preparation for adding additional durgod keyboards (#11978) * Durgod keyboard refactor in preparation for adding additional durgod keyboards * Moving Durgod board configuration into a common location * Reformatting layout macro whitespace * Moving TGUI key functionality to the keyboard level * Replacing default keymap.c with keymap.json * Changing default and default_toggle_mac_windows keymaps to LAYOUT_all * Increasing EEPROM size to support more VIA layers * Fixing media keys; KC_MRWD/KC_MFFD => KC_MPRV/KC_NXT * Move ISO Enter key to the correct row in Durgod K320 * Minor whitespace and readme cleanup for K320 * Changing durgod/k320 debounce back to default * Simplifying DURGOD_STM32_F070's chconf.h Co-authored-by: Simon Arlott Co-authored-by: Tyler Tidman --- keyboards/durgod/boards/DURGOD_STM32_F070/board.h | 22 + keyboards/durgod/boards/DURGOD_STM32_F070/board.mk | 12 + .../boards/DURGOD_STM32_F070/bootloader_defs.h | 7 + keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h | 28 + .../durgod/boards/DURGOD_STM32_F070/mcuconf.h | 176 +++ keyboards/durgod/k320/board.h | 23 - keyboards/durgod/k320/bootloader_defs.h | 7 - keyboards/durgod/k320/chconf.h | 43 - keyboards/durgod/k320/config.h | 39 +- keyboards/durgod/k320/info.json | 1186 +++++--------------- keyboards/durgod/k320/k320.c | 20 + keyboards/durgod/k320/k320.h | 31 +- keyboards/durgod/k320/keymaps/default/keymap.c | 95 -- keyboards/durgod/k320/keymaps/default/keymap.json | 26 + keyboards/durgod/k320/keymaps/default/readme.md | 4 +- keyboards/durgod/k320/keymaps/default_iso/keymap.c | 72 -- .../durgod/k320/keymaps/default_iso/readme.md | 7 - .../durgod/k320/keymaps/default_iso_mac/keymap.c | 71 -- .../durgod/k320/keymaps/default_iso_mac/readme.md | 6 - .../durgod/k320/keymaps/default_mac/keymap.json | 26 + .../durgod/k320/keymaps/default_mac/readme.md | 8 + .../keymaps/default_toggle_mac_windows/keymap.c | 108 +- .../keymaps/default_toggle_mac_windows/readme.md | 7 +- .../keymaps/default_toggle_mac_windows/rules.mk | 1 + keyboards/durgod/k320/keymaps/kuenhlee/keymap.c | 5 - keyboards/durgod/k320/keymaps/via/config.h | 20 - keyboards/durgod/k320/keymaps/via/keymap.c | 29 +- keyboards/durgod/k320/keymaps/via/readme.md | 2 +- keyboards/durgod/k320/keymaps/via/rules.mk | 2 + keyboards/durgod/k320/mcuconf.h | 176 --- keyboards/durgod/k320/readme.md | 5 +- keyboards/durgod/k320/rules.mk | 2 +- 32 files changed, 737 insertions(+), 1529 deletions(-) create mode 100644 keyboards/durgod/boards/DURGOD_STM32_F070/board.h create mode 100644 keyboards/durgod/boards/DURGOD_STM32_F070/board.mk create mode 100644 keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h create mode 100644 keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h create mode 100644 keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h delete mode 100644 keyboards/durgod/k320/board.h delete mode 100644 keyboards/durgod/k320/bootloader_defs.h delete mode 100644 keyboards/durgod/k320/chconf.h delete mode 100644 keyboards/durgod/k320/keymaps/default/keymap.c create mode 100644 keyboards/durgod/k320/keymaps/default/keymap.json delete mode 100644 keyboards/durgod/k320/keymaps/default_iso/keymap.c delete mode 100644 keyboards/durgod/k320/keymaps/default_iso/readme.md delete mode 100644 keyboards/durgod/k320/keymaps/default_iso_mac/keymap.c delete mode 100644 keyboards/durgod/k320/keymaps/default_iso_mac/readme.md create mode 100644 keyboards/durgod/k320/keymaps/default_mac/keymap.json create mode 100644 keyboards/durgod/k320/keymaps/default_mac/readme.md create mode 100644 keyboards/durgod/k320/keymaps/default_toggle_mac_windows/rules.mk delete mode 100644 keyboards/durgod/k320/keymaps/via/config.h delete mode 100644 keyboards/durgod/k320/mcuconf.h diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/board.h b/keyboards/durgod/boards/DURGOD_STM32_F070/board.h new file mode 100644 index 0000000000..2d04bccbd6 --- /dev/null +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/board.h @@ -0,0 +1,22 @@ +/* +Copyright 2021 Don Kjer + +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 . +*/ + +#pragma once + +#define STM32_HSECLK 12000000U +#include_next +#undef STM32_HSE_BYPASS diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/board.mk b/keyboards/durgod/boards/DURGOD_STM32_F070/board.mk new file mode 100644 index 0000000000..4791848333 --- /dev/null +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/board.mk @@ -0,0 +1,12 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F070RB/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F070RB + +# Include mcu configuration +EXTRAINCDIRS = $(BOARD_PATH)/boards/DURGOD_STM32_F070 + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h b/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h new file mode 100644 index 0000000000..02c48c4e6d --- /dev/null +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h new file mode 100644 index 0000000000..a7d95c51a9 --- /dev/null +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/durgod/k320/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_ST_TIMEDELTA 0 + +#include_next diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h new file mode 100644 index 0000000000..6d67aa96aa --- /dev/null +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 4 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_SYSCLK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_PCLK +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 3 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/durgod/k320/board.h b/keyboards/durgod/k320/board.h deleted file mode 100644 index 17d08b17f1..0000000000 --- a/keyboards/durgod/k320/board.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2021 Don Kjer - -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 . -*/ - -#pragma once - -#define STM32_HSECLK 12000000U -#include_next -#undef STM32_HSE_BYPASS - diff --git a/keyboards/durgod/k320/bootloader_defs.h b/keyboards/durgod/k320/bootloader_defs.h deleted file mode 100644 index 02c48c4e6d..0000000000 --- a/keyboards/durgod/k320/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/durgod/k320/chconf.h b/keyboards/durgod/k320/chconf.h deleted file mode 100644 index 374a030039..0000000000 --- a/keyboards/durgod/k320/chconf.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/durgod/k320/chconf.h -r platforms/chibios/common/configs/chconf.h` - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_ST_TIMEDELTA 0 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_REGISTRY TRUE - -#define CH_CFG_USE_WAITEXIT TRUE - -#define CH_CFG_USE_CONDVARS TRUE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#define CH_CFG_USE_MESSAGES TRUE - -#define CH_CFG_USE_MAILBOXES TRUE - -#include_next - diff --git a/keyboards/durgod/k320/config.h b/keyboards/durgod/k320/config.h index 70438900ee..323a9ccff9 100644 --- a/keyboards/durgod/k320/config.h +++ b/keyboards/durgod/k320/config.h @@ -1,19 +1,18 @@ -/* -Copyright 2021 kuenhlee and Don Kjer - -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 . -*/ +/* Copyright 2021 kuenhlee and Don Kjer + * + * 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 . + */ #pragma once @@ -36,8 +35,13 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL +// Dynamic EEPROM +// Something sensible or else VIA may crash +// Users may enable more if they wish +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 7 +#define DEBOUNCE 5 /* Bootmagic Lite key configuration */ #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE @@ -50,4 +54,3 @@ along with this program. If not, see . #define LED_WIN_LOCK_PIN A9 #define LED_MR_LOCK_PIN A10 #define LED_PIN_ON_STATE 0 - diff --git a/keyboards/durgod/k320/info.json b/keyboards/durgod/k320/info.json index 5e33d8fcd2..6c67c3d453 100644 --- a/keyboards/durgod/k320/info.json +++ b/keyboards/durgod/k320/info.json @@ -7,913 +7,293 @@ "layouts": { "LAYOUT_tkl_ansi": { "layout": [ - { - "label": "Esc", - "x": 0, - "y": 0 - }, - { - "label": "F1", - "x": 2, - "y": 0 - }, - { - "label": "F2", - "x": 3, - "y": 0 - }, - { - "label": "F3", - "x": 4, - "y": 0 - }, - { - "label": "F4", - "x": 5, - "y": 0 - }, - { - "label": "F5", - "x": 6.5, - "y": 0 - }, - { - "label": "F6", - "x": 7.5, - "y": 0 - }, - { - "label": "F7", - "x": 8.5, - "y": 0 - }, - { - "label": "F8", - "x": 9.5, - "y": 0 - }, - { - "label": "F9", - "x": 11, - "y": 0 - }, - { - "label": "F10", - "x": 12, - "y": 0 - }, - { - "label": "F11", - "x": 13, - "y": 0 - }, - { - "label": "F12", - "x": 14, - "y": 0 - }, - { - "label": "PrtSc", - "x": 15.25, - "y": 0 - }, - { - "label": "Scroll Lock", - "x": 16.25, - "y": 0 - }, - { - "label": "Pause", - "x": 17.25, - "y": 0 - }, - { - "label": "~", - "x": 0, - "y": 1.5 - }, - { - "label": "!", - "x": 1, - "y": 1.5 - }, - { - "label": "@", - "x": 2, - "y": 1.5 - }, - { - "label": "#", - "x": 3, - "y": 1.5 - }, - { - "label": "$", - "x": 4, - "y": 1.5 - }, - { - "label": "%", - "x": 5, - "y": 1.5 - }, - { - "label": "^", - "x": 6, - "y": 1.5 - }, - { - "label": "&", - "x": 7, - "y": 1.5 - }, - { - "label": "*", - "x": 8, - "y": 1.5 - }, - { - "label": "(", - "x": 9, - "y": 1.5 - }, - { - "label": ")", - "x": 10, - "y": 1.5 - }, - { - "label": "_", - "x": 11, - "y": 1.5 - }, - { - "label": "+", - "x": 12, - "y": 1.5 - }, - { - "label": "Backspace", - "x": 13, - "y": 1.5, - "w": 2 - }, - { - "label": "Insert", - "x": 15.25, - "y": 1.5 - }, - { - "label": "Home", - "x": 16.25, - "y": 1.5 - }, - { - "label": "PgUp", - "x": 17.25, - "y": 1.5 - }, - { - "label": "Tab", - "x": 0, - "y": 2.5, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 2.5 - }, - { - "label": "W", - "x": 2.5, - "y": 2.5 - }, - { - "label": "E", - "x": 3.5, - "y": 2.5 - }, - { - "label": "R", - "x": 4.5, - "y": 2.5 - }, - { - "label": "T", - "x": 5.5, - "y": 2.5 - }, - { - "label": "Y", - "x": 6.5, - "y": 2.5 - }, - { - "label": "U", - "x": 7.5, - "y": 2.5 - }, - { - "label": "I", - "x": 8.5, - "y": 2.5 - }, - { - "label": "O", - "x": 9.5, - "y": 2.5 - }, - { - "label": "P", - "x": 10.5, - "y": 2.5 - }, - { - "label": "{", - "x": 11.5, - "y": 2.5 - }, - { - "label": "}", - "x": 12.5, - "y": 2.5 - }, - { - "label": "|", - "x": 13.5, - "y": 2.5, - "w": 1.5 - }, - { - "label": "Delete", - "x": 15.25, - "y": 2.5 - }, - { - "label": "End", - "x": 16.25, - "y": 2.5 - }, - { - "label": "PgDn", - "x": 17.25, - "y": 2.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 3.5, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 3.5 - }, - { - "label": "S", - "x": 2.75, - "y": 3.5 - }, - { - "label": "D", - "x": 3.75, - "y": 3.5 - }, - { - "label": "F", - "x": 4.75, - "y": 3.5 - }, - { - "label": "G", - "x": 5.75, - "y": 3.5 - }, - { - "label": "H", - "x": 6.75, - "y": 3.5 - }, - { - "label": "J", - "x": 7.75, - "y": 3.5 - }, - { - "label": "K", - "x": 8.75, - "y": 3.5 - }, - { - "label": "L", - "x": 9.75, - "y": 3.5 - }, - { - "label": ":", - "x": 10.75, - "y": 3.5 - }, - { - "label": "\"", - "x": 11.75, - "y": 3.5 - }, - { - "label": "Enter", - "x": 12.75, - "y": 3.5, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 4.5, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 4.5 - }, - { - "label": "X", - "x": 3.25, - "y": 4.5 - }, - { - "label": "C", - "x": 4.25, - "y": 4.5 - }, - { - "label": "V", - "x": 5.25, - "y": 4.5 - }, - { - "label": "B", - "x": 6.25, - "y": 4.5 - }, - { - "label": "N", - "x": 7.25, - "y": 4.5 - }, - { - "label": "M", - "x": 8.25, - "y": 4.5 - }, - { - "label": "<", - "x": 9.25, - "y": 4.5 - }, - { - "label": ">", - "x": 10.25, - "y": 4.5 - }, - { - "label": "?", - "x": 11.25, - "y": 4.5 - }, - { - "label": "Shift", - "x": 12.25, - "y": 4.5, - "w": 2.75 - }, - { - "label": "\u2191", - "x": 16.25, - "y": 4.5 - }, - { - "label": "Ctrl", - "x": 0, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 5.5, - "w": 1.25 - }, - { - "x": 3.75, - "y": 5.5, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Fn", - "x": 11.25, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 5.5, - "w": 1.25 - }, - { - "label": "\u2190", - "x": 15.25, - "y": 5.5 - }, - { - "label": "\u2193", - "x": 16.25, - "y": 5.5 - }, - { - "label": "\u2192", - "x": 17.25, - "y": 5.5 - } + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } ] }, "LAYOUT_tkl_iso": { "layout": [ - { - "label": "Esc", - "x": 0, - "y": 0 - }, - { - "label": "F1", - "x": 2, - "y": 0 - }, - { - "label": "F2", - "x": 3, - "y": 0 - }, - { - "label": "F3", - "x": 4, - "y": 0 - }, - { - "label": "F4", - "x": 5, - "y": 0 - }, - { - "label": "F5", - "x": 6.5, - "y": 0 - }, - { - "label": "F6", - "x": 7.5, - "y": 0 - }, - { - "label": "F7", - "x": 8.5, - "y": 0 - }, - { - "label": "F8", - "x": 9.5, - "y": 0 - }, - { - "label": "F9", - "x": 11, - "y": 0 - }, - { - "label": "F10", - "x": 12, - "y": 0 - }, - { - "label": "F11", - "x": 13, - "y": 0 - }, - { - "label": "F12", - "x": 14, - "y": 0 - }, - { - "label": "PrtSc", - "x": 15.25, - "y": 0 - }, - { - "label": "Scroll Lock", - "x": 16.25, - "y": 0 - }, - { - "label": "Pause", - "x": 17.25, - "y": 0 - }, - { - "label": "~", - "x": 0, - "y": 1.5 - }, - { - "label": "!", - "x": 1, - "y": 1.5 - }, - { - "label": "@", - "x": 2, - "y": 1.5 - }, - { - "label": "#", - "x": 3, - "y": 1.5 - }, - { - "label": "$", - "x": 4, - "y": 1.5 - }, - { - "label": "%", - "x": 5, - "y": 1.5 - }, - { - "label": "^", - "x": 6, - "y": 1.5 - }, - { - "label": "&", - "x": 7, - "y": 1.5 - }, - { - "label": "*", - "x": 8, - "y": 1.5 - }, - { - "label": "(", - "x": 9, - "y": 1.5 - }, - { - "label": ")", - "x": 10, - "y": 1.5 - }, - { - "label": "_", - "x": 11, - "y": 1.5 - }, - { - "label": "+", - "x": 12, - "y": 1.5 - }, - { - "label": "Backspace", - "x": 13, - "y": 1.5, - "w": 2 - }, - { - "label": "Insert", - "x": 15.25, - "y": 1.5 - }, - { - "label": "Home", - "x": 16.25, - "y": 1.5 - }, - { - "label": "PgUp", - "x": 17.25, - "y": 1.5 - }, - { - "label": "Tab", - "x": 0, - "y": 2.5, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 2.5 - }, - { - "label": "W", - "x": 2.5, - "y": 2.5 - }, - { - "label": "E", - "x": 3.5, - "y": 2.5 - }, - { - "label": "R", - "x": 4.5, - "y": 2.5 - }, - { - "label": "T", - "x": 5.5, - "y": 2.5 - }, - { - "label": "Y", - "x": 6.5, - "y": 2.5 - }, - { - "label": "U", - "x": 7.5, - "y": 2.5 - }, - { - "label": "I", - "x": 8.5, - "y": 2.5 - }, - { - "label": "O", - "x": 9.5, - "y": 2.5 - }, - { - "label": "P", - "x": 10.5, - "y": 2.5 - }, - { - "label": "{", - "x": 11.5, - "y": 2.5 - }, - { - "label": "}", - "x": 12.5, - "y": 2.5 - }, - { - "label": "Enter", - "x": 13.75, - "y": 2.5, - "w": 1.25, - "h": 2 - }, - { - "label": "Delete", - "x": 15.25, - "y": 2.5 - }, - { - "label": "End", - "x": 16.25, - "y": 2.5 - }, - { - "label": "PgDn", - "x": 17.25, - "y": 2.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 3.5, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 3.5 - }, - { - "label": "S", - "x": 2.75, - "y": 3.5 - }, - { - "label": "D", - "x": 3.75, - "y": 3.5 - }, - { - "label": "F", - "x": 4.75, - "y": 3.5 - }, - { - "label": "G", - "x": 5.75, - "y": 3.5 - }, - { - "label": "H", - "x": 6.75, - "y": 3.5 - }, - { - "label": "J", - "x": 7.75, - "y": 3.5 - }, - { - "label": "K", - "x": 8.75, - "y": 3.5 - }, - { - "label": "L", - "x": 9.75, - "y": 3.5 - }, - { - "label": ":", - "x": 10.75, - "y": 3.5 - }, - { - "label": "\"", - "x": 11.75, - "y": 3.5 - }, - { - "label": "#", - "x": 12.75, - "y": 3.5 - }, - { - "label": "Shift", - "x": 0, - "y": 4.5, - "w": 1.25 - }, - { - "label": "\\", - "x": 1.25, - "y": 4.5 - }, - { - "label": "Z", - "x": 2.25, - "y": 4.5 - }, - { - "label": "X", - "x": 3.25, - "y": 4.5 - }, - { - "label": "C", - "x": 4.25, - "y": 4.5 - }, - { - "label": "V", - "x": 5.25, - "y": 4.5 - }, - { - "label": "B", - "x": 6.25, - "y": 4.5 - }, - { - "label": "N", - "x": 7.25, - "y": 4.5 - }, - { - "label": "M", - "x": 8.25, - "y": 4.5 - }, - { - "label": "<", - "x": 9.25, - "y": 4.5 - }, - { - "label": ">", - "x": 10.25, - "y": 4.5 - }, - { - "label": "?", - "x": 11.25, - "y": 4.5 - }, - { - "label": "Shift", - "x": 12.25, - "y": 4.5, - "w": 2.75 - }, - { - "label": "\u2191", - "x": 16.25, - "y": 4.5 - }, - { - "label": "Ctrl", - "x": 0, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 5.5, - "w": 1.25 - }, - { - "x": 3.75, - "y": 5.5, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Fn", - "x": 11.25, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 5.5, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 5.5, - "w": 1.25 - }, - { - "label": "\u2190", - "x": 15.25, - "y": 5.5 - }, - { - "label": "\u2193", - "x": 16.25, - "y": 5.5 - }, - { - "label": "\u2192", - "x": 17.25, - "y": 5.5 - } + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } ] } } diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c index f5500ea830..42091f36cd 100644 --- a/keyboards/durgod/k320/k320.c +++ b/keyboards/durgod/k320/k320.c @@ -40,3 +40,23 @@ void led_init_ports(void) { off_all_leds(); } + +#ifndef WINLOCK_DISABLED +static bool win_key_locked = false; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TGUI: + if (record->event.pressed) { + // Toggle GUI lock on key press + win_key_locked = !win_key_locked; + writePin(LED_WIN_LOCK_PIN, !win_key_locked); + } + break; + case KC_LGUI: + if (win_key_locked) { return false; } + break; + } + return process_record_user(keycode, record); +} +#endif /* WINLOCK_DISABLED */ diff --git a/keyboards/durgod/k320/k320.h b/keyboards/durgod/k320/k320.h index 48da048410..c504f5a2bb 100644 --- a/keyboards/durgod/k320/k320.h +++ b/keyboards/durgod/k320/k320.h @@ -17,6 +17,17 @@ #include "quantum.h" +#ifndef WINLOCK_DISABLED +// Define the TGUI key here so it is available in QMK configurator +enum K320_keycodes { + KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock + NEW_SAFE_RANGE +}; + +#undef SAFE_RANGE +#define SAFE_RANGE NEW_SAFE_RANGE +#endif /* WINLOCK_DISABLED */ + /* Function Prototype */ void off_all_leds(void); void on_all_leds(void); @@ -26,12 +37,12 @@ void on_all_leds(void); // This a shortcut to help you visually see your layout. #define LAYOUT_tkl_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ @@ -45,10 +56,10 @@ void on_all_leds(void); // This a shortcut to help you visually see your layout. #define LAYOUT_tkl_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4E, K3D, K3E, K3F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3D, K3E, K3F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, \ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ ) { \ @@ -64,7 +75,7 @@ void on_all_leds(void); // This a shortcut to help you visually see your layout. #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ K20