forked from mirrors/qmk_firmware
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a0245b778 | ||
|
|
43d2a0e167 | ||
|
|
212aeee202 | ||
|
|
5fb95c5f94 | ||
|
|
05d6e6ca78 | ||
|
|
645c5fabf2 | ||
|
|
7f7b6b08e8 | ||
|
|
72d7661b30 | ||
|
|
d0d106cef7 | ||
|
|
d603e94f68 | ||
|
|
9ff61601e3 | ||
|
|
09370a95db | ||
|
|
e9ffc53476 | ||
|
|
480a391929 | ||
|
|
154336ee27 |
@@ -175,7 +175,9 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
else
|
||||
OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
OPT_DEFS += -DLED_MATRIX_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
endif
|
||||
@@ -300,10 +302,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE := yes
|
||||
endif
|
||||
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/backlight
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight.c
|
||||
OPT_DEFS += -DBACKLIGHT_ENABLE
|
||||
@@ -343,6 +341,10 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||
LED_TABLES := yes
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* [Getting Help](getting_started_getting_help.md)
|
||||
|
||||
* [Breaking Changes](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
|
||||
* [FAQ](faq.md)
|
||||
|
||||
42
docs/breaking_changes_instructions.md
Normal file
42
docs/breaking_changes_instructions.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Breaking Changes: My Pull Request Was Flagged
|
||||
|
||||
A QMK member may have replied to your pull request stating that your submission is a breaking change. In their judgment, the changes you have proposed have greater implications for either QMK, or its users.
|
||||
|
||||
Some things that may cause a pull request to be flagged are:
|
||||
|
||||
- **Edits to User Keymaps**
|
||||
A user may submit their keymap to QMK, then some time later open a pull request with further updates, only to find it can't be merged because it was edited in the `qmk/qmk_firmware` repository. As not all users are proficient at using Git or GitHub, the user may find themself unable to fix the issue on their own.
|
||||
- **Changes to Expected Behavior**
|
||||
Changes to QMK behavior may cause users to believe their hardware or QMK is broken if they flash new firmware that incorporates changes to existing QMK features, and find themselves without a means to restore the desired behavior.
|
||||
- **Changes Requiring User Action**
|
||||
Changes may also require action to be taken by users, such as updating a toolchain or taking some action in Git.
|
||||
- **Changes Necessitating Increased Scrutiny**
|
||||
On occasion, a submission may have implications for QMK as a project. This could be copyright/licensing issues, coding conventions, large feature overhauls, "high-risk" changes that need wider testing by our community, or something else entirely.
|
||||
- **Changes Requiring Communication to End Users**
|
||||
This includes warnings about future deprecations, outdated practices, and anything else that needs to be communicated but doesn't fit into one of the above categories.
|
||||
|
||||
## What Do I Do?
|
||||
|
||||
If it is determined that your submission is a breaking change, there are a few things you can do to smooth the process:
|
||||
|
||||
### Consider Splitting Up Your PR
|
||||
|
||||
If you are contributing core code, and the only reason it needs to go through breaking changes is that you are updating keymaps to match your change, consider whether you can submit your feature in a way that the old keymaps continue to work. Then submit a separate PR that goes through the breaking changes process to remove the old code.
|
||||
|
||||
### Contribute a ChangeLog Entry
|
||||
|
||||
We require submissions that go through the Breaking Change process to include a changelog entry. The entry should be a short summary of the changes your pull request makes – [each section here started as a changelog](ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft").
|
||||
|
||||
Your changelog should be located at `docs/ChangeLog/YYYYMMDD/PR####.md`, where `YYYYMMDD` is the date on which QMK's breaking change branch – usually named `future` – will be merged into the `master` branch, and `####` is the number of your pull request.
|
||||
|
||||
If your submission requires action on the part of users, your changelog should instruct users what action(s) must be taken, or link to a location that does so.
|
||||
|
||||
### Document Your Changes
|
||||
|
||||
Understanding the purpose for your submission, and possible implications or actions it will require can make the review process more straightforward. A changelog may suffice for this purpose, but more extensive changes may require a level of detail that is ill-suited for a changelog.
|
||||
|
||||
Commenting on your pull request and being responsive to questions, comments, and change requests is much appreciated.
|
||||
|
||||
### Ask for Help
|
||||
|
||||
Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh).
|
||||
@@ -48,8 +48,6 @@ void led_set_user(uint8_t usb_led){
|
||||
} else {
|
||||
//set to Hi-Z
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ CHANGELOG:
|
||||
0.6 - Swapped ESC and GRV in all layers.
|
||||
0.7 - Brought code up to current standards.
|
||||
0.8 - Added MACLOCK macro.
|
||||
0.9 - Updated code to correspond to new setPinInput behaviour
|
||||
|
||||
TODO:
|
||||
|
||||
@@ -124,9 +125,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h
|
||||
### 0.7
|
||||
* Brought code up to new standards (as of 27 June 2019).
|
||||
* Updated this readme file.
|
||||
### 0.8
|
||||
* Added MACLOCK macro.
|
||||
### 0.9
|
||||
* Updated code to correspond to new setPinInput behaviour.
|
||||
|
||||
### TODO:
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
LAYOUTS = ortho_4x12
|
||||
|
||||
@@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
LAYOUTS = ortho_5x12
|
||||
|
||||
@@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
RGBLIGHT_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
|
||||
@@ -22,4 +22,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
@@ -54,3 +54,25 @@
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
|
||||
/* Underlight configuration
|
||||
*/
|
||||
#define RGB_DI_PIN D7
|
||||
#define RGBLED_NUM 18 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 32
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "rev4.h"
|
||||
//#include "backlight.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
@@ -7,19 +8,49 @@ void matrix_init_kb(void) {
|
||||
led_init_ports();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
print("init_backlight_pin()\n");
|
||||
// Set our LED pins as output
|
||||
//DDRD |= (1<<6); // Esc
|
||||
//DDRB |= (1<<7); // Page Up
|
||||
//DDRD |= (1<<4); // Arrows
|
||||
|
||||
// Set our LED pins low
|
||||
//PORTD &= ~(1<<6); // Esc
|
||||
//PORTB &= ~(1<<7); // Page Up
|
||||
//PORTD &= ~(1<<4); // Arrows
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level) {
|
||||
/*
|
||||
if ( level == 0 ) {
|
||||
// Turn off light
|
||||
PORTD |= (1<<6); // Esc
|
||||
PORTB |= (1<<7); // Page Up
|
||||
PORTD |= (1<<4); // Arrows
|
||||
} else {
|
||||
// Turn on light
|
||||
PORTD &= ~(1<<6); // Esc
|
||||
PORTB &= ~(1<<7); // Page Up
|
||||
PORTD &= ~(1<<4); // Arrows
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
// Set our LED pins as output
|
||||
setPinOutput(B13); // LED1
|
||||
writePinLow(B13);
|
||||
|
||||
setPinOutput(B14); // LED2
|
||||
writePinLow(B14);
|
||||
|
||||
setPinOutput(B8); // LED3
|
||||
writePinLow(B8);
|
||||
|
||||
setPinOutput(B0); // Capslock LED
|
||||
writePinLow(B0);
|
||||
palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1
|
||||
palClearPad(GPIOB, 13);
|
||||
palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2
|
||||
palClearPad(GPIOB, 14);
|
||||
palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3
|
||||
palClearPad(GPIOA, 8);
|
||||
palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED
|
||||
palClearPad(GPIOA, 0);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
@@ -4,17 +4,18 @@ MCU = STM32F303
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
BACKLIGHT_ENABLE = yes
|
||||
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 = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
AUDIO_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
|
||||
BACKLIGHT_ENABLE = no
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = yes
|
||||
|
||||
LAYOUTS = 66_ansi 66_iso
|
||||
|
||||
@@ -16,6 +16,5 @@
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
#include "backlight.h"
|
||||
#include "led.h"
|
||||
#include "printf.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "timer.h"
|
||||
#include "wait.h"
|
||||
#include "printf.h"
|
||||
#include "backlight.h"
|
||||
#include "matrix.h"
|
||||
#include "action.h"
|
||||
#include "keycode.h"
|
||||
|
||||
@@ -7,7 +7,6 @@ LED_MATRIX_ENABLE = IS31FL3731
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
|
||||
@@ -52,49 +52,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||
# define RGB_MATRIX_HUE_STEP 8
|
||||
# define RGB_MATRIX_SAT_STEP 8
|
||||
# define RGB_MATRIX_VAL_STEP 8
|
||||
# define RGB_MATRIX_SPD_STEP 10
|
||||
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||
#define RGB_MATRIX_HUE_STEP 4
|
||||
#define RGB_MATRIX_SAT_STEP 4
|
||||
#define RGB_MATRIX_VAL_STEP 4
|
||||
#define RGB_MATRIX_SPD_STEP 10
|
||||
|
||||
/* Disable the animations you don't want/need. You will need to disable a good number of these *
|
||||
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
|
||||
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
// # define DISABLE_RGB_MATRIX_BREATHING
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
# define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
# define DISABLE_RGB_MATRIX_SPLASH
|
||||
# define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
/* Disable the animations you don't want/need. You will need to disable a good number of these *
|
||||
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
|
||||
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_BREATHING
|
||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define DISABLE_RGB_MATRIX_BAND_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define DISABLE_RGB_MATRIX_BAND_VAL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
#endif
|
||||
// Custom Font path
|
||||
#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c"
|
||||
#define OLED_DISABLE_TIMEOUT
|
||||
|
||||
10
keyboards/crkbd/keymaps/kidbrazil/enums.h
Normal file
10
keyboards/crkbd/keymaps/kidbrazil/enums.h
Normal file
@@ -0,0 +1,10 @@
|
||||
// [CRKBD layers Init] -------------------------------------------------------//
|
||||
typedef enum {
|
||||
_QWERTY,
|
||||
_NUM,
|
||||
_SYM,
|
||||
_GAME,
|
||||
_WEAPON
|
||||
}CRKBD_LAYERS;
|
||||
|
||||
extern enum CRKBD_LAYERS crkbd_layers;
|
||||
@@ -1,4 +1,6 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "enums.h"
|
||||
#include "layer.h"
|
||||
|
||||
// [Init Variables] ----------------------------------------------------------//
|
||||
extern uint8_t is_master;
|
||||
@@ -9,15 +11,6 @@ bool user_led_enabled = true;
|
||||
// Boolean to store the master LED clear so it only runs once.
|
||||
bool master_oled_cleared = false;
|
||||
|
||||
// [CRKBD layers Init] -------------------------------------------------------//
|
||||
enum crkbd_layers {
|
||||
_QWERTY,
|
||||
_NUM,
|
||||
_SYM,
|
||||
_GAME,
|
||||
_WEAPON
|
||||
};
|
||||
|
||||
// [Keymaps] -----------------------------------------------------------------//
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
@@ -36,8 +29,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_SYM] = LAYOUT(
|
||||
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
|
||||
KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
|
||||
LSFT_T(KC_TAB), RGB_TOG, KC_MPLY, KC_MUTE, KC_VOLU, KC_VOLD, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
|
||||
KC_LCTL, KC_CALC, KC_MYCM, KC_MPRV, KC_MNXT, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
|
||||
LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
|
||||
),
|
||||
|
||||
@@ -51,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_WEAPON] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST,
|
||||
KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
||||
@@ -61,23 +54,24 @@ void keyboard_post_init_user(void) {
|
||||
// Set RGB to known state
|
||||
rgb_matrix_enable_noeeprom();
|
||||
rgb_matrix_set_color_all(RGB_GREEN);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
user_led_enabled = true;
|
||||
|
||||
}
|
||||
// [Process User Input] ------------------------------------------------------//
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// Handle RGB Changes sans eeprom - necessary due to the layer dependent RGB color
|
||||
// changes in marrix_scan_user
|
||||
case RGB_TOG:
|
||||
if (record->event.pressed) {
|
||||
// Toggle matrix on key press
|
||||
user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom();
|
||||
} else {
|
||||
// Flip User_led_enabled variable on key release
|
||||
user_led_enabled = !user_led_enabled;
|
||||
}
|
||||
return false; // Skip all further processing of this key
|
||||
if (record->event.pressed) {
|
||||
// Toggle matrix on key press
|
||||
user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom();
|
||||
// Toggle boolean flag
|
||||
user_led_enabled = !user_led_enabled;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
// Use process_record_keymap to reset timer on all other keypresses
|
||||
// Use process_record_keymap to reset timer on all other keypresses to awaken from idle.
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
@@ -91,9 +85,47 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
// [Matrix Scan] ------------------------------------------------------------//
|
||||
void matrix_scan_user(void) {
|
||||
// Iddle timer to return to default layer if left on game layer
|
||||
if (timer_elapsed32(oled_timer) > 380000 && timer_elapsed32(oled_timer) < 479999) {
|
||||
// Reset layer in case it got left on _GAME
|
||||
// This prevents the issue where the master side sometimes wont switch off as expected
|
||||
// in the next step.
|
||||
if (get_highest_layer(layer_state) == _GAME) {
|
||||
layer_off(_GAME);
|
||||
layer_on(_QWERTY);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Timeout to turn off LEDs
|
||||
else if (timer_elapsed32(oled_timer) > 480000) {
|
||||
rgb_matrix_disable_noeeprom();
|
||||
return;
|
||||
}
|
||||
// Set RGB Matrix color based on layers
|
||||
if (user_led_enabled) {
|
||||
switch (get_highest_layer(layer_state)){
|
||||
case _GAME:
|
||||
rgb_matrix_set_color_all(RGB_PURPLE);
|
||||
break;
|
||||
case _NUM:
|
||||
case _SYM:
|
||||
case _QWERTY:
|
||||
rgb_matrix_set_color_all(RGB_GREEN);
|
||||
break;
|
||||
default:
|
||||
rgb_matrix_set_color_all(RGB_GREEN);
|
||||
break;
|
||||
|
||||
}
|
||||
} else {
|
||||
rgb_matrix_disable_noeeprom();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// [OLED Configuration] ------------------------------------------------------//
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
|
||||
// Init Oled and Rotate....
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!has_usb())
|
||||
@@ -105,74 +137,6 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
const char *read_logo(void);
|
||||
|
||||
// {OLED helpers} -----------------------------------------------//
|
||||
|
||||
// Render Blank Space
|
||||
void render_space(void) {
|
||||
oled_write_ln_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
// Render separator lines for oled display
|
||||
void render_separator(void) {
|
||||
switch (get_highest_layer(layer_state)){
|
||||
case _GAME:
|
||||
case _WEAPON:
|
||||
oled_write_ln_P(PSTR("===================="), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render current layer state
|
||||
void render_layer_state(void){
|
||||
// If you want to change the display of OLED, you need to change here
|
||||
switch (get_highest_layer(layer_state)){
|
||||
case _QWERTY:
|
||||
oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
|
||||
break;
|
||||
case _NUM:
|
||||
oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
|
||||
break;
|
||||
case _SYM:
|
||||
oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
|
||||
break;
|
||||
case _GAME:
|
||||
oled_write_ln_P(PSTR("| G A M E ]"), false);
|
||||
break;
|
||||
case _WEAPON:
|
||||
oled_write_ln_P(PSTR("| W E A P O N ]"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render USB State
|
||||
void render_usb_state(void) {
|
||||
switch (USB_DeviceState) {
|
||||
case DEVICE_STATE_Unattached:
|
||||
oled_write_ln_P(PSTR("| USB | FREE ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Suspended:
|
||||
oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Configured:
|
||||
oled_write_ln_P(PSTR("| USB | READY ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Powered:
|
||||
oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Default:
|
||||
oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Addressed:
|
||||
oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render Logo
|
||||
void render_logo(void) {
|
||||
oled_write(read_logo(), false);
|
||||
@@ -209,7 +173,8 @@ void render_slave_oled(void) {
|
||||
|
||||
// {OLED Task} -----------------------------------------------//
|
||||
void oled_task_user(void) {
|
||||
if (timer_elapsed32(oled_timer) > 80000 && timer_elapsed32(oled_timer) < 479999) {
|
||||
// First time out switches to logo as first indication of iddle.
|
||||
if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) {
|
||||
// Render logo on both halves before full timeout
|
||||
if (is_master && !master_oled_cleared) {
|
||||
// Clear master OLED once so the logo renders properly
|
||||
|
||||
69
keyboards/crkbd/keymaps/kidbrazil/layer.c
Normal file
69
keyboards/crkbd/keymaps/kidbrazil/layer.c
Normal file
@@ -0,0 +1,69 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "enums.h"
|
||||
|
||||
// Render Blank Space
|
||||
void render_space(void) {
|
||||
oled_write_ln_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
// Render separator lines for oled display
|
||||
void render_separator(void) {
|
||||
switch (get_highest_layer(layer_state)){
|
||||
case _GAME:
|
||||
case _WEAPON:
|
||||
oled_write_ln_P(PSTR("===================="), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render current layer state
|
||||
void render_layer_state(void){
|
||||
// If you want to change the display of OLED, you need to change here
|
||||
switch (get_highest_layer(layer_state)){
|
||||
case _QWERTY:
|
||||
oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
|
||||
break;
|
||||
case _NUM:
|
||||
oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
|
||||
break;
|
||||
case _SYM:
|
||||
oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
|
||||
break;
|
||||
case _GAME:
|
||||
oled_write_ln_P(PSTR("| G A M E ]"), false);
|
||||
break;
|
||||
case _WEAPON:
|
||||
oled_write_ln_P(PSTR("| W E A P O N ]"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Render USB State
|
||||
void render_usb_state(void) {
|
||||
switch (USB_DeviceState) {
|
||||
case DEVICE_STATE_Unattached:
|
||||
oled_write_ln_P(PSTR("| USB | FREE ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Suspended:
|
||||
oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Configured:
|
||||
oled_write_ln_P(PSTR("| USB | READY ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Powered:
|
||||
oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Default:
|
||||
oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
|
||||
break;
|
||||
case DEVICE_STATE_Addressed:
|
||||
oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
|
||||
}
|
||||
}
|
||||
9
keyboards/crkbd/keymaps/kidbrazil/layer.h
Normal file
9
keyboards/crkbd/keymaps/kidbrazil/layer.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// [OLED Helpers] ----------------------------------------------------//
|
||||
// Render empty space on OLED
|
||||
void render_space(void);
|
||||
// Render separator characters for rows
|
||||
void render_separator(void);
|
||||
// Render layer state
|
||||
void render_layer_state(void);
|
||||
// Render USB State
|
||||
void render_usb_state(void);
|
||||
@@ -8,10 +8,5 @@ RGB_MATRIX_ENABLE = WS2812
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \
|
||||
#./lib/rgb_state_reader.c \
|
||||
#./lib/logo_reader.c \
|
||||
#./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
||||
SRC += logo_reader.c \
|
||||
layer.c
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
/*
|
||||
Copyright 2020
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1209
|
||||
#define PRODUCT_ID 0x2328
|
||||
#define DEVICE_VER 0x501
|
||||
#define MANUFACTURER K.T.E.C.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x7169
|
||||
#define DEVICE_VER 0x0501
|
||||
#define MANUFACTURER KTEC
|
||||
#define PRODUCT Daisy
|
||||
#define DESCRIPTION qmk port for Daisy
|
||||
|
||||
@@ -32,22 +48,59 @@
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
#define BACKLIGHT_PIN D0
|
||||
// #define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
|
||||
#define RGB_DI_PIN C7
|
||||
#ifdef RGB_DI_PIN
|
||||
# define RGBLED_NUM 8
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 25
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 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
|
||||
*
|
||||
@@ -81,6 +134,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
@@ -90,8 +147,8 @@
|
||||
//#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_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
@@ -99,9 +156,8 @@
|
||||
//#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_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
@@ -111,9 +167,11 @@
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
@@ -132,17 +190,12 @@
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
// ws2812 options
|
||||
#define RGB_DI_PIN C7 // pin the DI on the ws2812 is hooked-up to
|
||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||
#define RGBLED_NUM 8 // number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
@@ -166,4 +219,34 @@
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
@@ -1,15 +1,35 @@
|
||||
/* Copyright 2020
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "daisy.h"
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRC |= (1<<PC6);
|
||||
PORTC &= ~(1<<PC6);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRC &= ~(1<<PC6);
|
||||
PORTC &= ~(1<<PC6);
|
||||
}
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
void keyboard_pre_init_kb(void) {
|
||||
led_init_ports();
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(C6);
|
||||
writePinHigh(C6);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(C6, !led_state.caps_lock);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,51 @@
|
||||
#ifndef DAISY_H
|
||||
#define DAISY_H
|
||||
/* Copyright 2020
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||
K30, K31, K32, K34, K35, K37, K38, K39 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||
K30, K31, K32, K34, K35, K37, K38, K39 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
|
||||
}
|
||||
|
||||
#endif
|
||||
#define LAYOUT_625_space( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
|
||||
K30, K31, K32, K35, K38, K39 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
|
||||
{ K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \
|
||||
}
|
||||
|
||||
@@ -1,18 +1,107 @@
|
||||
{
|
||||
"keyboard_name": "Daisy",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 42,
|
||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
||||
},
|
||||
"keyboard_name": "Daisy",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 42,
|
||||
"layout": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
{"x": 5, "y": 0},
|
||||
{"x": 6, "y": 0},
|
||||
{"x": 7, "y": 0},
|
||||
{"x": 8, "y": 0},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 11, "y": 0},
|
||||
|
||||
"LAYOUT_625_space": {
|
||||
"key_count": 40,
|
||||
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}]
|
||||
{"x": 0, "y": 1, "w": 1.25},
|
||||
{"x": 1.25, "y": 1},
|
||||
{"x": 2.25, "y": 1},
|
||||
{"x": 3.25, "y": 1},
|
||||
{"x": 4.25, "y": 1},
|
||||
{"x": 5.25, "y": 1},
|
||||
{"x": 6.25, "y": 1},
|
||||
{"x": 7.25, "y": 1},
|
||||
{"x": 8.25, "y": 1},
|
||||
{"x": 9.25, "y": 1},
|
||||
{"x": 10.25, "y": 1, "w": 1.75},
|
||||
|
||||
{"x": 0, "y": 2, "w": 1.75},
|
||||
{"x": 1.75, "y": 2},
|
||||
{"x": 2.75, "y": 2},
|
||||
{"x": 3.75, "y": 2},
|
||||
{"x": 4.75, "y": 2},
|
||||
{"x": 5.75, "y": 2},
|
||||
{"x": 6.75, "y": 2},
|
||||
{"x": 7.75, "y": 2},
|
||||
{"x": 8.75, "y": 2},
|
||||
{"x": 9.75, "y": 2},
|
||||
{"x": 10.75, "y": 2, "w": 1.25},
|
||||
|
||||
{"x": 0, "y": 3, "w": 1.25},
|
||||
{"x": 1.25, "y": 3},
|
||||
{"x": 2.25, "y": 3, "w": 1.25},
|
||||
{"x": 3.5, "y": 3, "w": 2.25},
|
||||
{"x": 5.75, "y": 3, "w": 2.75},
|
||||
{"x": 8.5, "y": 3, "w": 1.25},
|
||||
{"x": 9.75, "y": 3},
|
||||
{"x": 10.75, "y": 3, "w": 1.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_625_space": {
|
||||
"key_count": 40,
|
||||
"layout": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
{"x": 5, "y": 0},
|
||||
{"x": 6, "y": 0},
|
||||
{"x": 7, "y": 0},
|
||||
{"x": 8, "y": 0},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 11, "y": 0},
|
||||
|
||||
{"x": 0, "y": 1, "w": 1.25},
|
||||
{"x": 1.25, "y": 1},
|
||||
{"x": 2.25, "y": 1},
|
||||
{"x": 3.25, "y": 1},
|
||||
{"x": 4.25, "y": 1},
|
||||
{"x": 5.25, "y": 1},
|
||||
{"x": 6.25, "y": 1},
|
||||
{"x": 7.25, "y": 1},
|
||||
{"x": 8.25, "y": 1},
|
||||
{"x": 9.25, "y": 1},
|
||||
{"x": 10.25, "y": 1, "w": 1.75},
|
||||
|
||||
{"x": 0, "y": 2, "w": 1.75},
|
||||
{"x": 1.75, "y": 2},
|
||||
{"x": 2.75, "y": 2},
|
||||
{"x": 3.75, "y": 2},
|
||||
{"x": 4.75, "y": 2},
|
||||
{"x": 5.75, "y": 2},
|
||||
{"x": 6.75, "y": 2},
|
||||
{"x": 7.75, "y": 2},
|
||||
{"x": 8.75, "y": 2},
|
||||
{"x": 9.75, "y": 2},
|
||||
{"x": 10.75, "y": 2, "w": 1.25},
|
||||
|
||||
{"x": 0, "y": 3, "w": 1.25},
|
||||
{"x": 1.25, "y": 3},
|
||||
{"x": 2.25, "y": 3},
|
||||
{"x": 3.25, "y": 3, "w": 6.25},
|
||||
{"x": 9.5, "y": 3, "w": 1.25},
|
||||
{"x": 10.75, "y": 3, "w": 1.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,92 +1,83 @@
|
||||
/* Copyright 2020
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
// Layer shorthand
|
||||
#define _BL 0
|
||||
#define _LW 1
|
||||
#define _RS 2
|
||||
|
||||
enum layer_keycodes {
|
||||
QWERTY = SAFE_RANGE, LOWER, RAISE
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_BL,
|
||||
_LW,
|
||||
_RS
|
||||
};
|
||||
|
||||
#define LOWER MO(_LW)
|
||||
#define RAISE MO(_RS)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Base Layer
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
|
||||
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
|
||||
* │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │
|
||||
* ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
|
||||
* │Ctrl│GUI│Alt │ │ Backspace│Lowr│Rse│ Alt│
|
||||
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
||||
),
|
||||
|
||||
/* Base Layer
|
||||
* .-----------------------------------------------------------------------.
|
||||
* | ESC | Q | W | E | R | T | Y | U | I | O | P | \| |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | TAB | A | S | D | F | G | H | J | K | L | ENTER |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT |
|
||||
* '-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
|
||||
),
|
||||
|
||||
/* Function Layer
|
||||
* .-----------------------------------------------------------------------.
|
||||
* | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | =+ | UP | | | | [{ | ]} | ;: | '" | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | LEFT| DOWN |RIGHT| | | | | | | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | DELETE | | | |
|
||||
* '-----------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_LW] = LAYOUT(
|
||||
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_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
/* Second Function Layer
|
||||
* .-----------------------------------------------------------------------.
|
||||
* | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | | |
|
||||
* '-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_RS] = LAYOUT(
|
||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Function Layer 1 (Lower)
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
|
||||
* └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
|
||||
* │ │ = │ ▴ │ │ │ │ [ │ ] │ ; │ ' │ │
|
||||
* ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
|
||||
* │ │ ◂ │ ▾ │ ▸ │ │ │ │ │ │ │ │
|
||||
* ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
|
||||
* │ │ │ │ │ Delete │ │ │ │
|
||||
* └────┴───┴────┴────────└──────────┘────┴───┴────┘
|
||||
*/
|
||||
[_LW] = LAYOUT(
|
||||
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_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_DEL, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if(record->event.pressed){
|
||||
layer_on(_LW);
|
||||
} else {
|
||||
layer_off(_LW);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if(record->event.pressed){
|
||||
layer_on(_RS);
|
||||
} else {
|
||||
layer_off(_RS);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
/* Function Layer 2 (Raise)
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
|
||||
* │Rst│F1 │F2 │F3 │F4 │F5 │F6 │ │Hom│PgU│ │ │
|
||||
* └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
|
||||
* │ │F7 │F8 │F9 │F10│F11│F12│ │ ; │ ' │ │
|
||||
* ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
|
||||
* │ │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│ │
|
||||
* ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
|
||||
*/
|
||||
[_RS] = LAYOUT(
|
||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
@@ -1,5 +1 @@
|
||||

|
||||
|
||||
# Default Daisy Layout
|
||||
|
||||
This is the default layout as offered by KPRepublic's TMK firmware for the Daisy with a few minor tweaks for usability made by me.
|
||||
# The default keymap for Daisy
|
||||
|
||||
@@ -1,29 +1,15 @@
|
||||
# Daisy
|
||||
|
||||
A 40% keyboard kit sold by KPRepublic.
|
||||

|
||||
|
||||
Keyboard Maintainer: westfoxtrot (https://github.com/westfoxtrot)
|
||||
Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
||||
Hardware Availability: http://tinyurl.com/yc26lq22
|
||||
A 40% keyboard kit sold by KPrepublic.
|
||||
|
||||
* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
|
||||
* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
|
||||
* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make daisy:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
||||
|
||||
# Other Keymaps
|
||||
|
||||
The "default" keymap included is the layout I personally use on the Daisy and the one I have found the most comfortable.
|
||||
|
||||
A printable picture showing this layout is available here: https://imgur.com/9mSF0yf
|
||||
|
||||
|
||||
```
|
||||
$ make daisy:[default|<name>]
|
||||
```
|
||||
|
||||
# Bootloader
|
||||
|
||||
I personally had issues with the bootloader on my Daisy PCB and was unable to flash a firmware to the board after the first time. I replaced the bootloader with the one available in the repository at ../../util/bootloader_atmega32u4_1_0_0.hex
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
|
||||
@@ -11,20 +11,22 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# QMK 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
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
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 = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
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 = yes # Enable WS2812 RGB underlight.
|
||||
# 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 = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
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
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
@@ -132,9 +132,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -155,4 +153,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ SERIAL_LINK_ENABLE = yes
|
||||
VISUALIZER_ENABLE = yes
|
||||
LCD_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
LCD_BACKLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
||||
@@ -18,11 +18,11 @@ inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); }
|
||||
inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); }
|
||||
inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); }
|
||||
|
||||
inline void gh60_caps_led_off(void) { setPinInput(B2); writePinLow(B2); }
|
||||
inline void gh60_poker_leds_off(void) { setPinInput(F4); writePinLow(F4); }
|
||||
inline void gh60_fn_led_off(void) { setPinInput(F5); writePinLow(F5); }
|
||||
inline void gh60_esc_led_off(void) { setPinInput(F6); writePinLow(F6); }
|
||||
inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); }
|
||||
inline void gh60_caps_led_off(void) { setPinInput(B2); }
|
||||
inline void gh60_poker_leds_off(void) { setPinInput(F4); }
|
||||
inline void gh60_fn_led_off(void) { setPinInput(F5); }
|
||||
inline void gh60_esc_led_off(void) { setPinInput(F6); }
|
||||
inline void gh60_wasd_leds_off(void) { setPinInput(F7); }
|
||||
|
||||
/* GH60 keymap definition macro
|
||||
* K2C, K31 and K3C are extra keys for ISO
|
||||
|
||||
@@ -150,7 +150,7 @@ static void unselect_row(uint8_t row)
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
setPinInput(row_pins[x]);
|
||||
setPinInputHigh(row_pins[x]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,10 +215,7 @@ void matrix_init(void) {
|
||||
matrix_init_quantum();
|
||||
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
setPinInput(B0);
|
||||
}
|
||||
|
||||
// modified for per col read matrix scan
|
||||
|
||||
@@ -59,7 +59,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
writePinLow(D5);
|
||||
} else {
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
}
|
||||
|
||||
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
@@ -67,7 +66,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
writePinLow(E6);
|
||||
} else {
|
||||
setPinInput(E6);
|
||||
writePinLow(E6);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
writePinLow(D5);
|
||||
} else {
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
}
|
||||
|
||||
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
@@ -62,7 +61,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
writePinLow(E6);
|
||||
} else {
|
||||
setPinInput(E6);
|
||||
writePinLow(E6);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -85,6 +85,5 @@ void led_set_user(uint8_t usb_led) {
|
||||
writePinLow(B2);
|
||||
} else {
|
||||
setPinInput(B2);
|
||||
writePinLow(B2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ static void select_col(uint8_t col) {
|
||||
static void init_pins(void) {
|
||||
unselect_cols();
|
||||
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
|
||||
setPinInput(row_pins[x]);
|
||||
setPinInputHigh(row_pins[x]);
|
||||
}
|
||||
|
||||
setPinInputHigh(E2);
|
||||
|
||||
104
keyboards/mc_76k/config.h
Normal file
104
keyboards/mc_76k/config.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
Copyright 2020 Yiancar-Designs
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x8968
|
||||
#define PRODUCT_ID 0x4D43
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Yiancar-Designs
|
||||
#define PRODUCT MC-76K
|
||||
#define DESCRIPTION O-Ring suspended 60% with F-row keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
/*
|
||||
* 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 { C7, C6, B6, B0, D1, D0 }
|
||||
#define MATRIX_COL_PINS { D5, D3, D4, B1, D6, D7, B4, B5, F7, F6, F5, F4, F1, F0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
12
keyboards/mc_76k/info.json
Normal file
12
keyboards/mc_76k/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "mc_76k",
|
||||
"url": "www.yiancar-designs.com",
|
||||
"maintainer": "Yiancar",
|
||||
"width": 15,
|
||||
"height": 6.5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"F13", "x":14, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Delete", "x":14, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Ctrl", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"Fn", "x":14, "y":4.5}, {"label":"Caps Lock", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Win", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}]
|
||||
}
|
||||
}
|
||||
}
|
||||
50
keyboards/mc_76k/keymaps/default/keymap.c
Normal file
50
keyboards/mc_76k/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2020 Yiancar-Designs
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_all( /* Base */
|
||||
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_F13,
|
||||
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_BSLS, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL),
|
||||
|
||||
[1] = LAYOUT_all( /* FN1 */
|
||||
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_PSCR,
|
||||
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_HOME, KC_UP, KC_END, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[2] = LAYOUT_all( /* Empty for dynamic keymaps */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_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),
|
||||
|
||||
[3] = LAYOUT_all( /* Empty for dynamic keymaps */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_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),
|
||||
};
|
||||
5
keyboards/mc_76k/keymaps/default/readme.md
Normal file
5
keyboards/mc_76k/keymaps/default/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# The default keymap for MC-76K
|
||||
|
||||

