From aa1a90af66df6ab12a371416e23094315c4a43b3 Mon Sep 17 00:00:00 2001 From: Felix Uhl Date: Thu, 11 Aug 2016 00:54:55 +0200 Subject: [PATCH] Added S60-X to keyboards with two layouts. --- .gitignore | 1 + keyboards/s60-x/Makefile | 75 ++++++++++ keyboards/s60-x/config.h | 164 ++++++++++++++++++++++ keyboards/s60-x/keymaps/default/Makefile | 21 +++ keyboards/s60-x/keymaps/default/keymap.c | 92 ++++++++++++ keyboards/s60-x/keymaps/default/readme.md | 1 + keyboards/s60-x/keymaps/felix/Makefile | 21 +++ keyboards/s60-x/keymaps/felix/keymap.c | 110 +++++++++++++++ keyboards/s60-x/keymaps/felix/readme.md | 1 + keyboards/s60-x/readme.md | 32 +++++ keyboards/s60-x/s60-x.c | 28 ++++ keyboards/s60-x/s60-x.h | 44 ++++++ 12 files changed, 590 insertions(+) create mode 100644 keyboards/s60-x/Makefile create mode 100644 keyboards/s60-x/config.h create mode 100644 keyboards/s60-x/keymaps/default/Makefile create mode 100644 keyboards/s60-x/keymaps/default/keymap.c create mode 100644 keyboards/s60-x/keymaps/default/readme.md create mode 100644 keyboards/s60-x/keymaps/felix/Makefile create mode 100644 keyboards/s60-x/keymaps/felix/keymap.c create mode 100644 keyboards/s60-x/keymaps/felix/readme.md create mode 100644 keyboards/s60-x/readme.md create mode 100644 keyboards/s60-x/s60-x.c create mode 100644 keyboards/s60-x/s60-x.h diff --git a/.gitignore b/.gitignore index 8c85d6ffa8..07bbf13db1 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ CMakeLists.txt .settings/ .idea .browse.VC.db* +*.stackdump diff --git a/keyboards/s60-x/Makefile b/keyboards/s60-x/Makefile new file mode 100644 index 0000000000..57edd5e036 --- /dev/null +++ b/keyboards/s60-x/Makefile @@ -0,0 +1,75 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +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 +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/s60-x/config.h b/keyboards/s60-x/config.h new file mode 100644 index 0000000000..d548a99b33 --- /dev/null +++ b/keyboards/s60-x/config.h @@ -0,0 +1,164 @@ +/* +Copyright 2012 Jun Wako +Copyright 2016 Julien Pecqueur +Copyright 2016 Felix Uhl + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Massdrop +#define PRODUCT S60-X +#define DESCRIPTION q.m.k. keyboard firmware for S60-X + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, E6, F1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#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. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* 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 + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/s60-x/keymaps/default/Makefile b/keyboards/s60-x/keymaps/default/Makefile new file mode 100644 index 0000000000..f4671a9d11 --- /dev/null +++ b/keyboards/s60-x/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# 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 controls +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. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/s60-x/keymaps/default/keymap.c b/keyboards/s60-x/keymaps/default/keymap.c new file mode 100644 index 0000000000..aa2856525c --- /dev/null +++ b/keyboards/s60-x/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +/* +Copyright 2016 Julien Pecqueur +Copyright 2016 Felix Uhl + +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 . +*/ + +#include "s60-x.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layout 0: Default Layer + * ,-----------------------------------------------------------. + * |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Fn1 |Gui |Alt | SpaceFn |Alt |Gui |App |Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP( + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ + LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \ + LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ + FN1, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL), + + /* Layout 1: Function Layer + * ,-----------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * | |Prv|Ply|Nxt|Stp| | |PUp|Up |PDn| |Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | |Vl-|Mut|Vl+| | |Hom|Lef|Dow|Rig|End| |PEnt | + * |-----------------------------------------------------------| + * | |Prt|Cut|Cop|Pst|Cal| | | | | |CapsLock | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ + TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \ + TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \ + TRNS, TRNS, PSCR, FN2, FN3, FN4, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), +}; + +/* +* Fn action definition +*/ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), /* SpaceFn layout 1 */ + [1] = ACTION_LAYER_MOMENTARY(1), /* Momentary layout 1 */ + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */ + [3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */ + [4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */ +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/s60-x/keymaps/default/readme.md b/keyboards/s60-x/keymaps/default/readme.md new file mode 100644 index 0000000000..73318dad72 --- /dev/null +++ b/keyboards/s60-x/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for s60-x \ No newline at end of file diff --git a/keyboards/s60-x/keymaps/felix/Makefile b/keyboards/s60-x/keymaps/felix/Makefile new file mode 100644 index 0000000000..251e4631d3 --- /dev/null +++ b/keyboards/s60-x/keymaps/felix/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # 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 controls +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. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/s60-x/keymaps/felix/keymap.c b/keyboards/s60-x/keymaps/felix/keymap.c new file mode 100644 index 0000000000..a5ff1ae4d9 --- /dev/null +++ b/keyboards/s60-x/keymaps/felix/keymap.c @@ -0,0 +1,110 @@ +/* +Copyright 2016 Julien Pecqueur +Copyright 2016 Felix Uhl + +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 . +*/ + +#include "s60-x.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layout 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|Del| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|BckSp| + * |-----------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Up |Fn1 | + * |-----------------------------------------------------------| + * |Fn2 |Gui |Alt | SpaceFn |Alt |Left|Down|Right| + * `-----------------------------------------------------------' + */ + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_UP, KC_FN1, \ + KC_FN2, KC_LGUI, KC_LALT, KC_FN0, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Layout 1: Gaming Layer, SpaceFn disabled + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | |Fn1 | + * |-----------------------------------------------------------| + * | | NOP| | Space | | | | | + * `-----------------------------------------------------------' + */ + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN1, \ + KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layout 2: Function Layer + * ,-----------------------------------------------------------. + * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RES| + * |-----------------------------------------------------------| + * | |Prv|Ply|Nxt|Stp| | |PUp|Up |PDn| |Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | |Vl-|Mut|Vl+| | |Hom|Lef|Dow|Rig|End| |PEnt | + * |-----------------------------------------------------------| + * | |Prt| | | |Cal| | | | |Pau |PUp |Rsft| + * |-----------------------------------------------------------| + * | | | | | |Home|PDn |End | + * `-----------------------------------------------------------' + */ + KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DEBUG, RESET, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_SLCK, KC_PAUS, KC_INS, \ + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_PENT, \ + KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_RSFT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), +}; + +/* +* Fn action definition +*/ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), /* SpaceFn layout 1 */ + [1] = ACTION_LAYER_TOGGLE(1), /* Disable SpaceFn */ + [2] = ACTION_LAYER_MOMENTARY(2) /* SpaceFn layout 1 */ +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/s60-x/keymaps/felix/readme.md b/keyboards/s60-x/keymaps/felix/readme.md new file mode 100644 index 0000000000..73318dad72 --- /dev/null +++ b/keyboards/s60-x/keymaps/felix/readme.md @@ -0,0 +1 @@ +# The default keymap for s60-x \ No newline at end of file diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md new file mode 100644 index 0000000000..34c48b0b7d --- /dev/null +++ b/keyboards/s60-x/readme.md @@ -0,0 +1,32 @@ +S60-x keyboard firmware +====================== +DIY compact keyboard by Massdrop. This is a port from TMK to QMK based on the [original S60-X Repo](https://github.com/jpec/s60x). + +## S60X Resources +- [Massdrop page](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit) + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/s60-x 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. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make`. + +### 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 `keymap` option like: + +``` +$ make keymap=[default|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file diff --git a/keyboards/s60-x/s60-x.c b/keyboards/s60-x/s60-x.c new file mode 100644 index 0000000000..417358140c --- /dev/null +++ b/keyboards/s60-x/s60-x.c @@ -0,0 +1,28 @@ +#include "s60-x.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // 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); +} diff --git a/keyboards/s60-x/s60-x.h b/keyboards/s60-x/s60-x.h new file mode 100644 index 0000000000..714de30db8 --- /dev/null +++ b/keyboards/s60-x/s60-x.h @@ -0,0 +1,44 @@ +/* +Copyright 2012,2013 Jun Wako +Copyright 2015 Vinícius Nery Cordeiro +Copyright 2016 Felix Uhl + +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 . +*/ + +#ifndef S60X_H +#define S60X_H + +#include "quantum.h" + +/* S60-X keymap definition macro +* K2C, K31 and K3C are extra keys for ISO +* K0D is extra key from split backspace, K3E is extra key from split right shift +*/ + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO } \ +} + +#endif