Skip to content

Commit 610cf72

Browse files
[Keyboard] adding keyboard: pain27 (qmk#7977)
* pain27 * Applied review suggestions * Correct DEBOUNCE verbiage, remove .ini files * Readme tweaks Co-authored-by: ridingqwerty <[email protected]>
1 parent 96a4388 commit 610cf72

File tree

7 files changed

+135
-0
lines changed

7 files changed

+135
-0
lines changed

keyboards/wsk/pain27/config.h

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#pragma once
2+
3+
#include "config_common.h"
4+
5+
/* USB Device descriptor parameter */
6+
#define VENDOR_ID 0xFEED
7+
#define PRODUCT_ID 0x9E8C
8+
#define DEVICE_VER 0x0001
9+
#define MANUFACTURER Worldspawn00
10+
#define PRODUCT PAIN27
11+
#define DESCRIPTION A 27-key Keyboard
12+
13+
/* key matrix size */
14+
#define MATRIX_ROWS 3
15+
#define MATRIX_COLS 10
16+
17+
/* key matrix pins */
18+
#define MATRIX_ROW_PINS { F4, F5, D0 }
19+
#define MATRIX_COL_PINS { D2, B3, F6, B1, B2, B6, D4, C6, D7, E6 }
20+
#define UNUSED_PINS
21+
22+
/* COL2ROW or ROW2COL */
23+
#define DIODE_DIRECTION COL2ROW
24+
25+
/* number of backlight levels */
26+
27+
#ifdef BACKLIGHT_PIN
28+
#define BACKLIGHT_LEVELS 3
29+
#endif
30+
31+
/* Set 0 if debouncing isn't needed */
32+
#define DEBOUNCE 5
33+
34+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
35+
#define LOCKING_SUPPORT_ENABLE
36+
37+
/* Locking resynchronize hack */
38+
#define LOCKING_RESYNC_ENABLE
39+
40+
#define RGB_DI_PIN D1
41+
#ifdef RGB_DI_PIN
42+
#define RGBLIGHT_ANIMATIONS
43+
#define RGBLED_NUM 8
44+
#define RGBLIGHT_HUE_STEP 8
45+
#define RGBLIGHT_SAT_STEP 8
46+
#define RGBLIGHT_VAL_STEP 8
47+
#endif
48+

keyboards/wsk/pain27/info.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"keyboard_name": "Pain27v2",
3+
"url": "https://qmk.fm/keyboards",
4+
"maintainer": "worldspawn00",
5+
"width": 11,
6+
"height": 4,
7+
"layouts": {
8+
"LAYOUT": {
9+
"layout": [{"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"x":3.25, "y":3, "w":6.25}]
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include QMK_KEYBOARD_H
2+
3+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4+
[0] = LAYOUT(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
5+
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,
6+
MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_LSFT, KC_SPC)),
7+
[1] = LAYOUT(KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC,
8+
KC_TAB, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
9+
KC_LCTL, KC_LALT, KC_TRNS, MO(3), KC_RGUI, KC_RALT, KC_RCTL, KC_NO),
10+
[2] = LAYOUT(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
11+
KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_ENT,
12+
KC_LCTL, KC_LALT, MO(3), KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_NO),
13+
[3] = LAYOUT(KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
14+
KC_F11, KC_F12, RGB_SPD, RGB_SPI, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_DEL,
15+
KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_RGUI, KC_RALT, KC_RCTL, KC_NO)
16+
17+
};
18+

keyboards/wsk/pain27/pain27.c

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "pain27.h"

keyboards/wsk/pain27/pain27.h

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
#include "quantum.h"
4+
5+
#define LAYOUT( \
6+
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \
7+
K100, K101, K102, K103, K104, K105, K106, K107, K108, \
8+
K200, K201, K202, K203, K204, K205, K206, K207 \
9+
) { \
10+
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \
11+
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO }, \
12+
{ K200, K201, K202, K203, K204, K205, K206, K207, KC_NO, KC_NO } \
13+
}
14+

keyboards/wsk/pain27/readme.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Pain27v2
2+
3+
![Pain27v2](https://i.imgur.com/qJZlelV.png)
4+
5+
The Pain27v2 is an adaptation of the original Pain27 board by jonathan(uuupah), adding RGB LEDs and moving the controller under the keys.
6+
7+
* Keyboard Maintainer: [worldspawn00](https://github.com/worldspawn00/)
8+
* Hardware Supported: The Pain27v2 PCB and kit.
9+
* Hardware Availability: [PCB & Kit](https://geekhack.org/index.php?topic=100283)
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make wsk/pain27:default
14+
15+
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).
16+

keyboards/wsk/pain27/rules.mk

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# MCU name
2+
MCU = atmega32u4
3+
4+
# Bootloader selection
5+
# Teensy halfkay
6+
# Pro Micro caterina
7+
# Atmel DFU atmel-dfu
8+
# LUFA DFU lufa-dfu
9+
# QMK DFU qmk-dfu
10+
# ATmega32A bootloadHID
11+
# ATmega328P USBasp
12+
BOOTLOADER = caterina
13+
14+
# Build Options
15+
# comment out to disable the options.
16+
#
17+
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
18+
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
19+
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
20+
CONSOLE_ENABLE = no # Console for debug(+400)
21+
COMMAND_ENABLE = no # Commands for debug and configuration
22+
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
23+
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
24+
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
25+
AUDIO_ENABLE = no
26+
RGBLIGHT_ENABLE = yes

0 commit comments

Comments
 (0)