|
||||
|
||||

|
||||
50
keyboards/mc_76k/keymaps/via/keymap.c
Normal file
50
keyboards/mc_76k/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2020 Yiancar-Designs
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_all( /* Base */
|
||||
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_F13,
|
||||
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_BSLS, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL),
|
||||
|
||||
[1] = LAYOUT_all( /* FN1 */
|
||||
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_PSCR,
|
||||
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_HOME, KC_UP, KC_END, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[2] = LAYOUT_all( /* Empty for dynamic keymaps */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_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),
|
||||
|
||||
[3] = LAYOUT_all( /* Empty for dynamic keymaps */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_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),
|
||||
};
|
||||
1
keyboards/mc_76k/keymaps/via/readme.md
Normal file
1
keyboards/mc_76k/keymaps/via/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# Compile with this keymap to use VIA
|
||||
1
keyboards/mc_76k/keymaps/via/rules.mk
Normal file
1
keyboards/mc_76k/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
34
keyboards/mc_76k/mc_76k.c
Normal file
34
keyboards/mc_76k/mc_76k.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Copyright 2020 Yiancar-Designs
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "mc_76k.h"
|
||||
|
||||
void keyboard_pre_init_kb (void) {
|
||||
setPinOutput(D2);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(D2, !led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
46
keyboards/mc_76k/mc_76k.h
Normal file
46
keyboards/mc_76k/mc_76k.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* Copyright 2020 Yiancar-Designs
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_all( \
|
||||
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, K3C, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
|
||||
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, \
|
||||
K50, K52, K53, K57, K5B, K5C, K5D \
|
||||
) \
|
||||
{ \
|
||||
{ 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, K2D }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||
{ K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \
|
||||
{ K50, XXX, K52, K53, XXX, XXX, XXX, K57, XXX, XXX, XXX, K5B, K5C, K5D } \
|
||||
}
|
||||
15
keyboards/mc_76k/readme.md
Normal file
15
keyboards/mc_76k/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# MC-76K
|
||||
|
||||

|
||||
|
||||
O-Ring suspended 60% with F-row keyboard
|
||||
|
||||
* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
|
||||
* Hardware Supported: ATmega32U4
|
||||
* Hardware Availability: GB run by [mustcode](https://www.reddit.com/user/mustcode). More info on [geekhack](https://geekhack.org/index.php?topic=101040.50)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make mc_76k:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
32
keyboards/mc_76k/rules.mk
Normal file
32
keyboards/mc_76k/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
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
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
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
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
@@ -169,9 +169,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -192,4 +190,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x4D78 // "Mx" -> MxBlue
|
||||
#define PRODUCT_ID 0x5353 // "SS" -> MxSS
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER MxBlue
|
||||
#define PRODUCT MxSS
|
||||
#define DESCRIPTION Custom Polycarb Keyboard
|
||||
#define DESCRIPTION MxSS Polycarb Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
@@ -56,6 +56,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
// Just for posterity, define bootlite matrix pos
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
// FLED config takes up 1 byte, stored color count takes 1, stored colors take up to 8
|
||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 10
|
||||
|
||||
/* 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).
|
||||
*/
|
||||
|
||||
@@ -15,31 +15,32 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
hs_set caps_color = { .hue = 0, .sat = 255 };
|
||||
|
||||
// Colors for layers
|
||||
// Format: {hue, saturation}
|
||||
// {0, 0} to turn off the LED
|
||||
// Add additional rows to handle more layers
|
||||
const hs_set layer_colors[] = {
|
||||
[0] = {0, 0}, // Color for Layer 0
|
||||
[1] = {86, 255}, // Color for Layer 1
|
||||
[2] = {36, 255}, // Color for Layer 2
|
||||
[3] = {185, 255}, // Color for Layer 3
|
||||
hs_set layer_colors[4] = {
|
||||
[0] = {.hue = 0, .sat = 0}, // Color for Layer 0
|
||||
[1] = {.hue = 86, .sat = 255}, // Color for Layer 1
|
||||
[2] = {.hue = 36, .sat = 255}, // Color for Layer 2
|
||||
[3] = {.hue = 185, .sat = 255}, // Color for Layer 3
|
||||
};
|
||||
const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);
|
||||
size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);
|
||||
|
||||
// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control
|
||||
enum custom_keycodes {
|
||||
MY_KEYCODE = NEW_SAFE_RANGE,
|
||||
MY_KEYCODE = NEW_SAFE_RANGE,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT( /* Base */
|
||||
KC_GESC, 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_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_DEL,
|
||||
KC_CAPSLOCK, 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_PGUP,
|
||||
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_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT( /* L1 */
|
||||
|
||||
19
keyboards/mxss/keymaps/via/config.h
Normal file
19
keyboards/mxss/keymaps/via/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2018 Jumail Mundekkat / MxBlue
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define LAYER_STATE_8BIT
|
||||
33
keyboards/mxss/keymaps/via/keymap.c
Normal file
33
keyboards/mxss/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/* Copyright 2018 Jumail Mundekkat / MxBlue
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT_all( /* L0 */
|
||||
KC_GESC, 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_NO, 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_BSLS, KC_DEL,
|
||||
KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
LAYOUT_all( /* L1 */
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, FLED_VAD, FLED_VAI, FLED_MOD, RGB_VAI,
|
||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_MOD, RGB_SAI, RGB_TOG,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI
|
||||
)
|
||||
};
|
||||
1
keyboards/mxss/keymaps/via/rules.mk
Normal file
1
keyboards/mxss/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2018 Jumail Mundekkat / MxBlue
|
||||
/* Copyright 2020 Jumail Mundekkat / MxBlue
|
||||
*
|
||||
* 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
|
||||
@@ -12,63 +12,29 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* EEPROM management code from ../cannonkeys/stm32f072/keyboard.c
|
||||
*/
|
||||
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "tmk_core/common/eeprom.h"
|
||||
#include "tmk_core/common/action_layer.h"
|
||||
#include "rgblight.h"
|
||||
#include "via.h"
|
||||
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
|
||||
|
||||
// Variables for controlling front LED application
|
||||
uint8_t fled_mode; // Mode for front LEDs
|
||||
uint8_t fled_val; // Brightness for front leds (0 - 255)
|
||||
LED_TYPE fleds[2]; // Front LED rgb values for indicator mode use
|
||||
|
||||
// Predefined colors for layers
|
||||
// Format: {hue, saturation}
|
||||
// {0, 0} to turn off the LED
|
||||
// Add additional rows to handle more layers
|
||||
__attribute__ ((weak))
|
||||
const hs_set layer_colors[] = {
|
||||
[0] = {0, 0}, // Color for Layer 0
|
||||
[1] = {86, 255}, // Color for Layer 1
|
||||
[2] = {36, 255}, // Color for Layer 2
|
||||
[3] = {185, 255}, // Color for Layer 3
|
||||
};
|
||||
|
||||
__attribute__ ((weak))
|
||||
const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);
|
||||
void via_init_kb(void) {
|
||||
fled_init();
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// If EEPROM config exists, load it
|
||||
if (eeprom_is_valid()) {
|
||||
fled_config fled_conf;
|
||||
fled_conf.raw = eeprom_read_byte(EEPROM_FRONTLED_ADDR);
|
||||
fled_mode = fled_conf.mode;
|
||||
fled_val = fled_conf.val * FLED_VAL_STEP;
|
||||
// Else, default config
|
||||
} else {
|
||||
fled_mode = FLED_RGB;
|
||||
fled_val = 10 * FLED_VAL_STEP;
|
||||
eeprom_update_conf(); // Store default config to EEPROM
|
||||
}
|
||||
|
||||
// Set default values for leds
|
||||
setrgb(0, 0, 0, &fleds[0]);
|
||||
setrgb(0, 0, 0, &fleds[1]);
|
||||
|
||||
// Handle lighting for indicator mode
|
||||
if (fled_mode == FLED_INDI) {
|
||||
// Enable capslock led if enabled on host
|
||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))
|
||||
sethsv(FLED_CAPS_H, FLED_CAPS_S, fled_val, &fleds[0]);
|
||||
|
||||
// Determine and set colour of layer LED according to current layer
|
||||
// if hue = sat = 0, leave LED off
|
||||
uint8_t layer = biton32(layer_state);
|
||||
if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].hue == 0))
|
||||
sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]);
|
||||
}
|
||||
// If VIA is disabled, we still need to load settings
|
||||
// Call via_init_kb() the same way as via_init(), with setting
|
||||
// EEPROM valid afterwards.
|
||||
#ifndef VIA_ENABLE
|
||||
fled_init();
|
||||
via_eeprom_set_valid(true);
|
||||
#endif // VIA_ENABLE
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
@@ -82,132 +48,35 @@ void matrix_scan_kb(void) {
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// Handle custom keycodes for front LED operation
|
||||
switch (keycode) {
|
||||
case FLED_MOD: // Change between front LED operation modes (off, indicator, RGB)
|
||||
if (record->event.pressed)
|
||||
fled_mode_cycle();
|
||||
break;
|
||||
|
||||
case FLED_VAI: // Increase the brightness of the front LEDs by FLED_VAL_STEP
|
||||
if (record->event.pressed)
|
||||
fled_val_increase();
|
||||
break;
|
||||
|
||||
case FLED_VAD: // Decrease the brightness of the front LEDs by FLED_VAL_STEP
|
||||
if (record->event.pressed)
|
||||
fled_val_decrease();
|
||||
break;
|
||||
|
||||
default:
|
||||
break; // Process all other keycodes normally
|
||||
}
|
||||
|
||||
process_record_fled(keycode, record);
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// Set indicator LED appropriately, whether it is used or not
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
sethsv(FLED_CAPS_H, FLED_CAPS_S, fled_val, &fleds[0]);
|
||||
} else {
|
||||
setrgb(0, 0, 0, &fleds[0]);
|
||||
}
|
||||
|
||||
rgblight_set();
|
||||
led_set_user(usb_led);
|
||||
bool led_update_kb(led_t led_state) {
|
||||
fled_lock_update(led_state);
|
||||
return led_update_user(led_state);
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
// Determine and set colour of layer LED according to current layer
|
||||
// if hue = sat = 0, leave LED off
|
||||
uint8_t layer = biton32(state);
|
||||
|
||||
if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].hue == 0))
|
||||
sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]);
|
||||
else
|
||||
setrgb(0, 0, 0, &fleds[1]);
|
||||
|
||||
return state;
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
fled_layer_update(state);
|
||||
return layer_state_set_user(state);
|
||||
}
|
||||
|
||||
// EEPROM Management
|
||||
// Fallback eeprom functions if VIA is not enabled
|
||||
#ifndef VIA_ENABLE
|
||||
|
||||
// Test if magic value is present at expected location
|
||||
bool eeprom_is_valid(void)
|
||||
// Sets VIA/keyboard level usage of EEPROM to valid/invalid
|
||||
// Keyboard level code (eg. via_init_kb()) should not call this
|
||||
void via_eeprom_set_valid(bool valid)
|
||||
{
|
||||
return (eeprom_read_word(EEPROM_MAGIC_ADDR) == EEPROM_MAGIC);
|
||||
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
|
||||
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
|
||||
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
|
||||
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
|
||||
|
||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF);
|
||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF);
|
||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF);
|
||||
}
|
||||
|
||||
// Set magic value at expected location
|
||||
void eeprom_set_valid(bool valid)
|
||||
{
|
||||
eeprom_update_word(EEPROM_MAGIC_ADDR, valid ? EEPROM_MAGIC : 0xFFFF);
|
||||
}
|
||||
|
||||
// Store current front led config in EEPROM
|
||||
void eeprom_update_conf(void)
|
||||
{
|
||||
// Create storage struct and set values
|
||||
fled_config conf;
|
||||
conf.mode = fled_mode;
|
||||
|
||||
// Small hack to ensure max value is stored correctly
|
||||
if (fled_val == 255)
|
||||
conf.val = 256 / FLED_VAL_STEP;
|
||||
else
|
||||
conf.val = fled_val / FLED_VAL_STEP;
|
||||
|
||||
// Set magic value and store config
|
||||
eeprom_set_valid(true);
|
||||
eeprom_update_byte(EEPROM_FRONTLED_ADDR, conf.raw);
|
||||
}
|
||||
|
||||
// Custom keycode functions
|
||||
|
||||
void fled_mode_cycle(void)
|
||||
{
|
||||
// FLED -> FLED_RGB -> FLED_INDI
|
||||
switch (fled_mode) {
|
||||
case FLED_OFF:
|
||||
fled_mode = FLED_RGB;
|
||||
break;
|
||||
|
||||
case FLED_RGB:
|
||||
fled_mode = FLED_INDI;
|
||||
break;
|
||||
|
||||
case FLED_INDI:
|
||||
fled_mode = FLED_OFF;
|
||||
break;
|
||||
}
|
||||
|
||||
// Update stored config
|
||||
eeprom_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void fled_val_increase(void)
|
||||
{
|
||||
// Increase val by FLED_VAL_STEP, handling the upper edge case
|
||||
if (fled_val + FLED_VAL_STEP > 255)
|
||||
fled_val = 255;
|
||||
else
|
||||
fled_val += FLED_VAL_STEP;
|
||||
|
||||
// Update stored config
|
||||
eeprom_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void fled_val_decrease(void)
|
||||
{
|
||||
// Decrease val by FLED_VAL_STEP, handling the lower edge case
|
||||
if (fled_val - FLED_VAL_STEP > 255)
|
||||
fled_val = 255;
|
||||
else
|
||||
fled_val -= FLED_VAL_STEP;
|
||||
|
||||
// Update stored config
|
||||
eeprom_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef MXSS_H
|
||||
#define MXSS_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "mxss_frontled.h"
|
||||
@@ -204,4 +203,18 @@
|
||||
{ k40, k41, k42, k43, KC_NO, KC_NO, k46, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E }, \
|
||||
}
|
||||
|
||||
#endif
|
||||
// All the gubs
|
||||
#define LAYOUT_all( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
|
||||
k40, k41, k42, k43, k46, k48, k4A, k4B, k4C, k4D, k4E \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
|
||||
{ k40, k41, k42, k43, KC_NO, KC_NO, k46, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E }, \
|
||||
}
|
||||
|
||||
264
keyboards/mxss/mxss_frontled.c
Normal file
264
keyboards/mxss/mxss_frontled.c
Normal file
@@ -0,0 +1,264 @@
|
||||
/* Copyright 2020 Jumail Mundekkat / MxBlue
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Extended from the work done by fcoury: https://github.com/qmk/qmk_firmware/pull/4915
|
||||
*/
|
||||
|
||||
#include "mxss_frontled.h"
|
||||
#include "tmk_core/common/eeprom.h"
|
||||
#include "rgblight.h"
|
||||
#include "via.h"
|
||||
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
|
||||
|
||||
// Variables for controlling front LED application
|
||||
uint8_t fled_mode; // Mode for front LEDs
|
||||
uint8_t fled_val; // Brightness for front leds (0 - 255)
|
||||
LED_TYPE fleds[2]; // Front LED rgb values for indicator mode use
|
||||
|
||||
// Layer indicator colors
|
||||
__attribute__ ((weak))
|
||||
hs_set layer_colors[FRONTLED_COLOR_MAXCNT];
|
||||
|
||||
// Caps lock indicator color
|
||||
__attribute__ ((weak))
|
||||
hs_set caps_color;
|
||||
|
||||
__attribute__ ((weak))
|
||||
size_t lc_size = sizeof(layer_colors) / sizeof(hs_set);
|
||||
|
||||
void fled_init(void) {
|
||||
// If EEPROM config exists, load it
|
||||
// If VIA EEPROM exists, FLED config should too
|
||||
if (via_eeprom_is_valid()) {
|
||||
fled_load_conf();
|
||||
// Else, default config
|
||||
} else {
|
||||
// Default mode/brightness
|
||||
fled_mode = FLED_RGB;
|
||||
fled_val = 10 * FLED_VAL_STEP;
|
||||
|
||||
// Default colors
|
||||
caps_color.hue = 0;
|
||||
caps_color.sat = 255;
|
||||
layer_colors[0].hue = 0;
|
||||
layer_colors[0].sat = 0;
|
||||
layer_colors[1].hue = 86;
|
||||
layer_colors[1].sat = 255;
|
||||
layer_colors[2].hue = 36;
|
||||
layer_colors[2].sat = 255;
|
||||
layer_colors[3].hue = 185;
|
||||
layer_colors[3].sat = 255;
|
||||
|
||||
fled_update_conf(); // Store default config to EEPROM
|
||||
}
|
||||
|
||||
// Set default values for leds
|
||||
setrgb(0, 0, 0, &fleds[0]);
|
||||
setrgb(0, 0, 0, &fleds[1]);
|
||||
|
||||
// Handle lighting for indicator mode
|
||||
if (fled_mode == FLED_INDI) {
|
||||
fled_lock_update(host_keyboard_led_state());
|
||||
fled_layer_update(layer_state);
|
||||
}
|
||||
}
|
||||
|
||||
void process_record_fled(uint16_t keycode, keyrecord_t *record) {
|
||||
// Handle custom keycodes for front LED operation
|
||||
switch (keycode) {
|
||||
case FLED_MOD: // Change between front LED operation modes (off, indicator, RGB)
|
||||
if (record->event.pressed)
|
||||
fled_mode_cycle();
|
||||
break;
|
||||
|
||||
case FLED_VAI: // Increase the brightness of the front LEDs by FLED_VAL_STEP
|
||||
if (record->event.pressed)
|
||||
fled_val_increase();
|
||||
break;
|
||||
|
||||
case FLED_VAD: // Decrease the brightness of the front LEDs by FLED_VAL_STEP
|
||||
if (record->event.pressed)
|
||||
fled_val_decrease();
|
||||
break;
|
||||
|
||||
default:
|
||||
break; // Process all other keycodes normally
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void fled_load_conf(void) {
|
||||
// Load config
|
||||
fled_config fled_conf;
|
||||
fled_conf.raw = eeprom_read_byte(FRONTLED_CONF_ADDR);
|
||||
fled_mode = fled_conf.mode;
|
||||
fled_val = fled_conf.val * FLED_VAL_STEP;
|
||||
|
||||
// Load color data
|
||||
uint8_t stored_cnt = eeprom_read_byte(FRONTLED_COLOR_CNT_ADDR);
|
||||
uint16_t *color_ptr = FRONTLED_COLOR_ADDR;
|
||||
caps_color.raw = eeprom_read_word(color_ptr); // Should always store at least 1 color
|
||||
for (uint8_t i = 1; i < stored_cnt; i++) {
|
||||
if (i == lc_size) // Can't load more layers than we have available
|
||||
break;
|
||||
layer_colors[i].raw = eeprom_read_word(&color_ptr[i]);
|
||||
}
|
||||
layer_colors[0].raw = 0; // hue = sat = 0 for layer 0
|
||||
}
|
||||
|
||||
// Store current front led config in EEPROM
|
||||
void fled_update_conf(void)
|
||||
{
|
||||
// Create storage struct and set values
|
||||
fled_config conf;
|
||||
conf.mode = fled_mode;
|
||||
|
||||
// Small hack to ensure max value is stored correctly
|
||||
if (fled_val == 255)
|
||||
conf.val = 256 / FLED_VAL_STEP;
|
||||
else
|
||||
conf.val = fled_val / FLED_VAL_STEP;
|
||||
|
||||
// Store config
|
||||
eeprom_update_byte(FRONTLED_CONF_ADDR, conf.raw);
|
||||
|
||||
// Store color data
|
||||
uint16_t *color_ptr = FRONTLED_COLOR_ADDR;
|
||||
eeprom_update_word(color_ptr, caps_color.raw);
|
||||
// Start from 1, layer 0 is not modifiable and therefore not persisted
|
||||
uint8_t i = 1;
|
||||
for (; i < lc_size; i++) {
|
||||
if (i == FRONTLED_COLOR_MAXCNT) // Can't store more than the EEPROM we have available
|
||||
break;
|
||||
eeprom_update_word(&color_ptr[i], layer_colors[i].raw);
|
||||
}
|
||||
eeprom_update_byte(FRONTLED_COLOR_CNT_ADDR, i); // For safety, store the count of colors stored
|
||||
}
|
||||
|
||||
// Custom keycode functions
|
||||
|
||||
void fled_mode_cycle(void)
|
||||
{
|
||||
// FLED -> FLED_RGB -> FLED_INDI
|
||||
switch (fled_mode) {
|
||||
case FLED_OFF:
|
||||
fled_mode = FLED_RGB;
|
||||
rgblight_timer_enable();
|
||||
break;
|
||||
|
||||
case FLED_RGB:
|
||||
fled_mode = FLED_INDI;
|
||||
break;
|
||||
|
||||
case FLED_INDI:
|
||||
fled_mode = FLED_OFF;
|
||||
break;
|
||||
}
|
||||
|
||||
// Update stored config
|
||||
fled_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void fled_val_increase(void)
|
||||
{
|
||||
// Increase val by FLED_VAL_STEP, handling the upper edge case
|
||||
if (fled_val + FLED_VAL_STEP > 255)
|
||||
fled_val = 255;
|
||||
else
|
||||
fled_val += FLED_VAL_STEP;
|
||||
|
||||
// Update stored config
|
||||
fled_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void fled_val_decrease(void)
|
||||
{
|
||||
// Decrease val by FLED_VAL_STEP, handling the lower edge case
|
||||
if (fled_val - FLED_VAL_STEP > 255)
|
||||
fled_val = 255;
|
||||
else
|
||||
fled_val -= FLED_VAL_STEP;
|
||||
|
||||
// Update stored config
|
||||
fled_update_conf();
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void fled_layer_update(layer_state_t state) {
|
||||
// Determine and set colour of layer LED according to current layer
|
||||
// if hue = sat = 0, leave LED off
|
||||
uint8_t layer = get_highest_layer(state);
|
||||
|
||||
if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].sat == 0)) {
|
||||
sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]);
|
||||
} else {
|
||||
setrgb(0, 0, 0, &fleds[1]);
|
||||
}
|
||||
}
|
||||
|
||||
void fled_lock_update(led_t led_state) {
|
||||
// Set indicator LED appropriately, whether it is used or not
|
||||
if (led_state.caps_lock) {
|
||||
sethsv(caps_color.hue, caps_color.sat, fled_val, &fleds[0]);
|
||||
} else {
|
||||
setrgb(0, 0, 0, &fleds[0]);
|
||||
}
|
||||
|
||||
rgblight_set();
|
||||
}
|
||||
|
||||
void set_fled_layer_color(uint8_t layer, hs_set hs) {
|
||||
// Update layer colors and refresh LEDs
|
||||
layer_colors[layer] = hs;
|
||||
fled_layer_update(layer_state);
|
||||
fled_update_conf();
|
||||
}
|
||||
|
||||
hs_set get_fled_layer_color(uint8_t layer) {
|
||||
return layer_colors[layer];
|
||||
}
|
||||
|
||||
void set_fled_caps_color(hs_set hs) {
|
||||
// Update caplock color and refresh LEDs
|
||||
caps_color = hs;
|
||||
fled_lock_update(host_keyboard_led_state());
|
||||
fled_update_conf();
|
||||
}
|
||||
|
||||
hs_set get_fled_caps_color(void) {
|
||||
return caps_color;
|
||||
}
|
||||
|
||||
// Fallback eeprom functions if VIA is not enabled
|
||||
#ifndef VIA_ENABLE
|
||||
|
||||
// Can be called in an overriding via_init_kb() to test if keyboard level code usage of
|
||||
// EEPROM is invalid and use/save defaults.
|
||||
bool via_eeprom_is_valid(void)
|
||||
{
|
||||
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
|
||||
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
|
||||
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
|
||||
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
|
||||
|
||||
return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 &&
|
||||
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 &&
|
||||
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 );
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2018 Jumail Mundekkat / MxBlue
|
||||
/* Copyright 2020 Jumail Mundekkat / MxBlue
|
||||
*
|
||||
* 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
|
||||
@@ -16,11 +16,12 @@
|
||||
|
||||
// EEPROM management code taken from Wilba6582
|
||||
// https://github.com/Wilba6582/qmk_firmware/blob/zeal60/keyboards/zeal60/zeal_eeprom.h
|
||||
|
||||
#ifndef MXSS_FRONTLED_H
|
||||
#define MXSS_FRONTLED_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "quantum_keycodes.h"
|
||||
#include "via.h"
|
||||
|
||||
// RGBLED index for front LEDs
|
||||
#define RGBLIGHT_FLED1 14
|
||||
@@ -29,13 +30,13 @@
|
||||
// Brightness increase step for front LEDs
|
||||
#define FLED_VAL_STEP 8
|
||||
|
||||
// QMK never uses more then 32bytes of EEPROM, so our region starts there
|
||||
// Magic value to verify the state of the EEPROM
|
||||
#define EEPROM_MAGIC 0xC3E7
|
||||
#define EEPROM_MAGIC_ADDR ((void*)32)
|
||||
|
||||
// Front LED settings
|
||||
#define EEPROM_FRONTLED_ADDR ((void*)34)
|
||||
#define FRONTLED_CONF_ADDR ((uint8_t*) VIA_EEPROM_CUSTOM_CONFIG_ADDR)
|
||||
#define FRONTLED_COLOR_CNT_ADDR (FRONTLED_CONF_ADDR + 1)
|
||||
#define FRONTLED_COLOR_ADDR ((uint16_t*)(FRONTLED_COLOR_CNT_ADDR + 1))
|
||||
|
||||
// No point persisting more 4, VIA only allows editing of 3 + 1 for caps
|
||||
#define FRONTLED_COLOR_MAXCNT 4
|
||||
|
||||
// Modes for front LEDs
|
||||
#define FLED_OFF 0b00
|
||||
@@ -43,10 +44,6 @@
|
||||
#define FLED_RGB 0b10
|
||||
#define FLED_UNDEF 0b11
|
||||
|
||||
// Hard-coded color for capslock indicator in FLED_INDI mode, H:0% S:100% = Red
|
||||
#define FLED_CAPS_H 0
|
||||
#define FLED_CAPS_S 255
|
||||
|
||||
// Config storage format for EEPROM
|
||||
typedef union {
|
||||
uint8_t raw;
|
||||
@@ -57,25 +54,35 @@ typedef union {
|
||||
} fled_config;
|
||||
|
||||
// Structure to store hue and saturation values
|
||||
typedef struct _hs_set {
|
||||
uint16_t hue;
|
||||
uint8_t sat;
|
||||
typedef union {
|
||||
uint16_t raw;
|
||||
struct {
|
||||
uint8_t hue;
|
||||
uint8_t sat;
|
||||
};
|
||||
} hs_set;
|
||||
|
||||
// Custom keycodes for front LED control
|
||||
enum fled_keycodes {
|
||||
FLED_MOD = SAFE_RANGE,
|
||||
FLED_VAI,
|
||||
FLED_VAD,
|
||||
NEW_SAFE_RANGE // define a new safe range
|
||||
FLED_MOD = USER00, // USER00 = VIA custom keycode start
|
||||
FLED_VAI,
|
||||
FLED_VAD,
|
||||
NEW_SAFE_RANGE // define a new safe range
|
||||
};
|
||||
|
||||
bool eeprom_is_valid(void); // Check if EEPROM has been set up
|
||||
void eeprom_set_valid(bool valid); // Change validity state of EEPROM
|
||||
void eeprom_update_conf(void); // Store current front LED config to EEPROM
|
||||
void fled_init(void); // Run init functions for front LEDs
|
||||
void process_record_fled(uint16_t keycode, keyrecord_t* record); // Process keycodes for front LEDs
|
||||
void fled_load_conf(void); // Load front LED config from EEPROM
|
||||
void fled_update_conf(void); // Store current front LED config to EEPROM
|
||||
|
||||
void fled_mode_cycle(void); // Cycle between the 3 modes for the front LEDs
|
||||
void fled_val_increase(void); // Increase the brightness of the front LEDs
|
||||
void fled_val_decrease(void); // Decrease the brightness of the front LEDs
|
||||
|
||||
#endif //MXSS_FRONTLED_H
|
||||
void fled_layer_update(layer_state_t state); // Process layer update for front LEDs
|
||||
void fled_lock_update(led_t led_state); // Process lock update for front LEDs
|
||||
|
||||
void set_fled_layer_color(uint8_t layer, hs_set hs); // Set color for a given layer
|
||||
void set_fled_caps_color(hs_set hs); // Set color for the capslock indicator
|
||||
hs_set get_fled_caps_color(void); // Get color for the capslock indicator
|
||||
hs_set get_fled_layer_color(uint8_t layer); // Get color for a given layer
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||

|
||||
|
||||
### Important Note:
|
||||
**This PCB supports the VIA configurator, and this is the recommended way to configure the keymap on this keyboard. Building the firmware should only be necessary if you would like to change the colours of the front LEDs in indicator mode.**
|
||||
|
||||
**For more information about the VIA configurator, [see here](https://caniusevia.com/).**
|
||||
|
||||
### Information:
|
||||
|
||||
- Case: Frosted Polycarbonate, CNC milled
|
||||
@@ -51,4 +56,4 @@ Colors for FLED_INDI mode are hardcoded as hue/saturation values, the caps lock
|
||||
|
||||
# Further Notes
|
||||
|
||||
As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example.
|
||||
As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,137 +16,245 @@
|
||||
#ifndef RGBLIGHT_H
|
||||
#define RGBLIGHT_H
|
||||
|
||||
#ifdef RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_MODES 35
|
||||
#else
|
||||
#define RGBLIGHT_MODES 1
|
||||
#endif
|
||||
#include "rgblight_reconfig.h"
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7
|
||||
#endif
|
||||
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_BREATHE_MAX
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
|
||||
#endif
|
||||
old mode number (before 0.6.117) to new mode name table
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
|
||||
#endif
|
||||
|-----------------|-----------------------------------|
|
||||
| old mode number | new mode name |
|
||||
|-----------------|-----------------------------------|
|
||||
| 1 | RGBLIGHT_MODE_STATIC_LIGHT |
|
||||
| 2 | RGBLIGHT_MODE_BREATHING |
|
||||
| 3 | RGBLIGHT_MODE_BREATHING + 1 |
|
||||
| 4 | RGBLIGHT_MODE_BREATHING + 2 |
|
||||
| 5 | RGBLIGHT_MODE_BREATHING + 3 |
|
||||
| 6 | RGBLIGHT_MODE_RAINBOW_MOOD |
|
||||
| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 |
|
||||
| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 |
|
||||
| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL |
|
||||
| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 |
|
||||
| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 |
|
||||
| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 |
|
||||
| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 |
|
||||
| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 |
|
||||
| 15 | RGBLIGHT_MODE_SNAKE |
|
||||
| 16 | RGBLIGHT_MODE_SNAKE + 1 |
|
||||
| 17 | RGBLIGHT_MODE_SNAKE + 2 |
|
||||
| 18 | RGBLIGHT_MODE_SNAKE + 3 |
|
||||
| 19 | RGBLIGHT_MODE_SNAKE + 4 |
|
||||
| 20 | RGBLIGHT_MODE_SNAKE + 5 |
|
||||
| 21 | RGBLIGHT_MODE_KNIGHT |
|
||||
| 22 | RGBLIGHT_MODE_KNIGHT + 1 |
|
||||
| 23 | RGBLIGHT_MODE_KNIGHT + 2 |
|
||||
| 24 | RGBLIGHT_MODE_CHRISTMAS |
|
||||
| 25 | RGBLIGHT_MODE_STATIC_GRADIENT |
|
||||
| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 |
|
||||
| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 |
|
||||
| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 |
|
||||
| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 |
|
||||
| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 |
|
||||
| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 |
|
||||
| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 |
|
||||
| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 |
|
||||
| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 |
|
||||
| 35 | RGBLIGHT_MODE_RGB_TEST |
|
||||
| 36 | RGBLIGHT_MODE_ALTERNATING |
|
||||
|-----------------|-----------------------------------|
|
||||
*****/
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||
#endif
|
||||
#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
|
||||
#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
|
||||
#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
|
||||
#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
|
||||
#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
|
||||
#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym,
|
||||
enum RGBLIGHT_EFFECT_MODE {
|
||||
RGBLIGHT_MODE_zero = 0,
|
||||
#include "rgblight_modes.h"
|
||||
RGBLIGHT_MODE_last
|
||||
};
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
|
||||
#endif
|
||||
#ifndef RGBLIGHT_H_DUMMY_DEFINE
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM
|
||||
#endif
|
||||
# define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1)
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
|
||||
#endif
|
||||
// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85
|
||||
|
||||
#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
|
||||
#endif
|
||||
# ifndef RGBLIGHT_EFFECT_BREATHE_MAX
|
||||
# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
|
||||
# endif
|
||||
|
||||
#ifndef RGBLIGHT_HUE_STEP
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#endif
|
||||
#ifndef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#endif
|
||||
#ifndef RGBLIGHT_VAL_STEP
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
# ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
|
||||
# endif
|
||||
|
||||
#define RGBLED_TIMER_TOP F_CPU/(256*64)
|
||||
# ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||
# endif
|
||||
|
||||
# ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
|
||||
# endif
|
||||
|
||||
# ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (effect_num_leds)
|
||||
# endif
|
||||
|
||||
# ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
|
||||
# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
|
||||
# endif
|
||||
|
||||
# ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
|
||||
# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
|
||||
# endif
|
||||
|
||||
# ifndef RGBLIGHT_HUE_STEP
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# endif
|
||||
# ifndef RGBLIGHT_SAT_STEP
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# endif
|
||||
# ifndef RGBLIGHT_VAL_STEP
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
# endif
|
||||
# ifndef RGBLIGHT_LIMIT_VAL
|
||||
# define RGBLIGHT_LIMIT_VAL 255
|
||||
# endif
|
||||
|
||||
# define RGBLED_TIMER_TOP F_CPU / (256 * 64)
|
||||
// #define RGBLED_TIMER_TOP 0xFF10
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "eeconfig.h"
|
||||
#ifndef RGBLIGHT_CUSTOM_DRIVER
|
||||
#include "ws2812.h"
|
||||
#endif
|
||||
#include "color.h"
|
||||
#include "rgblight_list.h"
|
||||
# include <stdint.h>
|
||||
# include <stdbool.h>
|
||||
# include "eeconfig.h"
|
||||
# ifndef RGBLIGHT_CUSTOM_DRIVER
|
||||
# include "ws2812.h"
|
||||
# endif
|
||||
# include "color.h"
|
||||
# include "rgblight_list.h"
|
||||
|
||||
# if defined(__AVR__)
|
||||
# include <avr/pgmspace.h>
|
||||
# endif
|
||||
|
||||
extern LED_TYPE led[RGBLED_NUM];
|
||||
|
||||
extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
|
||||
extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
|
||||
extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
|
||||
extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
|
||||
extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM;
|
||||
extern bool is_rgblight_initialized;
|
||||
|
||||
// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now)
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool enable :1;
|
||||
uint8_t mode :6;
|
||||
uint16_t hue :9;
|
||||
uint8_t sat :8;
|
||||
uint8_t val :8;
|
||||
uint8_t speed :8;//EECONFIG needs to be increased to support this
|
||||
};
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool enable : 1;
|
||||
uint8_t mode : 7;
|
||||
uint8_t hue : 8;
|
||||
uint8_t sat : 8;
|
||||
uint8_t val : 8;
|
||||
uint8_t speed : 8; // EECONFIG needs to be increased to support this
|
||||
};
|
||||
} rgblight_config_t;
|
||||
|
||||
void rgblight_init(void);
|
||||
typedef struct _rgblight_status_t {
|
||||
uint8_t base_mode;
|
||||
bool timer_enabled;
|
||||
# ifdef RGBLIGHT_SPLIT
|
||||
uint8_t change_flags;
|
||||
# endif
|
||||
} rgblight_status_t;
|
||||
|
||||
/* === Utility Functions ===*/
|
||||
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
|
||||
void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check
|
||||
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
|
||||
|
||||
/* === Low level Functions === */
|
||||
void rgblight_set(void);
|
||||
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
|
||||
|
||||
/* === Effects and Animations Functions === */
|
||||
/* effect range setting */
|
||||
void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds);
|
||||
|
||||
/* direct operation */
|
||||
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
||||
void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
||||
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
|
||||
void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
|
||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
# ifndef RGBLIGHT_SPLIT
|
||||
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
|
||||
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
|
||||
void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val);
|
||||
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val);
|
||||
# endif
|
||||
|
||||
/* effect mode change */
|
||||
void rgblight_mode(uint8_t mode);
|
||||
void rgblight_mode_noeeprom(uint8_t mode);
|
||||
void rgblight_increase(void);
|
||||
void rgblight_decrease(void);
|
||||
void rgblight_toggle(void);
|
||||
void rgblight_enable(void);
|
||||
void rgblight_disable(void);
|
||||
void rgblight_step(void);
|
||||
void rgblight_step_noeeprom(void);
|
||||
void rgblight_step_reverse(void);
|
||||
uint8_t rgblight_get_mode(void);
|
||||
void rgblight_mode(uint8_t mode);
|
||||
void rgblight_set(void);
|
||||
void rgblight_update_dword(uint32_t dword);
|
||||
void rgblight_step_reverse_noeeprom(void);
|
||||
|
||||
/* effects mode disable/enable */
|
||||
void rgblight_toggle(void);
|
||||
void rgblight_toggle_noeeprom(void);
|
||||
void rgblight_enable(void);
|
||||
void rgblight_enable_noeeprom(void);
|
||||
void rgblight_disable(void);
|
||||
void rgblight_disable_noeeprom(void);
|
||||
|
||||
/* hue, sat, val change */
|
||||
void rgblight_increase_hue(void);
|
||||
void rgblight_increase_hue_noeeprom(void);
|
||||
void rgblight_decrease_hue(void);
|
||||
void rgblight_decrease_hue_noeeprom(void);
|
||||
void rgblight_increase_sat(void);
|
||||
void rgblight_increase_sat_noeeprom(void);
|
||||
void rgblight_decrease_sat(void);
|
||||
void rgblight_decrease_sat_noeeprom(void);
|
||||
void rgblight_increase_val(void);
|
||||
void rgblight_increase_val_noeeprom(void);
|
||||
void rgblight_decrease_val(void);
|
||||
void rgblight_decrease_val_noeeprom(void);
|
||||
void rgblight_increase_speed(void);
|
||||
void rgblight_decrease_speed(void);
|
||||
void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
|
||||
uint16_t rgblight_get_hue(void);
|
||||
void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val);
|
||||
void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val);
|
||||
|
||||
/* query */
|
||||
uint8_t rgblight_get_mode(void);
|
||||
uint8_t rgblight_get_hue(void);
|
||||
uint8_t rgblight_get_sat(void);
|
||||
uint8_t rgblight_get_val(void);
|
||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
||||
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
||||
void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
||||
|
||||
/* === qmk_firmware (core)internal Functions === */
|
||||
void rgblight_init(void);
|
||||
uint32_t rgblight_read_dword(void);
|
||||
void rgblight_update_dword(uint32_t dword);
|
||||
uint32_t eeconfig_read_rgblight(void);
|
||||
void eeconfig_update_rgblight(uint32_t val);
|
||||
void eeconfig_update_rgblight_default(void);
|
||||
void eeconfig_debug_rgblight(void);
|
||||
void eeconfig_update_rgblight(uint32_t val);
|
||||
void eeconfig_update_rgblight_default(void);
|
||||
void eeconfig_debug_rgblight(void);
|
||||
|
||||
void rgb_matrix_increase(void);
|
||||
void rgb_matrix_decrease(void);
|
||||
|
||||
void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
|
||||
void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
|
||||
|
||||
void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
|
||||
void rgblight_mode_noeeprom(uint8_t mode);
|
||||
void rgblight_toggle_noeeprom(void);
|
||||
void rgblight_enable_noeeprom(void);
|
||||
void rgblight_disable_noeeprom(void);
|
||||
|
||||
void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
|
||||
void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
|
||||
void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
|
||||
|
||||
|
||||
#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
||||
# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
||||
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
void rgblight_task(void);
|
||||
@@ -155,12 +263,52 @@ void rgblight_timer_init(void);
|
||||
void rgblight_timer_enable(void);
|
||||
void rgblight_timer_disable(void);
|
||||
void rgblight_timer_toggle(void);
|
||||
void rgblight_effect_breathing(uint8_t interval);
|
||||
void rgblight_effect_rainbow_mood(uint8_t interval);
|
||||
void rgblight_effect_rainbow_swirl(uint8_t interval);
|
||||
void rgblight_effect_snake(uint8_t interval);
|
||||
void rgblight_effect_knight(uint8_t interval);
|
||||
void rgblight_effect_christmas(void);
|
||||
void rgblight_effect_rgbtest(void);
|
||||
|
||||
#endif
|
||||
# ifdef RGBLIGHT_SPLIT
|
||||
# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)
|
||||
# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1)
|
||||
# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2)
|
||||
# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3)
|
||||
|
||||
typedef struct _rgblight_syncinfo_t {
|
||||
rgblight_config_t config;
|
||||
rgblight_status_t status;
|
||||
} rgblight_syncinfo_t;
|
||||
|
||||
/* for split keyboard master side */
|
||||
uint8_t rgblight_get_change_flags(void);
|
||||
void rgblight_clear_change_flags(void);
|
||||
void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
|
||||
/* for split keyboard slave side */
|
||||
void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
|
||||
# endif
|
||||
|
||||
# ifdef RGBLIGHT_USE_TIMER
|
||||
|
||||
typedef struct _animation_status_t {
|
||||
uint16_t last_timer;
|
||||
uint8_t delta; /* mode - base_mode */
|
||||
bool restart;
|
||||
union {
|
||||
uint16_t pos16;
|
||||
uint8_t pos;
|
||||
int8_t current_hue;
|
||||
uint16_t current_offset;
|
||||
};
|
||||
} animation_status_t;
|
||||
|
||||
extern animation_status_t animation_status;
|
||||
|
||||
void rgblight_effect_breathing(animation_status_t *anim);
|
||||
void rgblight_effect_rainbow_mood(animation_status_t *anim);
|
||||
void rgblight_effect_rainbow_swirl(animation_status_t *anim);
|
||||
void rgblight_effect_snake(animation_status_t *anim);
|
||||
void rgblight_effect_knight(animation_status_t *anim);
|
||||
void rgblight_effect_christmas(animation_status_t *anim);
|
||||
void rgblight_effect_rgbtest(animation_status_t *anim);
|
||||
void rgblight_effect_alternating(animation_status_t *anim);
|
||||
|
||||
# endif
|
||||
|
||||
#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE
|
||||
#endif // RGBLIGHT_H
|
||||
|
||||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
BOOTMAGIC_ENABLE = lite # 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)
|
||||
@@ -30,10 +30,12 @@ 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
|
||||
|
||||
SRC += mxss_frontled.c
|
||||
|
||||
# Remove the common RGB light code and use my iteration instead
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
|
||||
SRC += rgblight.c
|
||||
SRC += color.c
|
||||
SRC += ws2812.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
|
||||
@@ -14,23 +14,24 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "mxss_frontled.h"
|
||||
|
||||
// Predefined colors for layers
|
||||
hs_set caps_color = { .hue = 0, .sat = 255 };
|
||||
|
||||
// Colors for layers
|
||||
// Format: {hue, saturation}
|
||||
// {0, 0} to turn off the LED
|
||||
// Add additional rows to handle more layers
|
||||
hs_set layer_colors[] = {
|
||||
[0] = {0, 0}, // Color for Layer 0
|
||||
[1] = {86, 255}, // Color for Layer 1
|
||||
[2] = {36, 255}, // Color for Layer 2
|
||||
[3] = {185, 255}, // Color for Layer 3
|
||||
hs_set layer_colors[4] = {
|
||||
[0] = {.hue = 0, .sat = 0}, // Color for Layer 0
|
||||
[1] = {.hue = 86, .sat = 255}, // Color for Layer 1
|
||||
[2] = {.hue = 36, .sat = 255}, // Color for Layer 2
|
||||
[3] = {.hue = 185, .sat = 255}, // Color for Layer 3
|
||||
};
|
||||
const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);
|
||||
size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);
|
||||
|
||||
// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control
|
||||
enum custom_keycodes {
|
||||
MY_KEYCODE = NEW_SAFE_RANGE,
|
||||
MY_KEYCODE = NEW_SAFE_RANGE,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
writePinHigh(B0);
|
||||
} else {
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
|
||||
100
keyboards/numatreus/config.h
Normal file
100
keyboards/numatreus/config.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Copyright 2019 yohei <yohewi@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
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0xE80A
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER yohewi
|
||||
#define PRODUCT NumAtreus
|
||||
#define DESCRIPTION QMK keyboard firmware for NumAtreus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 11
|
||||
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D2, D1, D0, D4 }
|
||||
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* 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
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
// keyboard RGB LED support
|
||||
//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
|
||||
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||
#define RGBLED_NUM 6
|
||||
|
||||
#define RGBLIGHT_LIMIT_VAL 200
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
// USB_MAX_POWER_CONSUMPTION value for stonehenge30 keyboard
|
||||
// 120 RGBoff, OLEDoff
|
||||
// 120 OLED
|
||||
// 330 RGB 6
|
||||
// 300 RGB 32
|
||||
// 310 OLED & RGB 32
|
||||
#define USB_MAX_POWER_CONSUMPTION 400
|
||||
#else
|
||||
// fix iPhone and iPad power adapter issue
|
||||
// iOS device need lessthan 100
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
12
keyboards/numatreus/info.json
Normal file
12
keyboards/numatreus/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "numatreus",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 13,
|
||||
"height": 4.7,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}]
|
||||
}
|
||||
}
|
||||
}
|
||||
60
keyboards/numatreus/keymaps/default/keymap.c
Normal file
60
keyboards/numatreus/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,60 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT( /* Qwerty */
|
||||
/*
|
||||
* Q W E R T || Y U I O P
|
||||
* A S D F G || H J K L ;
|
||||
* Z X C V B || N M , . /
|
||||
* SFT TAB CTL LW space bksp||ALT Ent RS - ' =
|
||||
*/
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH ,
|
||||
KC_LSFT, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, KC_LALT, KC_ENT, MO(_RAISE), KC_MINS, KC_QUOT, KC_PEQL
|
||||
),
|
||||
|
||||
/*
|
||||
* 1 2 3 4 5 || 6 7 8 9 0
|
||||
* F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10
|
||||
* F11 F12 ( ) & || ` [ ] + \
|
||||
* lower insert super shift space bksp|| alt Ent fn . - =
|
||||
*/
|
||||
[_RAISE] = LAYOUT( /* [> RAISE <] */
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||
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_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_LBRC, KC_RBRC, KC_PSLS, KC_BSLS ,
|
||||
KC_NO, KC_INS, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_TRNS, KC_DOT, KC_PMNS, KC_EQL ),
|
||||
|
||||
|
||||
/*
|
||||
* ! @ # $ % || ^ & * ( )
|
||||
* DEL ESC || PGDN PGUP PSCR
|
||||
* CAPS volup ENT reset || UP
|
||||
* voldn super shift space bspc|| alt ent LEFT DOWN RGHT
|
||||
*/
|
||||
[_LOWER] = LAYOUT( /* [> LOWER <] */
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN ,
|
||||
KC_DELT, KC_ESC, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_PSCR, KC_NO, KC_NO,
|
||||
KC_CAPS, KC_VOLU, KC_NO, KC_ENT, RESET, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO ,
|
||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_SPC, KC_BSPC, KC_LALT, KC_ENT, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT )
|
||||
|
||||
};
|
||||
230
keyboards/numatreus/keymaps/hdbx/keymap.c
Normal file
230
keyboards/numatreus/keymaps/hdbx/keymap.c
Normal file
@@ -0,0 +1,230 @@
|
||||
// WindowsでJIS配列として認識しているときに、オシャレなUS配列用キーキャップを使うためのキーマップです。
|
||||
// Google日本語入力の場合、以下のキー設定を行うとLower,Raiseのタップでそれぞれ半角入力と全角入力を切り替えできるようになります。
|
||||
// ・Henkan(入力文字なし/直接入力)に「IMEを有効化」を割り当て
|
||||
// ・Muhenkan(入力文字なし/直接入力)に「IMEを無効化」を割り当て
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_jp.h" // qmk_firmware-master/quantum/keymap_extras/keymap_jp.h 日本語キーボード設定用
|
||||
#include <sendstring_jis.h> // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_HDBX,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_GAME,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
HDBX,
|
||||
MCR1, // マクロ1
|
||||
MCR2, // マクロ2
|
||||
MCR3, // マクロ3
|
||||
MCR4, // マクロ4
|
||||
MCR5, // マクロ5
|
||||
WN_SCLN, // タップでJISの「:」 シフトでJISの「;」 (Windows)
|
||||
DM_PLY1,
|
||||
DM_PLY2,
|
||||
DM_REC1,
|
||||
DM_REC2,
|
||||
DM_RSTP,
|
||||
};
|
||||
|
||||
// Use Dynamic macro
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define LOWER LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower
|
||||
#define RAISE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise
|
||||
#define GUI_ESC GUI_T(KC_ESC) // タップでESC ホールドでGUI
|
||||
#define SFT_BS SFT_T(KC_BSPC) // タップでBackSpace ホールドでSHIFT
|
||||
#define CTL_ENT CTL_T(KC_ENT) // タップでEnter ホールドでCTRL
|
||||
#define CTL_TAB CTL_T(KC_TAB) // タップでTAB ホールドでCTRL
|
||||
#define SFT_DEL SFT_T(KC_DEL) // タップでDELETE ホールドでSHIFT
|
||||
#define ALT_LBR ALT_T(JP_LBRC) // タップで[ ホールドでALT
|
||||
#define SFT_RBR SFT_T(JP_RBRC) // タップで] ホールドでSHIFT
|
||||
#define SFT_SPC S(KC_SPC) // Shift + Space
|
||||
#define WN_CAPS S(KC_CAPS) // Caps Lock (Windows)
|
||||
#define GAME TO(_GAME) // _GAMEレイヤーへ移動
|
||||
#define ADJUST TO(_ADJUST) // _ADJUSTレイヤーへ移動
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty配列
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | Q | W | E | R | T | | Y | U | I | O | P |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | A | S | D | F | G | | H | J | K | L | ; |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Z | X | C | V | B | | N | M | , | . | / |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, WN_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||
ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR
|
||||
),
|
||||
|
||||
/* HDBX配列 デフォルトレイヤーをこの配列にしたい場合は、AdjustレイヤーでK (Lower + Raise + K)
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | Q | W | E | , | . | | Y | D | P | F | : |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | A | I | O | U | G | | M | N | T | R | S |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Z | X | C | V | B | | H | J | K | L | / |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Alt/[ |WINESC| ~ |Sft/Bs|Lower |CtlEnt|Space |Raise |CtrlTb| - | ' |Sft/] |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_HDBX] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_COMM, KC_DOT, KC_Y, KC_D, KC_P, KC_F, WN_SCLN,
|
||||
KC_A, KC_I, KC_O, KC_U, KC_G, KC_M, KC_N, KC_T, KC_R, KC_S,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, KC_J, KC_K, KC_L, KC_SLSH,
|
||||
ALT_LBR, GUI_ESC, JP_TILD, SFT_BS, LOWER, CTL_ENT, KC_SPC, RAISE, CTL_TAB, KC_MINS, JP_QUOT, SFT_RBR
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | | 7 | 8 | 9 | . | Bspc |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | F6 | F7 | F8 | F9 | F10 | | 4 | 5 | 6 | + | * |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* |Zen/Ha|ScLock|Pause | F11 | F12 | | 1 | 2 | 3 | - | / |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Alt | WIN | ` |SftDel|Lower | Ctrl |SftSpc|Raise | 0 | , | = |Enter |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC,
|
||||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST,
|
||||
KC_ZKHK, KC_SLCK, KC_PAUS, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS,
|
||||
KC_LALT, KC_LGUI, JP_GRV, SFT_DEL, _______, KC_LCTL, SFT_SPC, _______, KC_0, KC_COMM, JP_EQL, KC_ENT
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | ! | @ | # | $ | % | | Home | App | Ins | Calc |PrtScr|
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | ^ | & | * | \ | | | | Left | Down | Up |Right | ; |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | ` | { | } | < | > | | End | Mute | ( | ) | ? |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Alt | WIN | ` | Del |Lower | Ctrl | Caps |Raise | Ctrl | _ | " |Shift |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_APP, KC_INS, KC_CALC, KC_PSCR,
|
||||
JP_CIRC, JP_AMPR, JP_ASTR, JP_YEN, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN,
|
||||
JP_GRV, JP_LCBR, JP_RCBR, KC_LT, KC_GT, KC_END, KC_MUTE, JP_LPRN, JP_RPRN, KC_QUES,
|
||||
KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQT, KC_RSFT
|
||||
),
|
||||
|
||||
/* GAME ゲームやテンキー固定で使用するレイヤーです。AdjustレイヤーでGを押下して遷移。戻るときはtoBaseから。
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | Q | Up | E | R | T | | 7 | 8 | 9 | . | Bspc |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Left | Down |Right | F | G | | 4 | 5 | 6 | + | * |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Z | X | C | V | B | | 1 | 2 | 3 | - | / |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Alt | Esc | Tab |Shift |Space | Ctrl |toBase| \ | 0 | , | = |Enter |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT(
|
||||
KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_7, KC_8, KC_9, KC_DOT, KC_BSPC,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_4, KC_5, KC_6, KC_PPLS, KC_PAST,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_3, KC_PMNS, KC_PSLS,
|
||||
KC_LALT, KC_ESC, KC_TAB, KC_LSFT, KC_SPC, KC_LCTL, ADJUST, JP_YEN, KC_0, KC_COMM, JP_EQL, KC_ENT
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | MCR1 | MCR2 | MCR3 | MCR4 | MCR5 | |DyMcr1|DyMcr2|RcMcr1|RcMcr2|StpRec|
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | | | | |ToGAME| | |Qwerty| HDBX | | |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |RESET | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT(
|
||||
MCR1, MCR2, MCR3, MCR4, MCR5, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX, QWERTY, HDBX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case HDBX:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_HDBX);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
static bool lshift = false;
|
||||
case WN_SCLN: // コロン「;:」
|
||||
if (record->event.pressed) {
|
||||
lshift = get_mods() & MOD_BIT(KC_LSFT);
|
||||
if (lshift) {
|
||||
unregister_code(KC_LSFT);
|
||||
tap_code(JP_SCLN);
|
||||
} else {
|
||||
tap_code(JP_SCLN);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCR1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("0123456789"); // 送信文字列
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCR2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("hogehoge\n"); // 送信文字列
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCR3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("hoge@hoge.hoge"); // 送信文字列
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCR4:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("\"\""SS_TAP(X_LEFT)); // 送信文字列
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MCR5:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("<>"SS_TAP(X_LEFT)); // 送信文字列
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
3
keyboards/numatreus/keymaps/hdbx/rules.mk
Normal file
3
keyboards/numatreus/keymaps/hdbx/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
DYNAMIC_MACRO_ENABLE = yes
|
||||
59
keyboards/numatreus/keymaps/like_jis/config.h
Normal file
59
keyboards/numatreus/keymaps/like_jis/config.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
#endif
|
||||
#define TAPPING_TERM 225
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#define MOUSEKEY_INTERVAL 1
|
||||
|
||||
#undef MOUSEKEY_TIME_TO_MAX
|
||||
#define MOUSEKEY_TIME_TO_MAX 150
|
||||
|
||||
#undef MOUSEKEY_MAX_SPEED
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
|
||||
#undef MOUSEKEY_MOVE_DELTA
|
||||
#define MOUSEKEY_MOVE_DELTA 4
|
||||
|
||||
#undef MOUSEKEY_DELAY
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#endif
|
||||
|
||||
// Selection of RGBLIGHT MODE to use.
|
||||
#if defined(LED_ANIMATIONS)
|
||||
//#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
//#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
//#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#endif
|
||||
196
keyboards/numatreus/keymaps/like_jis/keymap.c
Normal file
196
keyboards/numatreus/keymaps/like_jis/keymap.c
Normal file
@@ -0,0 +1,196 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_jp.h"
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_BASE = 0,
|
||||
_NUMPAD,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
BASE = SAFE_RANGE,
|
||||
NUMPAD,
|
||||
KANJI,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
enum tapdances{
|
||||
TD_CODO = 0,
|
||||
// TD_MNUB,
|
||||
};
|
||||
|
||||
// Layer Mode aliases
|
||||
#define KC_LOWER LOWER
|
||||
#define KC_RAISE RAISE
|
||||
#define KC_ADJST ADJUST
|
||||
#define KC_DLNP NUMPAD //DF(_NUMPAD)
|
||||
#define KC_DLBS BASE //DF(_BASE)
|
||||
|
||||
#define KC_ZSFT LSFT_T(KC_Z)
|
||||
#define KC_MNSF LSFT_T(KC_MINS)
|
||||
#define KC_ESCT LCTL_T(KC_ESC)
|
||||
#define KC_TBAL LALT_T(KC_TAB)
|
||||
#define KC_11SF LSFT_T(KC_F11)
|
||||
#define KC_ALAP LALT_T(KC_APP)
|
||||
#define KC_JEQL LSFT(KC_MINS)
|
||||
#define KC_WLCK LALT(KC_L)
|
||||
#define KC_SFEQ LSFT(KC_MINS)
|
||||
#define KC_SFPL LSFT(KC_SCLN)
|
||||
#define KC_SFAS LSFT(KC_QUOT)
|
||||
|
||||
#define KC_CODO TD(TD_CODO)
|
||||
// #define KC_MNUB TD(TD_MNUB)
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
|
||||
// [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
//,----------------------------------. ,----------------------------------.
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_ZSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_CODO, KC_UP, KC_MNSF,
|
||||
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
KC_ESCT, KC_TBAL, KC_LGUI, KC_LOWER, KC_BSPC, KC_BSPC, KC_SPC, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_NUMPAD] = LAYOUT(
|
||||
//,----------------------------------. ,----------------------------------.
|
||||
KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PAST, KC_NLCK,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_QUOT,
|
||||
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_SPC, KC_DEL, KC_SPC, KC_DLBS, KC_P0, KC_PDOT, KC_SFEQ, KC_BSPC
|
||||
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//,----------------------------------. ,----------------------------------.
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_11SF, KC_F12, KC_DLNP, KANJI, KC_ENT, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO,
|
||||
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
//,----------------------------------. ,----------------------------------.
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_QUOT, KC_4, KC_5, KC_6, KC_MINS,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PPLS,
|
||||
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WLCK, KC_TRNS, KC_0, KC_DOT, KC_JEQL
|
||||
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
//,----------------------------------. ,----------------------------------.
|
||||
RESET, RGBRST, AG_NORM, AG_SWAP, KC_CAPS, XXXXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_SLCK, XXXXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN,
|
||||
//|------+------+------+------+------| |------+------+------+------+------|
|
||||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NLCK, XXXXXXX, KC_BTN1, KC_BTN2, KC_MS_U, XXXXXXX,
|
||||
//|------+------+------+------+------|------+------+------+------+------+------+------|
|
||||
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R
|
||||
//|------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
)
|
||||
};
|
||||
|
||||
#define L_BASE _BASE
|
||||
#define L_NUMPAD (1<<_NUMPAD)
|
||||
|
||||
static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
|
||||
pressed ? layer_on(layer1) : layer_off(layer1);
|
||||
IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
|
||||
}
|
||||
|
||||
int RGB_current_mode;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
bool result = false;
|
||||
switch (keycode) {
|
||||
case BASE:
|
||||
if (record->event.pressed) {
|
||||
default_layer_set(L_BASE);
|
||||
}
|
||||
break;
|
||||
case NUMPAD:
|
||||
if (record->event.pressed) {
|
||||
default_layer_set(L_NUMPAD);
|
||||
}
|
||||
break;
|
||||
case LOWER:
|
||||
update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
|
||||
break;
|
||||
case RAISE:
|
||||
update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
|
||||
break;
|
||||
case KANJI:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lalt_lgui == false) {
|
||||
register_code(KC_LANG2);
|
||||
} else {
|
||||
tap_code16(A(KC_GRV));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LANG2);
|
||||
}
|
||||
break;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
|
||||
case RGB_MOD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_step();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
break;
|
||||
case RGBRST:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
}
|
||||
8
keyboards/numatreus/keymaps/like_jis/rules.mk
Normal file
8
keyboards/numatreus/keymaps/like_jis/rules.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
MOUSEKEY_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
LED_ANIMATIONS = yes
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
61
keyboards/numatreus/keymaps/yohewi/keymap.c
Normal file
61
keyboards/numatreus/keymaps/yohewi/keymap.c
Normal file
@@ -0,0 +1,61 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
BASE = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* q w e r t || y u i o p
|
||||
* a s d f g || h j k l ;
|
||||
* z x c v b || n m , . \
|
||||
* esc tab ctl lw spc bspc|| GRV ent RS / alt -
|
||||
*/
|
||||
|
||||
[_QWERTY] = LAYOUT( /* Qwerty */
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
|
||||
SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_BSLS) ,
|
||||
KC_ESC, KC_TAB, KC_LCTL, MO(_LOWER), KC_SPC, KC_BSPC, LALT(KC_GRV), KC_ENT, MO(_RAISE), KC_DOT, KC_RALT, KC_MINS ),
|
||||
|
||||
|
||||
/*
|
||||
* 1 2 3 4 5 || 6 7 8 9 0
|
||||
* # < > = - || _ + ENT
|
||||
* [ ] ( ) & || ` . UP \
|
||||
* TRANS TRANS TRANS TRANS TRANS TRANS|| TRANS TRANS RS LEFT DPWM RGHT
|
||||
*/
|
||||
[_RAISE] = LAYOUT( /* [> RAISE <] */
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||
KC_HASH, KC_LABK, KC_RABK, KC_EQL, KC_MINS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_ENT ,
|
||||
KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_TRNS, KC_DOT, KC_UP, KC_BSLS ,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT ),
|
||||
|
||||
/*
|
||||
* ! @ # $ % || ^ & * ( )
|
||||
* F1 F2 F3 F4 F5 || F6 F7 F8 F9 F10
|
||||
* F11 F12 reset || , UP \
|
||||
* TRNS TRNS TRNS TRNS TRNS TRNS||TRNS TRNS TRNS LEFT DPWM RGHT
|
||||
*/
|
||||
|
||||
[_LOWER] = LAYOUT( /* [> LOWER <] */
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN ,
|
||||
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_NO, KC_NO, RESET, KC_TRNS, KC_TRNS, KC_QUOT, KC_UP, KC_BSLS ,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, TO(_QWERTY), KC_LEFT, KC_DOWN, KC_RGHT )
|
||||
};
|
||||
1
keyboards/numatreus/numatreus.c
Normal file
1
keyboards/numatreus/numatreus.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "numatreus.h"
|
||||
20
keyboards/numatreus/numatreus.h
Normal file
20
keyboards/numatreus/numatreus.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
|
||||
{ k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
|
||||
{ k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
|
||||
{ k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
|
||||
}
|
||||
13
keyboards/numatreus/readme.md
Normal file
13
keyboards/numatreus/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# NumAtreus
|
||||
|
||||
A small mechanical keyboard that is based around the shape of the human hand.
|
||||
|
||||
* Keyboard Maintainer: yohewi(yohewi@gmail.com)
|
||||
* Hardware Supported: NumAtreus, PCB
|
||||
* Hardware Availability: [Case Data](https://github.com/yohewi/NumAtreuscase)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make numatreus:default:flash
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
36
keyboards/numatreus/rules.mk
Normal file
36
keyboards/numatreus/rules.mk
Normal file
@@ -0,0 +1,36 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
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
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
#TAP_DANCE_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
LED_ANIMATIONS = no
|
||||
|
||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
|
||||
OPT_DEFS += -DLED_ANIMATIONS
|
||||
endif
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
52
keyboards/ogre/ergo_split/config.h
Normal file
52
keyboards/ogre/ergo_split/config.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2020 ctrlshiftba
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1209
|
||||
#define PRODUCT_ID 0x095E
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER ctrlshiftba
|
||||
#define PRODUCT ergo_split
|
||||
#define DESCRIPTION a keycap friendly ergo. the split version
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
/* Keyboard Matrix Assignments */
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D3
|
||||
#define SPLIT_HAND_PIN D1
|
||||
|
||||
#define RGB_DI_PIN B6
|
||||
#define RGBLED_SPLIT { 7, 7 }
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_MAP { 6, 5, 4, 3, 2, 1, 0, 13, 12,11, 10, 9, 8, 7}
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define DEBOUNCE 5
|
||||
17
keyboards/ogre/ergo_split/ergo_split.c
Normal file
17
keyboards/ogre/ergo_split/ergo_split.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2020 ctrlshiftba
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ergo_split.h"
|
||||
39
keyboards/ogre/ergo_split/ergo_split.h
Normal file
39
keyboards/ogre/ergo_split/ergo_split.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* Copyright 2020 ctrlshiftba
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
k63, k00, k10, k20, k30, k40, k50, k60, k65, k55, k45, k35, k25, k15, k05, k68, \
|
||||
k01, k11, k21, k31, k41, k51, k61, k66, k56, k46, k36, k26, k16, k06, \
|
||||
k02, k12, k22, k32, k42, k52, k62, k67, k57, k47, k37, k27, k17, k07, \
|
||||
k03, k13, k23, k33, k43, k53, k58, k48, k38, k28, k18, k08, \
|
||||
k04, k14, k24, k34, k44, k54, k64, k69, k59, k49, k39, k29, k19, k09 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k10, k20, k30, k40, k50, k60 }, \
|
||||
{ k01, k11, k21, k31, k41, k51, k61 }, \
|
||||
{ k02, k12, k22, k32, k42, k52, k62 }, \
|
||||
{ k03, k13, k23, k33, k43, k53, k63 }, \
|
||||
{ k04, k14, k24, k34, k44, k54, k64 }, \
|
||||
{ k05, k15, k25, k35, k45, k55, k65 }, \
|
||||
{ k06, k16, k26, k36, k46, k56, k66 }, \
|
||||
{ k07, k17, k27, k37, k47, k57, k67 }, \
|
||||
{ k08, k18, k28, k38, k48, k58, k68 }, \
|
||||
{ k09, k19, k29, k39, k49, k59, k69 }, \
|
||||
}
|
||||
41
keyboards/ogre/ergo_split/keymaps/default/keymap.c
Normal file
41
keyboards/ogre/ergo_split/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2020 ctrlshiftba
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define TP_Z MT(MOD_LCTL, KC_Z)
|
||||
#define TP_X MT(MOD_LGUI, KC_X)
|
||||
#define TP_GR MT(MOD_LCTL, KC_GRV)
|
||||
#define TP_SPC LT(1, KC_SPC)
|
||||
#define TP_ENT LT(1, KC_ENT)
|
||||
#define TP_QUOT MT(MOD_RGUI, KC_QUOT)
|
||||
#define TP_RCTRL MT(MOD_RCTL, KC_RBRC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TP_QUOT,
|
||||
KC_LSFT, TP_Z, TP_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
TP_GR, KC_LALT, KC_LEFT, KC_RGHT, TP_SPC, KC_SPC, KC_BSPC, KC_RALT, KC_ENT, TP_ENT, KC_DOWN, KC_UP, KC_LBRC, TP_RCTRL
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_INS, KC_HOME, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RGB_M_P, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______,
|
||||
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MENU, _______
|
||||
),
|
||||
};
|
||||
1
keyboards/ogre/ergo_split/keymaps/default/readme.md
Normal file
1
keyboards/ogre/ergo_split/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for ergo_split
|
||||
15
keyboards/ogre/ergo_split/readme.md
Normal file
15
keyboards/ogre/ergo_split/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# ogre ergo (split)
|
||||
## a keycap friendly ergo
|
||||

