Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
74f2f855a3 | |||
e4bbe057f2 | |||
661ca4440c | |||
08c682c193 | |||
9bd6d6112d | |||
af5f59636e | |||
3892829d74 | |||
3c20983055 | |||
b1935c5e0d | |||
3916b06168 | |||
444def8411 |
@ -53,6 +53,8 @@ but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
## Tips for Making Layouts Keyboard-Agnostic
|
||||
|
||||
### Includes
|
||||
|
||||
Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
@ -72,3 +74,7 @@ For example:
|
||||
```
|
||||
|
||||
Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly.
|
||||
|
||||
### Keymaps
|
||||
|
||||
In order to support both split and non-split keyboards with the same layout, you need to use the keyboard agnostic `LAYOUT_<layout name>` macro in your keymap. For instance, in order for a Let's Split and Planck to share the same layout file, you need to use `LAYOUT_ortho_4x12` instead of `LAYOUT_planck_grid` or just `{}` for a C array.
|
||||
|
@ -8,5 +8,5 @@ Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make eagle_viper/v2:default
|
||||
make duck/eagle_viper/v2:default
|
||||
|
3
keyboards/duck/eagle_viper/rules.mk
Normal file
3
keyboards/duck/eagle_viper/rules.mk
Normal file
@ -0,0 +1,3 @@
|
||||
DEFAULT_FOLDER = duck/eagle_viper/v2
|
||||
|
||||
LAYOUTS = 60_ansi
|
@ -16,7 +16,7 @@
|
||||
#ifndef V2_H
|
||||
#define V2_H
|
||||
|
||||
#include "../eagle_viper.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
@ -13,6 +13,6 @@ To get into bootloader mode, hold the top top most key above the 2 navigation ke
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make jetfire:default
|
||||
make duck/jetfire: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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright 2017 MechMerlin <mechmerlin@gmail.com>
|
||||
/* Copyright 2018 MechMerlin <mechmerlin@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -15,25 +15,23 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* layer 0: qwerty */
|
||||
[0] = LAYOUT_75_ansi(\
|
||||
KC_ESC, 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_PSCR, KC_PAUS, KC_DEL,
|
||||
KC_GRV, 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_BSPC, KC_HOME,
|
||||
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_BSLS, KC_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
#define _BL 0 // Base Layer
|
||||
#define _FL 1 // Fn Layer
|
||||
|
||||
[1] = LAYOUT_75_ansi(\
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BL] = LAYOUT_75_ansi(\
|
||||
KC_ESC, 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_PSCR, KC_PAUS, KC_DEL,
|
||||
KC_GRV, 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_BSPC, KC_HOME,
|
||||
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_BSLS, KC_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[_FL] = LAYOUT_75_ansi(\
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, 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, RESET, 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)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
0
keyboards/duck/octagon/keymaps/default/readme.md
Normal file
0
keyboards/duck/octagon/keymaps/default/readme.md
Normal file
@ -8,4 +8,4 @@ Newest version is the [Octagon V2](http://duck0113.tistory.com/127)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make octagon/v2:default
|
||||
make duck/octagon/v2:default
|
1
keyboards/duck/octagon/rules.mk
Normal file
1
keyboards/duck/octagon/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
DEFAULT_FOLDER = duck/octagon/v2
|
@ -9,7 +9,7 @@ Hardware Availability: Wait until GB of the next revision
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make octagon/v1:default
|
||||
make duck/octagon/v1: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.
|
||||
|
@ -16,7 +16,7 @@
|
||||
#ifndef V1_H
|
||||
#define V1_H
|
||||
|
||||
#include "../octagon.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5P, \
|
||||
@ -33,4 +33,20 @@
|
||||
{ K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \
|
||||
{ K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \
|
||||
}
|
||||
|
||||
#define LAYOUT_75_ansi( \
|
||||
K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \
|
||||
K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4P, \
|
||||
K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \
|
||||
K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, K2P, \
|
||||
K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1P, \
|
||||
K0A, K0B, K0C, K0G, K0J, K0K, K0L, K0M, K0N, K0P \
|
||||
) { \
|
||||
{ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P }, \
|
||||
{ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, KC_NO, K4P }, \
|
||||
{ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, KC_NO, K3P }, \
|
||||
{ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, K2N, KC_NO, K2P }, \
|
||||
{ K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \
|
||||
{ K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \
|
||||
}
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user