Woodpad refactor (#11651)
This commit is contained in:
parent
a7d79f4c00
commit
188c0bacb0
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2017
|
Copyright 2017 WoodKeys
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,17 +15,16 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x6069
|
#define PRODUCT_ID 0x6069
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER WoodKeys.click
|
#define MANUFACTURER WoodKeys.click
|
||||||
#define PRODUCT woodpad
|
#define PRODUCT Woodpad
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
@ -40,17 +39,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 }
|
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 }
|
||||||
#define MATRIX_COL_PINS { B1, B3, B2, B6 }
|
#define MATRIX_COL_PINS { B1, B3, B2, B6 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL*/
|
/* COL2ROW, ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
//#define BACKLIGHT_PIN B7
|
||||||
// #define BACKLIGHT_BREATHING
|
//#define BACKLIGHT_BREATHING
|
||||||
// #define BACKLIGHT_LEVELS 3
|
//#define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
//#define RGB_DI_PIN E2
|
||||||
|
//#ifdef RGB_DI_PIN
|
||||||
|
//# define RGBLED_NUM 16
|
||||||
|
//# define RGBLIGHT_HUE_STEP 8
|
||||||
|
//# define RGBLIGHT_SAT_STEP 8
|
||||||
|
//# define RGBLIGHT_VAL_STEP 8
|
||||||
|
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
/*== all animations enable ==*/
|
||||||
|
//# define RGBLIGHT_ANIMATIONS
|
||||||
|
/*== or choose animations ==*/
|
||||||
|
//# define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
//# define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
//# define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
//# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
//# define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
//# define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
/*== customize breathing effect ==*/
|
||||||
|
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
/*==== use exp() and sin() ====*/
|
||||||
|
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
//#endif
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
@ -58,13 +85,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
/* Locking resynchronize hack */
|
/* Locking resynchronize hack */
|
||||||
#define LOCKING_RESYNC_ENABLE
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
//#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force NKRO
|
* Force NKRO
|
||||||
*
|
*
|
||||||
@ -86,54 +116,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
//#define FORCE_NKRO
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
/*
|
|
||||||
* Magic Key Options
|
|
||||||
*
|
|
||||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
|
||||||
* the keyboard. They are best used in combination with the HID Listen program,
|
|
||||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
|
||||||
*
|
|
||||||
* The options below allow the magic key functionality to be changed. This is
|
|
||||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* control how magic key switches layers */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
|
||||||
|
|
||||||
/* override magic key keymap */
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
|
||||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
|
||||||
//#define MAGIC_KEY_HELP1 H
|
|
||||||
//#define MAGIC_KEY_HELP2 SLASH
|
|
||||||
//#define MAGIC_KEY_DEBUG D
|
|
||||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
|
||||||
//#define MAGIC_KEY_DEBUG_KBD K
|
|
||||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
|
||||||
//#define MAGIC_KEY_VERSION V
|
|
||||||
//#define MAGIC_KEY_STATUS S
|
|
||||||
//#define MAGIC_KEY_CONSOLE C
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
|
||||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
|
||||||
//#define MAGIC_KEY_LAYER0 0
|
|
||||||
//#define MAGIC_KEY_LAYER1 1
|
|
||||||
//#define MAGIC_KEY_LAYER2 2
|
|
||||||
//#define MAGIC_KEY_LAYER3 3
|
|
||||||
//#define MAGIC_KEY_LAYER4 4
|
|
||||||
//#define MAGIC_KEY_LAYER5 5
|
|
||||||
//#define MAGIC_KEY_LAYER6 6
|
|
||||||
//#define MAGIC_KEY_LAYER7 7
|
|
||||||
//#define MAGIC_KEY_LAYER8 8
|
|
||||||
//#define MAGIC_KEY_LAYER9 9
|
|
||||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
|
||||||
//#define MAGIC_KEY_LOCK CAPS
|
|
||||||
//#define MAGIC_KEY_EEPROM E
|
|
||||||
//#define MAGIC_KEY_NKRO N
|
|
||||||
//#define MAGIC_KEY_SLEEP_LED Z
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
* These options are also useful to firmware size reduction.
|
* These options are also useful to firmware size reduction.
|
||||||
@ -149,30 +131,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_LAYER
|
//#define NO_ACTION_LAYER
|
||||||
//#define NO_ACTION_TAPPING
|
//#define NO_ACTION_TAPPING
|
||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
/*
|
/* disable these deprecated features by default */
|
||||||
* MIDI options
|
#define NO_ACTION_MACRO
|
||||||
*/
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
/* Prevent use of disabled MIDI features in the keymap */
|
/* Bootmagic Lite key configuration */
|
||||||
//#define MIDI_ENABLE_STRICT 1
|
//#define BOOTMAGIC_LITE_ROW 0
|
||||||
|
//#define BOOTMAGIC_LITE_COLUMN 0
|
||||||
/* enable basic MIDI features:
|
|
||||||
- MIDI notes can be sent when in Music mode is on
|
|
||||||
*/
|
|
||||||
//#define MIDI_BASIC
|
|
||||||
|
|
||||||
/* enable advanced MIDI features:
|
|
||||||
- MIDI notes can be added to the keymap
|
|
||||||
- Octave shift and transpose
|
|
||||||
- Virtual sustain, portamento, and modulation wheel
|
|
||||||
- etc.
|
|
||||||
*/
|
|
||||||
//#define MIDI_ADVANCED
|
|
||||||
|
|
||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
37
keyboards/handwired/woodpad/info.json
Normal file
37
keyboards/handwired/woodpad/info.json
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Woodpad",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_5x4": {
|
||||||
|
"layout": [
|
||||||
|
{"x": 0, "y": 0},
|
||||||
|
{"x": 1, "y": 0},
|
||||||
|
{"x": 2, "y": 0},
|
||||||
|
{"x": 3, "y": 0},
|
||||||
|
|
||||||
|
{"x": 0, "y": 1},
|
||||||
|
{"x": 1, "y": 1},
|
||||||
|
{"x": 2, "y": 1},
|
||||||
|
{"x": 3, "y": 1},
|
||||||
|
|
||||||
|
{"x": 0, "y": 2},
|
||||||
|
{"x": 1, "y": 2},
|
||||||
|
{"x": 2, "y": 2},
|
||||||
|
{"x": 3, "y": 2},
|
||||||
|
|
||||||
|
{"x": 0, "y": 3},
|
||||||
|
{"x": 1, "y": 3},
|
||||||
|
{"x": 2, "y": 3},
|
||||||
|
{"x": 3, "y": 3},
|
||||||
|
|
||||||
|
{"x": 0, "y": 4},
|
||||||
|
{"x": 1, "y": 4},
|
||||||
|
{"x": 2, "y": 4},
|
||||||
|
{"x": 3, "y": 4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,19 +0,0 @@
|
|||||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
// place overrides here
|
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
/* Copyright 2017 WoodKeys
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -13,115 +13,88 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
enum layer_names {
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
_NUMLOCK,
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
_NAV,
|
||||||
// entirely and just use numbers.
|
_ALT,
|
||||||
#define _NUMLOCK 0
|
_ADJUST
|
||||||
#define _NAV 1
|
|
||||||
#define _ALT 2
|
|
||||||
#define _ADJUST 3
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[_NUMLOCK] = KEYMAP( /* Base */
|
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
|
||||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
|
||||||
KC_P4, KC_P5, KC_P6, KC_PEQL, \
|
|
||||||
KC_P1, KC_P2, KC_P3, KC_COMM, \
|
|
||||||
KC_LALT, KC_P0, KC_PDOT, KC_PENT \
|
|
||||||
),
|
|
||||||
[_NAV] = KEYMAP( /* Base */
|
|
||||||
_______, _______, _______, _______,\
|
|
||||||
KC_HOME, KC_UP, KC_PGUP, _______, \
|
|
||||||
KC_LEFT, XXXXXXX, KC_RIGHT, _______, \
|
|
||||||
KC_END, KC_DOWN, KC_PGDN, _______, \
|
|
||||||
_______, KC_INS, KC_DEL, _______ \
|
|
||||||
),
|
|
||||||
[_ALT] = KEYMAP( /* Base */
|
|
||||||
_______, KC_MUTE, KC_VOLD, KC_VOLU,\
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______ \
|
|
||||||
),
|
|
||||||
[_ADJUST] = KEYMAP( /* Base */
|
|
||||||
_______, KC_A, _______, RESET,\
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______ \
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void numlock_led_on(void) {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
PORTF |= (1<<7);
|
[_NUMLOCK] = LAYOUT_ortho_5x4( /* Base */
|
||||||
}
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
void numlock_led_off(void) {
|
KC_P4, KC_P5, KC_P6, KC_PEQL,
|
||||||
PORTF &= ~(1<<7);
|
KC_P1, KC_P2, KC_P3, KC_COMM,
|
||||||
}
|
KC_LALT, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
[_NAV] = LAYOUT_ortho_5x4( /* Base */
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
KC_HOME, KC_UP, KC_PGUP, _______,
|
||||||
|
KC_LEFT, XXXXXXX, KC_RGHT, _______,
|
||||||
|
KC_END, KC_DOWN, KC_PGDN, _______,
|
||||||
|
_______, KC_INS, KC_DEL, _______
|
||||||
|
),
|
||||||
|
[_ALT] = LAYOUT_ortho_5x4( /* Base */
|
||||||
|
_______, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_ADJUST] = LAYOUT_ortho_5x4( /* Base */
|
||||||
|
_______, KC_A, _______, RESET,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
static bool numlock_down = false;
|
static bool numlock_down = false;
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KC_NLCK:
|
case KC_NLCK:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
numlock_down = true;
|
numlock_down = true;
|
||||||
if (IS_LAYER_ON(_ALT)) {
|
if (IS_LAYER_ON(_ALT)) {
|
||||||
layer_on(_ADJUST);
|
layer_on(_ADJUST);
|
||||||
}
|
}
|
||||||
} else{
|
} else {
|
||||||
if(!IS_LAYER_ON(_ADJUST)) {
|
if(!IS_LAYER_ON(_ADJUST)) {
|
||||||
if (!IS_LAYER_ON(_NAV)){
|
if (!IS_LAYER_ON(_NAV)) {
|
||||||
numlock_led_off();
|
numlock_led_off();
|
||||||
layer_on(_NAV);
|
layer_on(_NAV);
|
||||||
} else {
|
} else {
|
||||||
numlock_led_on();
|
numlock_led_on();
|
||||||
layer_off(_NAV);
|
layer_off(_NAV);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
layer_off(_ADJUST);
|
layer_off(_ADJUST);
|
||||||
}
|
}
|
||||||
numlock_down = false;
|
numlock_down = false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
case KC_LALT:
|
||||||
case KC_LALT:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
if (numlock_down) {
|
||||||
if (numlock_down) {
|
layer_on(_ADJUST);
|
||||||
layer_on(_ADJUST);
|
} else {
|
||||||
} else {
|
layer_on(_ALT);
|
||||||
layer_on(_ALT);
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
if(IS_LAYER_ON(_ADJUST)) {
|
||||||
if(IS_LAYER_ON(_ADJUST)) {
|
layer_off(_ADJUST);
|
||||||
layer_off(_ADJUST);
|
} else {
|
||||||
} else {
|
layer_off(_ALT);
|
||||||
layer_off(_ALT);
|
}
|
||||||
}
|
}
|
||||||
}
|
// Allow normal processing of ALT
|
||||||
// Allow normal processing of ALT?
|
return false;
|
||||||
return false;
|
}
|
||||||
break;
|
return true;
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
|
||||||
// set Numlock LED to output and low
|
|
||||||
DDRF |= (1<<7);
|
|
||||||
PORTF &= ~(1<<7);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
# The default keymap for woodpad
|
# The default keymap for Woodpad
|
||||||
|
@ -1,17 +1,2 @@
|
|||||||
# QMK Build Options
|
CONSOLE_ENABLE = no
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
NKRO_ENABLE = yes
|
||||||
# the appropriate keymap folder that will get included automatically
|
|
||||||
#
|
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
UNICODE_ENABLE = no # Unicode
|
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|
||||||
|
@ -1,28 +1,17 @@
|
|||||||
woodpad keyboard firmware
|
# Woodpad
|
||||||
======================
|
|
||||||
|
|
||||||
## Quantum MK Firmware
|
![Woodpad](https://woodkeys.click/wp-content/uploads/2017/08/ma2.jpg)
|
||||||
|
|
||||||
For the full Quantum feature list, see [the parent readme](/).
|
* Keyboard Maintainer: QMK Community
|
||||||
|
* Hardware Supported: Woodpad PCB
|
||||||
|
* Hardware Availability: [WoodKeys](https://woodkeys.click/product/woodpad/)
|
||||||
|
|
||||||
## Building
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
Download or clone the whole firmware and navigate to the keyboards/woodpad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
|
make handwired/woodpad:default
|
||||||
|
|
||||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
### Default
|
make handwired/woodpad:default:flash
|
||||||
|
|
||||||
To build with the default keymap, simply run `make default`.
|
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).
|
||||||
|
|
||||||
### Other Keymaps
|
|
||||||
|
|
||||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
|
|
||||||
|
|
||||||
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make [default|jack|<name>]
|
|
||||||
```
|
|
||||||
|
|
||||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
|
||||||
|
@ -2,31 +2,23 @@
|
|||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Bootloader selection
|
# Bootloader selection
|
||||||
# Teensy halfkay
|
|
||||||
# Pro Micro caterina
|
|
||||||
# Atmel DFU atmel-dfu
|
|
||||||
# LUFA DFU lufa-dfu
|
|
||||||
# QMK DFU qmk-dfu
|
|
||||||
# ATmega32A bootloadHID
|
|
||||||
# ATmega328P USBasp
|
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
UNICODE_ENABLE = no # Unicode
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
AUDIO_ENABLE = no # Audio output
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
LAYOUTS = ortho_5x4
|
||||||
RGBLIGHT_ENABLE = no
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
/* Copyright 2017 WoodKeys
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -13,31 +13,18 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "woodpad.h"
|
#include "woodpad.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
setPinOutput(F7);
|
||||||
// runs once when the firmware starts up
|
keyboard_pre_init_user();
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
inline void numlock_led_on(void) {
|
||||||
// put your looping keyboard code here
|
writePinHigh(F7);
|
||||||
// runs every cycle (a lot)
|
|
||||||
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
inline void numlock_led_off(void) {
|
||||||
// put your per-action keyboard code here
|
writePinLow(F7);
|
||||||
// runs for every action, just before processing by the firmware
|
|
||||||
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
/* Copyright 2017 WoodKeys
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -13,28 +13,32 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef WOODPAD_H
|
|
||||||
#define WOODPAD_H
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
// This a shortcut to help you visually see your layout.
|
extern void numlock_led_on(void);
|
||||||
// The following is an example using the Planck MIT layout
|
extern void numlock_led_off(void);
|
||||||
// The first section contains all of the arguments
|
|
||||||
// The second converts the arguments into a two-dimensional array
|
/* This is a shortcut to help you visually see your layout.
|
||||||
#define KEYMAP( \
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_ortho_5x4( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, k23, \
|
k20, k21, k22, k23, \
|
||||||
k30, k31, k32, k33, \
|
k30, k31, k32, k33, \
|
||||||
k40, k41, k42, k43 \
|
k40, k41, k42, k43 \
|
||||||
) \
|
) { \
|
||||||
{ \
|
|
||||||
{ k00, k01, k02, k03 }, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{ k10, k11, k12, k13 }, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{ k20, k21, k22, k23 }, \
|
{ k20, k21, k22, k23 }, \
|
||||||
{ k30, k31, k32, k33 }, \
|
{ k30, k31, k32, k33 }, \
|
||||||
{ k40, k41, k42, k43 }, \
|
{ k40, k41, k42, k43 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user