summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorLaneware <68452738+Laneware@users.noreply.github.com>2023-03-19 03:33:20 +1000
committerGitHub <noreply@github.com>2023-03-18 11:33:20 -0600
commitda52450152f9f16aa1144bc616f0e84681d009cf (patch)
treefa3378bb2a0d16eab8423f05381f91c2a32be460 /keyboards
parent7b9d471ba0ec0da3d4127940979247ae2f7fcfec (diff)
Add Support for LPAD (#19852)
Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/lpad/config.h10
-rw-r--r--keyboards/lpad/info.json36
-rw-r--r--keyboards/lpad/keymaps/default/keymap.c13
-rw-r--r--keyboards/lpad/keymaps/via/keymap.c36
-rw-r--r--keyboards/lpad/keymaps/via/rules.mk2
-rw-r--r--keyboards/lpad/lpad.c18
-rw-r--r--keyboards/lpad/readme.md27
-rw-r--r--keyboards/lpad/rules.mk14
8 files changed, 156 insertions, 0 deletions
diff --git a/keyboards/lpad/config.h b/keyboards/lpad/config.h
new file mode 100644
index 0000000000..ce4da1d32e
--- /dev/null
+++ b/keyboards/lpad/config.h
@@ -0,0 +1,10 @@
+// Copyright 2023 Laneware Peripherals
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/lpad/info.json b/keyboards/lpad/info.json
new file mode 100644
index 0000000000..2b6286ca4b
--- /dev/null
+++ b/keyboards/lpad/info.json
@@ -0,0 +1,36 @@
+{
+ "keyboard_name": "L-PAD",
+ "manufacturer": "Laneware Peripherals",
+ "url": "",
+ "maintainer": "qmk",
+ "usb": {
+ "vid": "0x4C50",
+ "pid": "0x2222",
+ "device_version": "0.0.1"
+ },
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "matrix_pins": {
+ "cols": ["F5", "E6", "D0"],
+ "rows": ["D3", "D4", "D6"]
+ },
+ "diode_direction": "COL2ROW",
+ "encoder": {
+ "rotary": [
+ {
+ "pin_a": "F0",
+ "pin_b": "F1"
+ }
+ ]
+ },
+ "layouts":{
+ "LAYOUT": {
+ "layout":[{ "label": "Play", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 },
+ { "label": "Mute", "matrix": [0, 1], "w": 1, "x": 1.5, "y": 0.5 },
+ { "label": "Next", "matrix": [1, 0], "w": 1, "x": 0, "y": 1 },
+ { "label": "Prev", "matrix": [2, 0], "w": 1, "x": 0, "y": 2 },
+ { "label": "Left", "matrix": [2, 1], "w": 1, "x": 1, "y": 2 },
+ { "label": "Rght", "matrix": [2, 2], "w": 1, "x": 2, "y": 2 }]
+ },
+ }
+}
diff --git a/keyboards/lpad/keymaps/default/keymap.c b/keyboards/lpad/keymaps/default/keymap.c
new file mode 100644
index 0000000000..63fd98f6eb
--- /dev/null
+++ b/keyboards/lpad/keymaps/default/keymap.c
@@ -0,0 +1,13 @@
+// Copyright 2023 Laneware Peripherals
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT (
+ KC_MPLY, KC_MUTE,
+ KC_MNXT,
+ KC_MPRV, KC_LEFT, KC_RIGHT)
+};
+
diff --git a/keyboards/lpad/keymaps/via/keymap.c b/keyboards/lpad/keymaps/via/keymap.c
new file mode 100644
index 0000000000..fc5f1f0b03
--- /dev/null
+++ b/keyboards/lpad/keymaps/via/keymap.c
@@ -0,0 +1,36 @@
+// Copyright 2023 Laneware Peripherals
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT (
+ KC_MPLY, KC_MUTE,
+ KC_MNXT,
+ KC_MPRV, KC_LEFT, KC_RIGHT),
+
+ [1] = LAYOUT (
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS),
+
+ [2] = LAYOUT (
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS),
+
+ [3] = LAYOUT (
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS),
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
+ [1] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)},
+ [2] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)},
+ [3] = {ENCODER_CCW_CW(KC_TRNS, KC_TRNS)},
+};
+#endif
diff --git a/keyboards/lpad/keymaps/via/rules.mk b/keyboards/lpad/keymaps/via/rules.mk
new file mode 100644
index 0000000000..384001c14f
--- /dev/null
+++ b/keyboards/lpad/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/lpad/lpad.c b/keyboards/lpad/lpad.c
new file mode 100644
index 0000000000..214dd2e390
--- /dev/null
+++ b/keyboards/lpad/lpad.c
@@ -0,0 +1,18 @@
+// Copyright 2023 Laneware Peripherals
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ return true;
+}
+#endif
diff --git a/keyboards/lpad/readme.md b/keyboards/lpad/readme.md
new file mode 100644
index 0000000000..864f9569fa
--- /dev/null
+++ b/keyboards/lpad/readme.md
@@ -0,0 +1,27 @@
+# LPAD
+
+![LPAD](https://i.imgur.com/bQgqZC6h.jpg)
+
+A Macro Keyboard with a RHS rotary encoder, made and sold by Laneware Peripherals.
+
+* Keyboard Maintainer: [Laneware Peripherals](https://github.com/laneware)
+* Hardware Supported: LPAD
+* Hardware Availability: [Laneware Peripherals](https://lanewareperipherals.com/),
+
+Make example for this keyboard (after setting up your build environment):
+
+ make lpad:default
+
+Flashing example for this keyboard:
+
+ make lpad:default:flash
+
+
+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. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Bootloader
+
+Enter the bootloader in 2 ways:
+
+* **Bootmagic reset**: Hold down the Top Left Switch and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the PCB
diff --git a/keyboards/lpad/rules.mk b/keyboards/lpad/rules.mk
new file mode 100644
index 0000000000..524fa11adc
--- /dev/null
+++ b/keyboards/lpad/rules.mk
@@ -0,0 +1,14 @@
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes \ No newline at end of file