|
||||
|
||||
The ogre ergo is a ergodox inspired keyboard that is a keycap friendly ergo supporting a wide variety of keycap layout possiblities. Its can be built as either a split or single keyboard.
|
||||
|
||||
* Keyboard Maintainer: [ctrlshiftba](https://github.com/ctrlshiftbryan)
|
||||
* Hardware Supported: the ogre ergo pcb
|
||||
* Hardware Availability: https://ctrlshiftba.com/
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ogre/ergo_split:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
33
keyboards/ogre/ergo_split/rules.mk
Normal file
33
keyboards/ogre/ergo_split/rules.mk
Normal file
@@ -0,0 +1,33 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
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
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
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
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
SPLIT_KEYBOARD = yes
|
||||
@@ -63,9 +63,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -86,4 +84,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
VISUALIZER_ENABLE = yes
|
||||
|
||||
LED_DRIVER = is31fl3731c
|
||||
|
||||
@@ -6,7 +6,6 @@ void led_set_kb(uint8_t usb_led) {
|
||||
writePinLow(F4);
|
||||
} else {
|
||||
setPinInput(F4);
|
||||
writePinLow(F4);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
|
||||
@@ -132,9 +132,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -155,4 +153,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,9 +151,7 @@ void matrix_init_user(void) {
|
||||
#ifdef BOOTLOADER_CATERINA
|
||||
// This will disable the red LEDs on the ProMicros
|
||||
setPinInput(D5);
|
||||
writePinLow(D5);
|
||||
setPinInput(B0);
|
||||
writePinLow(B0);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -174,4 +172,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
# endif
|
||||
|
||||
# ifndef __ASSEMBLER__
|
||||
# define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset)
|
||||
# define _PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + ((p) >> PORT_SHIFTER) + (offset))
|
||||
// Port X Input Pins Address
|
||||
# define PINx_ADDRESS(p) _PIN_ADDRESS(p, 0)
|
||||
// Port X Data Direction Register, 0:input 1:output
|
||||
|
||||
@@ -174,7 +174,7 @@ extern layer_state_t layer_state;
|
||||
#if defined(__AVR__)
|
||||
typedef uint8_t pin_t;
|
||||
|
||||
# define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low")
|
||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
@@ -184,6 +184,7 @@ typedef uint8_t pin_t;
|
||||
# define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin))
|
||||
|
||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
||||
|
||||
#elif defined(PROTOCOL_CHIBIOS)
|
||||
typedef ioline_t pin_t;
|
||||
|
||||
|
||||
@@ -175,61 +175,61 @@ typedef struct {
|
||||
} usb_driver_config_t;
|
||||
|
||||
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
|
||||
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
||||
{ \
|
||||
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
||||
.in_ep_config = \
|
||||
{ \
|
||||
stream##_IN_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.out_ep_config = \
|
||||
{ \
|
||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
NULL, /* IN notification callback */ \
|
||||
qmkusbDataReceived, /* OUT notification callback */ \
|
||||
0, /* IN maximum packet size */ \
|
||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.int_ep_config = \
|
||||
{ \
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.config = { \
|
||||
.usbp = &USB_DRIVER, \
|
||||
.bulk_in = stream##_IN_EPNUM, \
|
||||
.bulk_out = stream##_OUT_EPNUM, \
|
||||
.int_in = notification, \
|
||||
.in_buffers = stream##_IN_CAPACITY, \
|
||||
.out_buffers = stream##_OUT_CAPACITY, \
|
||||
.in_size = stream##_EPSIZE, \
|
||||
.out_size = stream##_EPSIZE, \
|
||||
.fixed_size = fixedsize, \
|
||||
.ib = (uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
||||
.ob = (uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
||||
} \
|
||||
#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
||||
{ \
|
||||
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
||||
.in_ep_config = \
|
||||
{ \
|
||||
stream##_IN_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.out_ep_config = \
|
||||
{ \
|
||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
NULL, /* IN notification callback */ \
|
||||
qmkusbDataReceived, /* OUT notification callback */ \
|
||||
0, /* IN maximum packet size */ \
|
||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.int_ep_config = \
|
||||
{ \
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
}, \
|
||||
.config = { \
|
||||
.usbp = &USB_DRIVER, \
|
||||
.bulk_in = stream##_IN_EPNUM, \
|
||||
.bulk_out = stream##_OUT_EPNUM, \
|
||||
.int_in = notification, \
|
||||
.in_buffers = stream##_IN_CAPACITY, \
|
||||
.out_buffers = stream##_OUT_CAPACITY, \
|
||||
.in_size = stream##_EPSIZE, \
|
||||
.out_size = stream##_EPSIZE, \
|
||||
.fixed_size = fixedsize, \
|
||||
.ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
||||
.ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
||||
} \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
||||
63
users/datagrok/README.md
Normal file
63
users/datagrok/README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# datagrok's QMK user-space code
|
||||
|
||||
## cdeq "comma dot exclamation question"
|
||||
|
||||
This is a hack to place `question mark` on `shift-comma` and `exclamation mark` on `shift-period`.
|
||||
|
||||
When using an operating system configured for a US/qwerty layout this replaces the angle brackets `<` `>` with `?` `!`. This helps on small keyboards to keep symbols for prose co-located in one layer, and symbols for programming in another.
|
||||
|
||||
It's a "hack" because the "proper" way to accomplish this would be to edit the operating system's keymap.
|
||||
|
||||
### setup
|
||||
|
||||
in your `keymap.c`:
|
||||
|
||||
#include "feature_cdeq.h"
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_cdeq(keycode, record);
|
||||
}
|
||||
|
||||
in your `rules.mk`,
|
||||
|
||||
SRC += feature_cdeq.c
|
||||
|
||||
### examples
|
||||
|
||||
- atreus:datagrok
|
||||
- bm43a:datagrok
|
||||
- mitosis:datagrok
|
||||
|
||||
## base layer selector
|
||||
|
||||
Defines a keycode `KF_LAYO` to rotate between available default layers.
|
||||
|
||||
`Shift`+`KF_LAYO` makes the currently selected one persistent across reboots.
|
||||
|
||||
This is useful if you'd like your keyboard to support and toggle between QWERTY, Dvorak, Colemak, Workman, and other layouts while keeping a common arrangement of modifier and function keys.
|
||||
|
||||
Since toggling layouts seems like something one does infrequently, I wanted to be able to operate this feature with a single key, instead of one for each layer like planck:default or bootmagic.
|
||||
|
||||
### setup
|
||||
|
||||
in your `keymap.c`:
|
||||
|
||||
#define KF_LAYO SAFE_RANGE
|
||||
#include "feature_default_layers_selector.h"
|
||||
const uint8_t highest_base_layer = 4;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return \
|
||||
process_record_save_default_layer(keycode, record) && \
|
||||
process_record_select_default_layer(keycode, record);
|
||||
}
|
||||
|
||||
in your `rules.mk`,
|
||||
|
||||
SRC += feature_default_layers_selector.c
|
||||
|
||||
### examples
|
||||
|
||||
- atreus:datagrok
|
||||
- bm43a:datagrok
|
||||
- mitosis:datagrok
|
||||
47
users/datagrok/feature_cdeq.c
Normal file
47
users/datagrok/feature_cdeq.c
Normal file
@@ -0,0 +1,47 @@
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclamation
|
||||
// mark> on <shift-period>, when using an operating system configured for a
|
||||
// US/qwerty layout.
|
||||
//
|
||||
// cdeq = "comma dot exclamation question"
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
bool comm_shifted = false;
|
||||
bool ques_shifted = false;
|
||||
|
||||
bool process_record_cdeq(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t shifted;
|
||||
uint16_t s_keycode;
|
||||
bool *k_shifted;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_COMM:
|
||||
s_keycode = KC_SLSH;
|
||||
k_shifted = &comm_shifted;
|
||||
break;
|
||||
case KC_DOT:
|
||||
s_keycode = KC_1;
|
||||
k_shifted = &ques_shifted;
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
|
||||
// Keydown. If shift is currently pressed, register its alternate keycode.
|
||||
if (record->event.pressed && shifted) {
|
||||
*k_shifted = true;
|
||||
register_code(s_keycode);
|
||||
return false;
|
||||
// Keyup. If shift was pressed back when the key was pressed, unregister
|
||||
// its alternate keycode.
|
||||
} else if (!(record->event.pressed) && *k_shifted) {
|
||||
*k_shifted = false;
|
||||
unregister_code(s_keycode);
|
||||
return false;
|
||||
// Otherwise, behave as normal.
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
2
users/datagrok/feature_cdeq.h
Normal file
2
users/datagrok/feature_cdeq.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
bool process_record_cdeq(uint16_t keycode, keyrecord_t *record);
|
||||
46
users/datagrok/feature_default_layers_selector.c
Normal file
46
users/datagrok/feature_default_layers_selector.c
Normal file
@@ -0,0 +1,46 @@
|
||||
#include "feature_default_layers_selector.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#ifdef DEFAULT_LAYER_SONGS
|
||||
extern float default_layer_songs[][16][2];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
#if defined(AUDIO_ENABLE)
|
||||
float saved_song[][2] = SONG(COIN_SOUND);
|
||||
#endif
|
||||
|
||||
if (!(keycode == KF_LAYO
|
||||
&& record->event.pressed
|
||||
&& get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
eeconfig_update_default_layer(default_layer_state);
|
||||
#if defined(AUDIO_ENABLE)
|
||||
PLAY_SONG(saved_song);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!(keycode == KF_LAYO
|
||||
&& record->event.pressed)) {
|
||||
return true;
|
||||
}
|
||||
if (!default_layer_state) {
|
||||
default_layer_set(2);
|
||||
} else {
|
||||
default_layer_set(
|
||||
(((1U<<(highest_base_layer+1))-1) & (default_layer_state<<1))
|
||||
| (default_layer_state>>highest_base_layer));
|
||||
}
|
||||
led_set(host_keyboard_leds());
|
||||
#if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS)
|
||||
PLAY_SONG(default_layer_songs[get_highest_layer(default_layer_state)]);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
69
users/datagrok/feature_default_layers_selector.h
Normal file
69
users/datagrok/feature_default_layers_selector.h
Normal file
@@ -0,0 +1,69 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/*
|
||||
Define a keycode KF_LAYO to rotate between available default layers.
|
||||
Shift+KF_LAYO makes the current one persistent.
|
||||
|
||||
To use:
|
||||
|
||||
in your keymap.c, define KF_LAYO so it does not conflict with anything else.
|
||||
then include this header and set highest_base_layer.
|
||||
|
||||
#define KF_LAYO SAFE_RANGE
|
||||
#include "feature_default_layers_selector.h"
|
||||
|
||||
const uint8_t highest_base_layer = 4; // the index
|
||||
|
||||
and in your rules.mk,
|
||||
|
||||
SRC += feature_default_layers_selector.c
|
||||
*/
|
||||
|
||||
/*
|
||||
See https://docs.qmk.fm/#/keymap for docs about layers including the concept
|
||||
of "base" or "default" layers.
|
||||
|
||||
This is broken into two functions so that:
|
||||
|
||||
- If you don't want to store the default layer state in eeprom, don't call
|
||||
process_record_save_default_layer.
|
||||
|
||||
- If you have your own mechanism for setting the default layer state (to one
|
||||
or multiple layers), do that instead of process_record_select_default_layer.
|
||||
|
||||
If you call both functions, call process_record_save_default_layer first.
|
||||
|
||||
The QMK docs seem to assume that you will have only one layer as your
|
||||
default layer at any time, but the source code actually supports an arbitrary
|
||||
default_layer_state (composition of layers)
|
||||
|
||||
quantum has "set_single_persistent_default_layer" but that writes to eeprom
|
||||
every time you change your default layer preference. i wanted a behavior
|
||||
instead which lets you switch default layers all you want, then store the
|
||||
current configuration once you're happy with it. that way if you get into an
|
||||
unusable state you can just unplug and replug your keyboard to escape from it.
|
||||
|
||||
this code assumes:
|
||||
|
||||
1. each default layer state that you would select among consists of a single
|
||||
layer, which we will call a "base" layer.
|
||||
|
||||
2. all your "base" layers are stored contiguously at the bottom of your
|
||||
keymaps[] stack, and there are no non-"base" layers mixed in.
|
||||
|
||||
3. you have a maximum of 8 "base" layers. that is, the highest base layer is
|
||||
index 7.
|
||||
|
||||
while 16 and 32 bit platforms might allow default_layer_state to include more
|
||||
and higher-numbered layers, eeconfig_update_default_layer saves only the first
|
||||
8 bits of default_layer_state to eeprom.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef KF_LAYO
|
||||
#define KF_LAYO SAFE_RANGE
|
||||
#endif
|
||||
|
||||
const uint8_t highest_base_layer;
|
||||
bool process_record_save_default_layer(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_select_default_layer(uint16_t keycode, keyrecord_t *record);
|
||||
Reference in New Issue
Block a user