1
0
Fork 0

[Keyboard] Update 1upkeyboards/super16 with code from vendor (#5645)

* readme formatting

* cleanup rules.mk

* update config.h

* add numpad layout

* Update default keymap

* cleanup rules

* disable console and commands to fit the bootloader

* cleanup whitespace

* revert readme changes

* revert changes to config.h

* remove unused keycodes

* add LAYOUTS to rules.mk

* remove redundant config setting

Co-Authored-By: jeffmhastings <jeffmhastings@gmail.com>
This commit is contained in:
Jeff Hastings 2019-04-19 13:43:15 -04:00 committed by Drashna Jaelre
parent 7fa854729c
commit 5539d7affb
6 changed files with 64 additions and 74 deletions

View file

@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000 #define PRODUCT_ID 0x2010
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER 1upkeyboards #define MANUFACTURER 1upkeyboards
#define PRODUCT super16 #define PRODUCT super16
@ -66,8 +66,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ #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 */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/ /*== all animations enable ==*/
// #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/ /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@ -85,10 +85,9 @@ 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
@ -242,3 +241,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0 // #define BOOTMAGIC_LITE_COLUMN 0
/* prevent stuck modifiers */

View file

@ -7,6 +7,9 @@
"layouts": { "layouts": {
"LAYOUT_ortho_4x4": { "LAYOUT_ortho_4x4": {
"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}] "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}]
},
"LAYOUT_numpad_4x4": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}]
} }
} }
} }

View file

@ -15,40 +15,16 @@
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4( /* Base */ [0] = LAYOUT_ortho_4x4( /* Base */
KC_A, KC_1, KC_2, KC_4, \ RGB_TOG, KC_1, KC_U, KC_P,
KC_A, KC_1, KC_2, KC_4, \ RGB_MOD, KC_1, KC_U, KC_P,
KC_A, KC_1, KC_2, KC_4, \ RGB_TOG, KC_1, KC_U, KC_P,
KC_A, KC_1, KC_2, KC_4 \ RGB_MOD, KC_1, KC_U, KC_P
), ),
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true; return true;
} }

View file

@ -1,5 +1,4 @@
# MCU name # MCU name
#MCU = at90usb1286
MCU = atmega32u4 MCU = atmega32u4
# Processor frequency. # Processor frequency.
@ -15,7 +14,6 @@ MCU = atmega32u4
# software delays. # software delays.
F_CPU = 16000000 F_CPU = 16000000
# #
# LUFA specific # LUFA specific
# #
@ -48,7 +46,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# atmega32a bootloadHID # atmega32a bootloadHID
BOOTLOADER = caterina BOOTLOADER = caterina
# If you don't know the bootloader type, then you can specify the # If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512 # Teensy halfKay 512
@ -58,6 +55,7 @@ BOOTLOADER = caterina
# USBaspLoader 2048 # USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 # OPT_DEFS += -DBOOTLOADER_SIZE=4096
#EXTRAFLAGS += -flto
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
@ -65,8 +63,8 @@ BOOTLOADER = caterina
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = no # 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
@ -80,4 +78,4 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
LAYOUTS = ortho_4x4 LAYOUTS = ortho_4x4 numpad_4x4

View file

@ -25,15 +25,27 @@
* The second converts the arguments into a two-dimensional array which * The second converts the arguments into a two-dimensional array which
* represents the switch matrix. * represents the switch matrix.
*/ */
#define LAYOUT_ortho_4x4( \ #define LAYOUT_ortho_4x4( \
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 \
) \ ) { \
{ \ { 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 }, \ }
#define LAYOUT_numpad_4x4( \
K00, K01, K02, K03, \
K10, K11, K12, \
K20, K21, K22, K23, \
K31, K32 \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, KC_NO }, \
{ K20, K21, K22, K23 }, \
{ KC_NO, K31, K32, KC_NO } \
} }