From f8ed4ed573c798bd40a1063072fd619732a2d49a Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Tue, 21 Feb 2017 09:39:51 +0700 Subject: Initial work for my kbod support in qmk_firmware - Wiring layout done No actual keymap yet --- keyboards/handwired/kbod/Makefile | 3 + keyboards/handwired/kbod/config.h | 162 +++++++++++++++++++++ keyboards/handwired/kbod/kbod.c | 28 ++++ keyboards/handwired/kbod/kbod.h | 25 ++++ keyboards/handwired/kbod/keymaps/default/Makefile | 21 +++ keyboards/handwired/kbod/keymaps/default/config.h | 8 + keyboards/handwired/kbod/keymaps/default/keymap.c | 44 ++++++ keyboards/handwired/kbod/keymaps/default/readme.md | 1 + keyboards/handwired/kbod/readme.md | 28 ++++ keyboards/handwired/kbod/rules.mk | 68 +++++++++ 10 files changed, 388 insertions(+) create mode 100644 keyboards/handwired/kbod/Makefile create mode 100644 keyboards/handwired/kbod/config.h create mode 100644 keyboards/handwired/kbod/kbod.c create mode 100644 keyboards/handwired/kbod/kbod.h create mode 100644 keyboards/handwired/kbod/keymaps/default/Makefile create mode 100644 keyboards/handwired/kbod/keymaps/default/config.h create mode 100644 keyboards/handwired/kbod/keymaps/default/keymap.c create mode 100644 keyboards/handwired/kbod/keymaps/default/readme.md create mode 100644 keyboards/handwired/kbod/readme.md create mode 100644 keyboards/handwired/kbod/rules.mk (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/Makefile b/keyboards/handwired/kbod/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/handwired/kbod/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h new file mode 100644 index 000000000..e73b7d086 --- /dev/null +++ b/keyboards/handwired/kbod/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +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 fudanchii +#define PRODUCT kbod +#define DESCRIPTION Keyboard of Disapproval + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * 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 { C6, D7, E6, B4, B5, B6, B7, D6 } +#define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#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/handwired/kbod/kbod.c b/keyboards/handwired/kbod/kbod.c new file mode 100644 index 000000000..9a12cae0d --- /dev/null +++ b/keyboards/handwired/kbod/kbod.c @@ -0,0 +1,28 @@ +#include "kbod.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/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h new file mode 100644 index 000000000..629fb3eac --- /dev/null +++ b/keyboards/handwired/kbod/kbod.h @@ -0,0 +1,25 @@ +#ifndef KBOD_H +#define KBOD_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 arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + 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, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ +} + +#endif diff --git a/keyboards/handwired/kbod/keymaps/default/Makefile b/keyboards/handwired/kbod/keymaps/default/Makefile new file mode 100644 index 000000000..0d9def930 --- /dev/null +++ b/keyboards/handwired/kbod/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 = no # 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/handwired/kbod/keymaps/default/config.h b/keyboards/handwired/kbod/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/handwired/kbod/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c new file mode 100644 index 000000000..9245270eb --- /dev/null +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +#include "kbod.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( /* Base */ + KC_A, KC_1, KC_H, \ + KC_TAB, KC_SPC \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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) { + +} \ No newline at end of file diff --git a/keyboards/handwired/kbod/keymaps/default/readme.md b/keyboards/handwired/kbod/keymaps/default/readme.md new file mode 100644 index 000000000..3fe84c619 --- /dev/null +++ b/keyboards/handwired/kbod/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for kbod \ No newline at end of file diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md new file mode 100644 index 000000000..179ab1d79 --- /dev/null +++ b/keyboards/handwired/kbod/readme.md @@ -0,0 +1,28 @@ +kbod keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/kbod 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 default`. + +### 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|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk new file mode 100644 index 000000000..4fcd147a9 --- /dev/null +++ b/keyboards/handwired/kbod/rules.mk @@ -0,0 +1,68 @@ +# 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 ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # 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 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches -- cgit v1.2.3 From 8b206e1e75f487a473b8a58223c857363ce0a6e4 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Wed, 22 Feb 2017 06:40:48 +0700 Subject: Add initial keymap *crossfingers* --- keyboards/handwired/kbod/kbod.h | 4 - keyboards/handwired/kbod/keymaps/default/keymap.c | 97 +++++++++++++++++------ 2 files changed, 73 insertions(+), 28 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h index 629fb3eac..04ecdd392 100644 --- a/keyboards/handwired/kbod/kbod.h +++ b/keyboards/handwired/kbod/kbod.h @@ -3,10 +3,6 @@ #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 arguements -// The second converts the arguments into a two-dimensional array #define KEYMAP( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 9245270eb..137ddf387 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -1,43 +1,92 @@ #include "kbod.h" +#define _____ KC_TRNS + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Base */ - KC_A, KC_1, KC_H, \ - KC_TAB, KC_SPC \ -), + KEYMAP( /* Base */ + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC, + 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_BSLASH, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPO, + LT(1, KC_LEAD), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + KEYMAP( /* Cursor layer */ + KC_GRAVE, 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_DEL, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, KC_END, _____, + _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_UP, _____, + _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT, _____ + ), + KEYMAP( /* Multimedia layer */ + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_UP, _____, + LT(3, KC_LEAD), _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 + ), + KEYMAP( /* Multimedia layer */ + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, _____, + _____, _____, _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 + ), }; const uint16_t PROGMEM fn_actions[] = { - + [0] = ACTION_FUNCTION(0), }; -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; +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case 0: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } } - return MACRO_NONE; -}; - + break; + } +} -void matrix_init_user(void) { -} +LEADER_EXTERNS(); void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_B) { + layer_switch(0); + } + SEQ_ONE_KEY(KC_C) { + layer_switch(1); + } + SEQ_ONE_KEY(KC_M) { + layer_switch(2); + } + } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; void led_set_user(uint8_t usb_led) { -- cgit v1.2.3 From 7614c6b7a75c93b248d36f039f919ab925afde32 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Fri, 24 Feb 2017 12:06:10 +0700 Subject: Remove lead keys, fix some typos, rearrange layers --- keyboards/handwired/kbod/kbod.h | 2 +- keyboards/handwired/kbod/keymaps/default/keymap.c | 37 ++++++----------------- 2 files changed, 10 insertions(+), 29 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h index 04ecdd392..356063624 100644 --- a/keyboards/handwired/kbod/kbod.h +++ b/keyboards/handwired/kbod/kbod.h @@ -6,7 +6,7 @@ #define KEYMAP( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ 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, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ k40, k41, k42, k43, k44, k45, k46, k47 \ ) \ diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 137ddf387..463b1fc8b 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -7,29 +7,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC, 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_BSLASH, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPO, - LT(1, KC_LEAD), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, + MO(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), KEYMAP( /* Cursor layer */ KC_GRAVE, 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_DEL, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, KC_END, _____, + TO(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, + TO(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, KC_END, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_UP, _____, - _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT, _____ + _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT, _____ ), KEYMAP( /* Multimedia layer */ _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_UP, _____, - LT(3, KC_LEAD), _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 + TO(0), _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 ), KEYMAP( /* Multimedia layer */ _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, _____, - _____, _____, _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 + TO(0), _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 ), }; @@ -37,6 +37,7 @@ const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(0), }; +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t shift_esc_shift_mask; switch (id) { @@ -63,31 +64,11 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } } - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_B) { - layer_switch(0); - } - SEQ_ONE_KEY(KC_C) { - layer_switch(1); - } - SEQ_ONE_KEY(KC_M) { - layer_switch(2); - } - } -} - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; void led_set_user(uint8_t usb_led) { - + } \ No newline at end of file -- cgit v1.2.3 From af7430b896bdc15dd007b2227ed0b6f2feb0634a Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sat, 25 Feb 2017 12:36:53 +0700 Subject: Add capslock led, and audio buttons - Also change layer switch to momentary --- keyboards/handwired/kbod/keymaps/default/keymap.c | 42 ++++++++++++++--------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 463b1fc8b..3514ffb98 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -2,34 +2,36 @@ #define _____ KC_TRNS +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( /* Base */ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC, 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_BSLASH, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, MO(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), KEYMAP( /* Cursor layer */ KC_GRAVE, 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_DEL, - TO(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, - TO(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, KC_END, _____, - _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_UP, _____, - _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT, _____ + MO(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, + MO(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____, + _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP, + _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT ), KEYMAP( /* Multimedia layer */ - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_UP, _____, - TO(0), _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 + _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, + _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 ), KEYMAP( /* Multimedia layer */ - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____, + _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, _____, - TO(0), _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 + _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2, + _____, _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 ), }; @@ -37,7 +39,7 @@ const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(0), }; -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint8_t shift_esc_shift_mask; switch (id) { @@ -66,9 +68,17 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; + return MACRO_NONE; }; void led_set_user(uint8_t usb_led) { - + if (usb_led & _BV(USB_LED_CAPS_LOCK)) { + PORTB |= _BV(PB0); + } else { + PORTB &= ~_BV(PB0); + } +} + +void matrix_init_user(void) { + DDRB |= _BV(PB0); } \ No newline at end of file -- cgit v1.2.3 From c9dd11d5abec11aa046031c12b1aa5edc5efae77 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sat, 25 Feb 2017 13:30:18 +0700 Subject: Enable alt-F4 without [Fn] - Add led indicator when keymap not on base layer \o/ --- keyboards/handwired/kbod/keymaps/default/keymap.c | 62 +++++++++++++++-------- 1 file changed, 41 insertions(+), 21 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 3514ffb98..6f2805d9d 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -2,11 +2,31 @@ #define _____ KC_TRNS -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn))) + +#define SET_WHETHER(mask, btn1, btn2) \ +if (record->event.pressed) { \ + if (mask) { \ + add_key(btn2); \ + send_keyboard_report(); \ + } else { \ + add_key(btn1); \ + send_keyboard_report(); \ + } \ +} else { \ + if (mask) { \ + del_key(btn2); \ + send_keyboard_report(); \ + } else { \ + del_key(btn1); \ + send_keyboard_report(); \ + } \ +} \ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( /* Base */ - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC, + F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC, 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_BSLASH, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, @@ -37,31 +57,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(0), + [1] = ACTION_FUNCTION(1), }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; + static uint8_t shift_esc_mask; + static uint8_t alt_mask; switch (id) { case 0: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } + shift_esc_mask = MODS_PRESSED(SHIFT); + SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE) + break; + case 1: + alt_mask = MODS_PRESSED(ALT); + SET_WHETHER(alt_mask, KC_4, KC_F4); break; } } @@ -81,4 +91,14 @@ void led_set_user(uint8_t usb_led) { void matrix_init_user(void) { DDRB |= _BV(PB0); + DDRC |= _BV(PC7); +} + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + if (layer) { + PORTC |= _BV(PC7); + } else { + PORTC &= ~_BV(PC7); + } } \ No newline at end of file -- cgit v1.2.3 From 10105f645a7fdcf0d636e0eb2c768754521602a3 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sun, 26 Feb 2017 11:41:03 +0700 Subject: Add README --- keyboards/handwired/kbod/keymaps/default/readme.md | 6 +++++- keyboards/handwired/kbod/readme.md | 25 +++++++--------------- 2 files changed, 13 insertions(+), 18 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/keymaps/default/readme.md b/keyboards/handwired/kbod/keymaps/default/readme.md index 3fe84c619..35c22ec00 100644 --- a/keyboards/handwired/kbod/keymaps/default/readme.md +++ b/keyboards/handwired/kbod/keymaps/default/readme.md @@ -1 +1,5 @@ -# The default keymap for kbod \ No newline at end of file +# The default keymap for kbod + +This is the default keymap for kbod, + +it consists of a base layer with QWERTY layout, a momentary cursor-layer, and mouse-keys and multimedia layers. \ No newline at end of file diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md index 179ab1d79..bd58fdd38 100644 --- a/keyboards/handwired/kbod/readme.md +++ b/keyboards/handwired/kbod/readme.md @@ -1,28 +1,19 @@ -kbod keyboard firmware +KBOD keyboard firmware ====================== +KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60 + ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme](/). ## Building -Download or clone the whole firmware and navigate to the keyboards/kbod 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 default`. +Download or clone the whole firmware and use ```make handwired-kbod-default``` to generate the .hex file. You may flash it with avrdude -### 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: +## Flashing +Something along this line: ``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +avrdude -p m32u4 -c avr109 -P -C -e -u flash:w:handwired_kbod_default.hex +``` \ No newline at end of file -- cgit v1.2.3 From f5d78c739d48bad32409b3819c8d624d5e78c017 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sun, 26 Feb 2017 11:44:21 +0700 Subject: Forgot semicolon, and add reference link --- keyboards/handwired/kbod/keymaps/default/keymap.c | 2 +- keyboards/handwired/kbod/readme.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 6f2805d9d..a6c09dd53 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -67,7 +67,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { case 0: shift_esc_mask = MODS_PRESSED(SHIFT); - SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE) + SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE); break; case 1: alt_mask = MODS_PRESSED(ALT); diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md index bd58fdd38..67bf711be 100644 --- a/keyboards/handwired/kbod/readme.md +++ b/keyboards/handwired/kbod/readme.md @@ -16,4 +16,6 @@ Something along this line: ``` avrdude -p m32u4 -c avr109 -P -C -e -u flash:w:handwired_kbod_default.hex -``` \ No newline at end of file +``` + +[More info](https://github.com/fudanchii/keyboard_of_disapproval) \ No newline at end of file -- cgit v1.2.3 From 15ddaa7f1929aa301a325b03c57e267524d56ea8 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Sat, 11 Mar 2017 20:52:52 +0700 Subject: Fix layer stuck, and add numpad support --- keyboards/handwired/kbod/config.h | 5 +++++ keyboards/handwired/kbod/keymaps/default/keymap.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index e73b7d086..f3d0c8bf2 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -159,4 +159,9 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#define PREVENT_STUCK_MODIFIERS + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 + #endif diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index a6c09dd53..65c5f552c 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLASH, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, - MO(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), KEYMAP( /* Cursor layer */ KC_GRAVE, 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_DEL, @@ -39,19 +39,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP, _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT ), - KEYMAP( /* Multimedia layer */ - TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, + KEYMAP( /* Keypad layer */ + TO(0), _____, _____, _____, _____, _____, _____, KC_P7, KC_P8, KC_P9, _____, KC_PMNS, KC_PPLS, _____, + _____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____, + _____, _____, _____, _____, _____, _____, _____, KC_P0, _____, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 ), KEYMAP( /* Multimedia layer */ TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, - _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2, - _____, _____, _____, _____, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 + _____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____, + _____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, + _____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2, + _____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3 ), }; -- cgit v1.2.3 From 649d08742a7aec4001193bb5a7a35ca7935a9753 Mon Sep 17 00:00:00 2001 From: Nurahmadie Date: Tue, 28 Mar 2017 16:17:10 +0700 Subject: Use tap-toggle to move between layers. - Add PDOT key --- keyboards/handwired/kbod/keymaps/default/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/handwired/kbod') diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 65c5f552c..1386b742f 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -34,16 +34,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), KEYMAP( /* Cursor layer */ KC_GRAVE, 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_DEL, - MO(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, - MO(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____, + TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT, + TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP, _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT ), KEYMAP( /* Keypad layer */ - TO(0), _____, _____, _____, _____, _____, _____, KC_P7, KC_P8, KC_P9, _____, KC_PMNS, KC_PPLS, _____, + TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, _____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____, - _____, _____, _____, _____, _____, _____, _____, KC_P0, _____, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, + _____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3 ), KEYMAP( /* Multimedia layer */ -- cgit v1.2.3