From dd05bf0d9602820bb9ba3bb1a8586b14c5504312 Mon Sep 17 00:00:00 2001 From: Baris Tosun Date: Tue, 5 Dec 2017 17:14:10 +0100 Subject: Katana60 (#2068) * Add files via upload * katana60 defaults, initial pull-request * removed icons from google drive * added simple readme files * pull-request updates * readme file updated * readme file formatting * improvements before live * colemak readme * updated readme files * removed makefiles and updated readme --- keyboards/katana60/config.h | 193 ++++++++++++++++++++++++ keyboards/katana60/katana60.c | 43 ++++++ keyboards/katana60/katana60.h | 40 +++++ keyboards/katana60/keymaps/colemak/config.h | 24 +++ keyboards/katana60/keymaps/colemak/keymap.c | 106 +++++++++++++ keyboards/katana60/keymaps/colemak/readme.md | 5 + keyboards/katana60/keymaps/default/config.h | 24 +++ keyboards/katana60/keymaps/default/keymap.c | 106 +++++++++++++ keyboards/katana60/keymaps/default/readme.md | 7 + keyboards/katana60/keymaps/rominronin/config.h | 24 +++ keyboards/katana60/keymaps/rominronin/keymap.c | 106 +++++++++++++ keyboards/katana60/keymaps/rominronin/readme.md | 5 + keyboards/katana60/readme.md | 17 +++ keyboards/katana60/rules.mk | 68 +++++++++ 14 files changed, 768 insertions(+) create mode 100644 keyboards/katana60/config.h create mode 100644 keyboards/katana60/katana60.c create mode 100644 keyboards/katana60/katana60.h create mode 100644 keyboards/katana60/keymaps/colemak/config.h create mode 100644 keyboards/katana60/keymaps/colemak/keymap.c create mode 100644 keyboards/katana60/keymaps/colemak/readme.md create mode 100644 keyboards/katana60/keymaps/default/config.h create mode 100644 keyboards/katana60/keymaps/default/keymap.c create mode 100644 keyboards/katana60/keymaps/default/readme.md create mode 100644 keyboards/katana60/keymaps/rominronin/config.h create mode 100644 keyboards/katana60/keymaps/rominronin/keymap.c create mode 100644 keyboards/katana60/keymaps/rominronin/readme.md create mode 100644 keyboards/katana60/readme.md create mode 100644 keyboards/katana60/rules.mk (limited to 'keyboards') diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h new file mode 100644 index 0000000000..169cffb420 --- /dev/null +++ b/keyboards/katana60/config.h @@ -0,0 +1,193 @@ +/* +Copyright 2017 Baris Tosun + +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 RominRonin CandyKeys +#define PRODUCT Katana60 +#define DESCRIPTION QMK keyboard firmware for Katana60 + +/* 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 { F5, F6, F4, F1, D0 } +#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +// #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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * 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)) \ +) + +#define TAPPING_TERM 200 +#define PREVENT_STUCK_MODIFIERS + +/* 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* 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 diff --git a/keyboards/katana60/katana60.c b/keyboards/katana60/katana60.c new file mode 100644 index 0000000000..e8d4fef193 --- /dev/null +++ b/keyboards/katana60/katana60.c @@ -0,0 +1,43 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "katana60.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/katana60/katana60.h b/keyboards/katana60/katana60.h new file mode 100644 index 0000000000..2cd4a2f1f9 --- /dev/null +++ b/keyboards/katana60/katana60.h @@ -0,0 +1,40 @@ +/* Copyright 2017 Baris Tosun + * + * 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 KATANA60_H +#define KATANA60_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k00, k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, KC_NO, KC_NO, k09, k0a, k0b, k0c, k0d, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { 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, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ +} + +#endif diff --git a/keyboards/katana60/keymaps/colemak/config.h b/keyboards/katana60/keymaps/colemak/config.h new file mode 100644 index 0000000000..08c51f6cb5 --- /dev/null +++ b/keyboards/katana60/keymaps/colemak/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Baris Tosun + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/katana60/keymaps/colemak/keymap.c new file mode 100644 index 0000000000..87b416440d --- /dev/null +++ b/keyboards/katana60/keymaps/colemak/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "katana60.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Windows based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LCTL(KC_LEFT) // Previous word +#define K_NXTWD LCTL(KC_RIGHT) // Next word +#define K_LSTRT KC_HOME // Start of line +#define K_LEND KC_END // End of line +#define UNDO LCTL(KC_Z) // UNDO +#define CUT LCTL(KC_X) // CUT +#define COPY LCTL(KC_C) // COPY +#define PASTE LCTL(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = KEYMAP( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = KEYMAP( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), + [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + 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) { + +} diff --git a/keyboards/katana60/keymaps/colemak/readme.md b/keyboards/katana60/keymaps/colemak/readme.md new file mode 100644 index 0000000000..4446bffca3 --- /dev/null +++ b/keyboards/katana60/keymaps/colemak/readme.md @@ -0,0 +1,5 @@ +# The colemak keymap for katana60 + +Same as the default layout, but with default Colemal layout. + +# TODO: references to extend layer and symbol layers \ No newline at end of file diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/katana60/keymaps/default/config.h new file mode 100644 index 0000000000..08c51f6cb5 --- /dev/null +++ b/keyboards/katana60/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Baris Tosun + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c new file mode 100644 index 0000000000..8dc9da00e1 --- /dev/null +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "katana60.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Windows based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LCTL(KC_LEFT) // Previous word +#define K_NXTWD LCTL(KC_RIGHT) // Next word +#define K_LSTRT KC_HOME // Start of line +#define K_LEND KC_END // End of line +#define UNDO LCTL(KC_Z) // UNDO +#define CUT LCTL(KC_X) // CUT +#define COPY LCTL(KC_C) // COPY +#define PASTE LCTL(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = KEYMAP( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = KEYMAP( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), + [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + 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) { + +} diff --git a/keyboards/katana60/keymaps/default/readme.md b/keyboards/katana60/keymaps/default/readme.md new file mode 100644 index 0000000000..a75a385869 --- /dev/null +++ b/keyboards/katana60/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for katana60 + +This layout takes my own personal layout (in development at the Colemak forum) and remaps the keys and shortcuts for Windows (I'm a MacOS user). +The testing was comducted on my Windows gaming PC, though it was not exhaustive, all the many layers and useful navigation shortcuts worked fine. + +# TODO: references to extend layer and symbol layers +# TODO: more information \ No newline at end of file diff --git a/keyboards/katana60/keymaps/rominronin/config.h b/keyboards/katana60/keymaps/rominronin/config.h new file mode 100644 index 0000000000..08c51f6cb5 --- /dev/null +++ b/keyboards/katana60/keymaps/rominronin/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Baris Tosun + * + * 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_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/katana60/keymaps/rominronin/keymap.c new file mode 100644 index 0000000000..9922936110 --- /dev/null +++ b/keyboards/katana60/keymaps/rominronin/keymap.c @@ -0,0 +1,106 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "katana60.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = KEYMAP( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = KEYMAP( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), + [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + 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) { + +} diff --git a/keyboards/katana60/keymaps/rominronin/readme.md b/keyboards/katana60/keymaps/rominronin/readme.md new file mode 100644 index 0000000000..9647426f70 --- /dev/null +++ b/keyboards/katana60/keymaps/rominronin/readme.md @@ -0,0 +1,5 @@ +# RominRonin's keymap for katana60 + +My own personal daily layout. OS keys are oriented for MacOS and the keys are in COLEMAK Mod-DH layout. + +# TODO: references to extend layer and symbol layers \ No newline at end of file diff --git a/keyboards/katana60/readme.md b/keyboards/katana60/readme.md new file mode 100644 index 0000000000..918c9b9972 --- /dev/null +++ b/keyboards/katana60/readme.md @@ -0,0 +1,17 @@ +# Katana60 + +![Katana60](https://i.imgur.com/xVkODOu.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB v1, Teensy 2.0 +Hardware Availability: [CandyKeys.com](https://CandyKeys.com) + +Make example for this keyboard (after setting up your build environment): + + make katana60:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) \ No newline at end of file diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk new file mode 100644 index 0000000000..a3571e8deb --- /dev/null +++ b/keyboards/katana60/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +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=512 + + +# 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 support (+2400 to 4200, depending on config) +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches -- cgit v1.2.3