aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Singh <iamkaratedo@gmail.com>2018-09-01 13:02:10 -0400
committerDrashna Jaelre <drashna@live.com>2018-09-01 10:02:10 -0700
commit7e5a0def3ac5632770151f40fc52e8e0c291a78a (patch)
tree2f1cf171033fdc95f511cc05366c29bd21a6fba8
parent0dcd60eeedbd3254d29e8bdf33719222a598f085 (diff)
downloadqmk_firmware-7e5a0def3ac5632770151f40fc52e8e0c291a78a.tar.gz
qmk_firmware-7e5a0def3ac5632770151f40fc52e8e0c291a78a.zip
Keymap: new planck keymap (#3809)
* Add files via upload * new planck keymap * new planck keymap * readme file updated * deleted files from qmkfirmware folder * re-added readme file to /qmk_firmware * Fix main readme (hopefully)
-rw-r--r--keyboards/planck/keymaps/vaire/config.h37
-rw-r--r--keyboards/planck/keymaps/vaire/keymap.c150
-rw-r--r--keyboards/planck/keymaps/vaire/readme.md6
-rw-r--r--keyboards/planck/keymaps/vaire/rules.mk82
4 files changed, 275 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/vaire/config.h b/keyboards/planck/keymaps/vaire/config.h
new file mode 100644
index 000000000..96a13cc42
--- /dev/null
+++ b/keyboards/planck/keymaps/vaire/config.h
@@ -0,0 +1,37 @@
1#pragma
2
3
4
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MOUSEKEY_INTERVAL 16
17#define MOUSEKEY_DELAY 0
18#define MOUSEKEY_TIME_TO_MAX 60
19#define MOUSEKEY_MAX_SPEED 7
20#define MOUSEKEY_WHEEL_DELAY 0
21
22
23#define MIDI_BASIC
24
25#define BACKLIGHT_BREATHING
26
27
28/* enable advanced MIDI features:
29 - MIDI notes can be added to the keymap
30 - Octave shift and transpose
31 - Virtual sustain, portamento, and modulation wheel
32 - etc.
33*/
34//#define MIDI_ADVANCED
35
36/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
37//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/planck/keymaps/vaire/keymap.c b/keyboards/planck/keymaps/vaire/keymap.c
new file mode 100644
index 000000000..71cbcd8bd
--- /dev/null
+++ b/keyboards/planck/keymaps/vaire/keymap.c
@@ -0,0 +1,150 @@
1#include QMK_KEYBOARD_H
2 #include "action_layer.h"
3
4
5extern keymap_config_t keymap_config;
6
7#define EXCEL_HOME LALT(KC_H)
8#define EXCEL_COL LCTL(KC_SPC)
9#define EXCEL_ROW LSFT(KC_SPC)
10#define DESK_LEFT LCTL(LGUI(KC_LEFT))
11#define WIN_LEFT LSFT(KC_TAB)
12#define WIN_CLOSE LALT(KC_F4)
13#define WIN_RIGHT KC_TAB
14#define DESK_RIGHT LCTL(LGUI(KC_RGHT))
15#define DOCS LGUI(KC_E)
16#define SNAP_RIGHT LGUI(KC_RGHT)
17#define SNAP_UP LGUI(KC_UP)
18#define SNAP_LEFT LGUI(KC_LEFT)
19#define SNAP_DOWN LGUI(KC_DOWN)
20#define COPY LCTL(KC_C)
21#define PASTE LCTL(KC_V)
22#define CUT LCTL(KC_X)
23#define UNDO LCTL(KC_Z)
24#define FIND LCTL(KC_F)
25
26
27
28
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30
31
32
33 LAYOUT_planck_grid(
34 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
35 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
36 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_T(KC_ENT),
37 MO(1), KC_LCTL, KC_LALT, KC_LGUI, MO(2), LT(5,KC_ENT), LT(4,KC_SPC), MO(3), KC_SLSH, KC_LEFT, KC_DOWN, CTL_T(KC_RGHT)),
38
39 LAYOUT_planck_grid(
40 KC_ESC, KC_NLCK, LCTL(KC_SPC), KC_UP, LSFT(KC_SPC), KC_DLR, KC_EQL, KC_P7, KC_P8, KC_P9, KC_PPLS, LCTL(KC_BSPC),
41 KC_TAB, FIND, KC_LEFT, KC_DOWN, KC_RGHT, KC_PERC, KC_CIRC, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_BSLS,
42 KC_LSFT, UNDO, CUT, COPY, PASTE, EXCEL_HOME, KC_PSCR, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_LSFT,
43 KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, TO(1), KC_ENT, KC_SPC, KC_PENT, KC_P0, KC_PDOT, KC_PAST, KC_LCTL),
44
45 LAYOUT_planck_grid(
46 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
47 KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LT, KC_GT, KC_LPRN,
48 KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_MPLY, KC_MNXT, KC_PGUP, SFT_T(KC_VOLU),
49 TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_ENT, KC_SPC, MO(3), KC_PSCR, KC_MPRV, KC_PGDOWN, CTL_T(KC_VOLD)),
50
51 LAYOUT_planck_grid(
52 KC_TILD, DESK_LEFT, WIN_LEFT, KC_F4, WIN_RIGHT, DESK_RIGHT, DOCS, SNAP_LEFT, SNAP_UP, SNAP_RIGHT, SNAP_DOWN, KC_DEL,
53 KC_CAPS, KC_QUOT, KC_LBRC, KC_LCBR, KC_LPRN, KC_BSLS, KC_SLSH, KC_RPRN, KC_RCBR, KC_RBRC, KC_DQUO, KC_QUOT,
54 KC_PWR, KC_SLEP, KC_WAKE, KC_HOME, BL_BRTG, BL_STEP, KC_TRNS, KC_CALC, KC_LT, KC_GT, KC_COLON, KC_LSFT,
55 TO(0), KC_LCTL, KC_LALT, KC_LGUI, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, AU_TOG, MU_TOG, MU_MOD, LCTL(KC_RGHT)),
56
57 LAYOUT_planck_grid(
58 TO(0), KC_LSCR, WIN_LEFT, KC_MS_WH_UP, WIN_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_U, KC_MS_BTN2, KC_TRNS, KC_TRNS,
59 KC_TRNS, KC_INS, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS,
60 RESET, KC_APP, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_MS_ACCEL0, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), TO(4),
61 TO(0), KC_MENU, KC_TRNS, KC_TRNS, KC_LALT, KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RCTL),
62
63 LAYOUT_planck_grid(
64 KC_BSPC, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSPC,
65 KC_TAB, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, KC_QUOT,
66 KC_LSFT, KC_ENT, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, SFT_T(KC_ENT),
67 TO(0), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_TRNS, KC_TRNS, MO(3), KC_SLSH, KC_LEFT, KC_DOWN, LCTL(KC_RGHT)),
68
69
70
71};
72
73
74#ifdef AUDIO_ENABLE
75
76void matrix_init_user(void)
77{
78 set_voice(default_voice);
79 startup_user();
80 println("Matrix Init");
81}
82
83void led_set_user(uint8_t usb_led)
84{
85 static uint8_t old_usb_led = 0;
86
87 _delay_ms(10); // gets rid of tick
88
89 if (!is_playing_notes())
90 {
91 if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
92 {
93 // If CAPS LK LED is turning on...
94 PLAY_SONG(tone_caps_on);
95 }
96 else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK)))
97 {
98 // If CAPS LK LED is turning off...
99 PLAY_SONG(tone_caps_off);
100 }
101 else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK)))
102 {
103 // If NUM LK LED is turning on...
104 PLAY_SONG(tone_numlk_on);
105 }
106 else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK)))
107 {
108 // If NUM LED is turning off...
109 PLAY_SONG(tone_numlk_off);
110 }
111 else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
112 {
113 // If SCROLL LK LED is turning on...
114 PLAY_SONG(tone_scroll_on);
115 }
116 else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
117 {
118 // If SCROLL LED is turning off...
119 PLAY_SONG(tone_scroll_off);
120 }
121 }
122
123 old_usb_led = usb_led;
124}
125
126
127void startup_user()
128{
129 _delay_ms(30); // gets rid of tick
130 PLAY_SONG(tone_my_startup);
131}
132
133void shutdown_user()
134{
135 PLAY_SONG(tone_my_goodbye);
136 _delay_ms(3000);
137 stop_all_notes();
138}
139
140void audio_on_user(void)
141{
142 PLAY_SONG(tone_audio_on);
143}
144
145void music_on_user(void)
146{
147 PLAY_SONG(tone_music_on);
148}
149
150#endif /* AUDIO_ENABLE */ \ No newline at end of file
diff --git a/keyboards/planck/keymaps/vaire/readme.md b/keyboards/planck/keymaps/vaire/readme.md
new file mode 100644
index 000000000..6ce39de95
--- /dev/null
+++ b/keyboards/planck/keymaps/vaire/readme.md
@@ -0,0 +1,6 @@
1#The vaire planck layout
2
3- easy access numpad
4- mouse and wheel controls
5- flipped keyboard for one hand typing
6- sound on all num, scroll, and caps lock \ No newline at end of file
diff --git a/keyboards/planck/keymaps/vaire/rules.mk b/keyboards/planck/keymaps/vaire/rules.mk
new file mode 100644
index 000000000..22e4bd934
--- /dev/null
+++ b/keyboards/planck/keymaps/vaire/rules.mk
@@ -0,0 +1,82 @@
1# MCU name
2#MCU = at90usb1287
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Bootloader
38# This definition is optional, and if your keyboard supports multiple bootloaders of
39# different sizes, comment this out, and the correct address will be loaded
40# automatically (+60). See bootloader.mk for all options.
41ifeq ($(strip $(KEYBOARD)), planck/rev3)
42 BOOTLOADER = atmel-dfu
43endif
44ifeq ($(strip $(KEYBOARD)), planck/rev4)
45 BOOTLOADER = atmel-dfu
46endif
47ifeq ($(strip $(KEYBOARD)), planck/rev5)
48 BOOTLOADER = qmk-dfu
49endif
50ifeq ($(strip $(KEYBOARD)), planck/light)
51 BOOTLOADER = qmk-dfu
52endif
53
54# Interrupt driven control endpoint task(+60)
55OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
56
57# Build Options
58# change to "no" to disable the options, or define them in the Makefile in[]
59# the appropriate keymap folder that will get included automatically
60#
61BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
62MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
63EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
64CONSOLE_ENABLE = no # Console for debug(+400)
65COMMAND_ENABLE = no # Commands for debug and configuration
66NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
67BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
68MIDI_ENABLE = no # MIDI controls
69AUDIO_ENABLE = yes # Audio output on port C6
70UNICODE_ENABLE = no # Unicode
71BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
72RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
73API_SYSEX_ENABLE = no
74
75# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
76SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
77
78LAYOUTS = ortho_4x12 planck_mit planck_grid
79LAYOUTS_HAS_RGB = no
80
81DEFAULT_FOLDER = planck/rev5
82