diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b91e707e..ba5b56aa4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,4 +14,4 @@ "*.hpp": "cpp", "xstddef": "c" } -} \ No newline at end of file +} diff --git a/build_keyboard.mk b/build_keyboard.mk index 4781f4a5d..b25712385 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -210,8 +210,8 @@ endif USER_PATH := users/$(USER_NAME) -include $(USER_PATH)/rules.mk -ifneq ("$(wildcard users/$(KEYMAP)/config.h)","") - CONFIG_H += users/$(KEYMAP)/config.h +ifneq ("$(wildcard $(USER_PATH)/config.h)","") + CONFIG_H += $(USER_PATH)/config.h endif diff --git a/common_features.mk b/common_features.mk index 7ba7d4815..0778f8e0f 100644 --- a/common_features.mk +++ b/common_features.mk @@ -117,7 +117,7 @@ endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) OPT_DEFS += -DRGB_MATRIX_ENABLE SRC += is31fl3731.c - SRC += TWIlib.c + SRC += i2c_master.c SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgb_matrix.c CIE1931_CURVE = yes diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 000000000..e089843e0 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.qmk.fm \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index a4db81eb6..22ab243cd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,7 +19,7 @@ Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk ## How to Compile -Before you are able to compile, you'll need to [install an environment](01_Getting_Started/01_Install_Build_Tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: +Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: make planck/rev4:default @@ -29,4 +29,4 @@ This would build the `rev4` revision of the `planck` with the `default` keymap. ## How to Customize -QMK has lots of [features](05_Features/index.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](07_Reference/Keymap_Overview.md), and changing the [keycodes](06_Keycodes/index.md). +QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 00aeb8057..31a22315d 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -43,6 +43,7 @@ * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) * [Space Cadet Shift](feature_space_cadet.md) * [Space Cadet Shift Enter](feature_space_shift_cadet.md) * [Stenography](feature_stenography.md) diff --git a/docs/contributing.md b/docs/contributing.md index 0e8066f00..17a9aa985 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -101,7 +101,7 @@ You'll find all our documentation in the `qmk_firmware/docs` directory, or if yo Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. -* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#). +* Write a `readme.md` using [the template](documentation_templates.md). * All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself * Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap. * Do not include `Makefile`s in your keymap folder (they're no longer used) @@ -113,7 +113,7 @@ Keyboards are the raison d'être for QMK. Some keyboards are community maintaine We also ask that you follow these guidelines: -* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#). +* Write a `readme.md` using [the template](documentation_templates.md). * Keep the number of commits reasonable or we will squash your PR * Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard. * Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards///.[ch]` @@ -140,7 +140,7 @@ We also ask that you follow these guidelines: * Keep the number of commits reasonable or we will squash your PR * Do not lump keyboards or keymaps in with core changes. Submit your core changes first. -* Write [Unit Tests](http://docs.qmk.fm/unit_testing.html) for your feature +* Write [Unit Tests](unit_testing.md) for your feature * Follow the style of the file you are editing. If the style is unclear or there are mixed styles you should conform to the [coding conventions](#coding-conventions) above. ## Refactoring diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md index fb74bf7c8..46633b287 100644 --- a/docs/feature_leader_key.md +++ b/docs/feature_leader_key.md @@ -17,14 +17,16 @@ void matrix_scan_user(void) { leader_end(); SEQ_ONE_KEY(KC_F) { - register_code(KC_S); - unregister_code(KC_S); + // Anything you can do in a macro. + SEND_STRING("QMK is awesome."); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LCTRL("a")SS_LCTRL("c")); + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); } SEQ_TWO_KEYS(KC_A, KC_S) { - register_code(KC_H); - unregister_code(KC_H); - } - SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { register_code(KC_LGUI); register_code(KC_S); unregister_code(KC_S); @@ -34,4 +36,6 @@ void matrix_scan_user(void) { } ``` -As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. +As you can see, you have a few function. You can use `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS`, `SEQ_THREE_KEYS` up to `SEQ_FIVE_KEYS` for longer sequences. + +Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 0f1e649ef..5369d2fb7 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -88,11 +88,36 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are: ```c -rgblight_disable(); // turn all lights off -rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM) +// turn all lights off (stored in EEPROM) +rgblight_disable(); +// turn lights on, based on their previous state (stored in EEPROM) +rgblight_enable(); + +// turn all lights off (not stored in EEPROM) +rgblight_disable_noeeprom(); +// turn lights on, based on their previous state (not stored in EEPROM) +rgblight_enable_noeeprom(); + +// where r/g/b is a number from 0..255. Turns all the LEDs to this color (ignores mode, not stored in EEPROM). +rgblight_setrgb(r, g, b); +// HSV color control - h is a value from 0..360 and s/v is a value from 0..255 (stored in EEPROM) +rgblight_sethsv(h, s, v); +// HSV color control - h is a value from 0..360 and s/v is a value from 0..255 (not stored in EEPROM) +rgblight_sethsv_noeeprom(h, s, v); + +// Sets the mode, if rgb animations are enabled (stored in eeprom) +rgblight_mode(x); +// Sets the mode, if rgb animations are enabled (not stored in eeprom) +rgblight_mode_noeeprom(x); +// MODE 1, solid color +// MODE 2-5, breathing +// MODE 6-8, rainbow mood +// MODE 9-14, rainbow swirl +// MODE 15-20, snake +// MODE 21-23, knight +// MODE 24, xmas +// MODE 25-34, static rainbow -rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color -rgblight_sethsv(h, s, v); // HSV color control - h is a value from 0..360 and s/v is a value from 0..255 rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM ``` @@ -126,7 +151,7 @@ note: for backwards compatibility, `RGB_SMOD` is an alias for `RGB_MOD`. ## Hardware Modification -![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) +![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/3774a7fcdab5544fc787f4c200be05fcd417e31f/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 141c3108d..99298fbda 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -6,9 +6,9 @@ Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a co With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. -To make it clear how this is different from `ACTION_FUNCTION_TAP`, lets explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. +To make it clear how this is different from `ACTION_FUNCTION_TAP`, let's explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. -With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be send first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. +With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time. @@ -16,11 +16,13 @@ But lets start with how to use it, first! First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. -This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options: +This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. +* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode). * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. -* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. +* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets. +* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. diff --git a/docs/features.md b/docs/features.md index 5abede2c2..4dee486ef 100644 --- a/docs/features.md +++ b/docs/features.md @@ -17,8 +17,10 @@ QMK has a staggering number of features for building your keyboard. It can take * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. +* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting. * [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets. * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. +* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage. * [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want. * [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard. * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 636b54672..45b51b2cc 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -4,6 +4,8 @@ This page describes setting up the build environment for QMK. These instructions +Note: If it is your first time here, Check out the "Complete Newbs guide" instead + ## Linux To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** diff --git a/docs/index.html b/docs/index.html index 6af276c85..f0b1fae07 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,6 +8,7 @@ +
diff --git a/docs/keycodes.md b/docs/keycodes.md index dad645cf0..9a5f6e2b3 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -284,6 +284,22 @@ This is a reference only. Each group of keys links to the page documenting their |`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | |`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | +## [RGB Matrix Lighting](feature_rgb_matrix.md) + +|Key |Aliases |Description | +|-------------------|----------|--------------------------------------------------------------------| +|`RGB_TOG` | |Toggle RGB lighting on or off | +|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | +|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| +|`RGB_HUI` | |Increase hue | +|`RGB_HUD` | |Decrease hue | +|`RGB_SAI` | |Increase saturation | +|`RGB_SAD` | |Decrease saturation | +|`RGB_VAI` | |Increase value (brightness) | +|`RGB_VAD` | |Decrease value (brightness) | +|`RGB_SPI` | |Increase effect speed (does no support eeprom yet) | +|`RGB_SPD` | |Decrease effect speed (does no support eeprom yet) | + ## [Thermal Printer](feature_thermal_printer.md) |Key |Description | diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 162d7066b..218154285 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -2,7 +2,7 @@ Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard. -QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules. +QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules. # Getting Started @@ -12,13 +12,19 @@ Before you can build keymaps you need to install some software and setup your bu ### Text Editor -You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text. +You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS be careful with TextEdit.app, it will not save plain text files unless you make sure to select "Make Plain text" from the "Format" menu, or you can use another program such as Sublime Text. ?> Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject. ### QMK Toolbox -QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print. +QMK Toolbox is an optional graphical Windows and macOS program that allows you to both program and debug your custom keyboard. You will likely prefer it to easily flash your keyboard and receive the debugging messages that your keyboard will print. + +Download the files from the links below: + +For Windows: "qmk_toolbox.exe" or "qmk_toolbox_install.exe" (with installer) + +For Mac: "QMK.Toolbox.app.zip" or "QMK.Toolbox.pkg" (with installer) * [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest) * [Source Code](https://github.com/qmk/qmk_toolbox/) @@ -43,6 +49,8 @@ You will need to install msys2 and git. You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh +After homebrew is installed continue with "Download QMK", following step "Setup QMK" runs a script that will install other packages. + ### Linux You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it: diff --git a/docs/sidebar.css b/docs/sidebar.css new file mode 100644 index 000000000..b1049ea68 --- /dev/null +++ b/docs/sidebar.css @@ -0,0 +1,10 @@ +.sidebar-toggle { + position: absolute; + top: 0; + bottom: auto; + left: 0; +} + +.search { + margin-top: 40px; +} diff --git a/drivers/avr/TWIlib.c b/drivers/avr/TWIlib.c deleted file mode 100644 index b39e3054a..000000000 --- a/drivers/avr/TWIlib.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * TWIlib.c - * - * Created: 6/01/2014 10:41:33 PM - * Author: Chris Herring - * http://www.chrisherring.net/all/tutorial-interrupt-driven-twi-interface-for-avr-part1/ - */ - -#include -#include -#include "TWIlib.h" -#include "util/delay.h" - -void TWIInit() -{ - TWIInfo.mode = Ready; - TWIInfo.errorCode = 0xFF; - TWIInfo.repStart = 0; - // Set pre-scalers (no pre-scaling) - TWSR = 0; - // Set bit rate - TWBR = ((F_CPU / TWI_FREQ) - 16) / 2; - // Enable TWI and interrupt - TWCR = (1 << TWIE) | (1 << TWEN); -} - -uint8_t isTWIReady() -{ - if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) ) - { - return 1; - } - else - { - return 0; - } -} - -uint8_t TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart) -{ - if (dataLen <= TXMAXBUFLEN) - { - // Wait until ready - while (!isTWIReady()) {_delay_us(1);} - // Set repeated start mode - TWIInfo.repStart = repStart; - // Copy data into the transmit buffer - uint8_t *data = (uint8_t *)TXdata; - for (int i = 0; i < dataLen; i++) - { - TWITransmitBuffer[i] = data[i]; - } - // Copy transmit info to global variables - TXBuffLen = dataLen; - TXBuffIndex = 0; - - // If a repeated start has been sent, then devices are already listening for an address - // and another start does not need to be sent. - if (TWIInfo.mode == RepeatedStartSent) - { - TWIInfo.mode = Initializing; - TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer - TWISendTransmit(); // Send the data - } - else // Otherwise, just send the normal start signal to begin transmission. - { - TWIInfo.mode = Initializing; - TWISendStart(); - } - - } - else - { - return 1; // return an error if data length is longer than buffer - } - return 0; -} - -uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart) -{ - // Check if number of bytes to read can fit in the RXbuffer - if (bytesToRead < RXMAXBUFLEN) - { - // Reset buffer index and set RXBuffLen to the number of bytes to read - RXBuffIndex = 0; - RXBuffLen = bytesToRead; - // Create the one value array for the address to be transmitted - uint8_t TXdata[1]; - // Shift the address and AND a 1 into the read write bit (set to write mode) - TXdata[0] = (TWIaddr << 1) | 0x01; - // Use the TWITransmitData function to initialize the transfer and address the slave - TWITransmitData(TXdata, 1, repStart); - } - else - { - return 0; - } - return 1; -} - -ISR (TWI_vect) -{ - switch (TWI_STATUS) - { - // ----\/ ---- MASTER TRANSMITTER OR WRITING ADDRESS ----\/ ---- // - case TWI_MT_SLAW_ACK: // SLA+W transmitted and ACK received - // Set mode to Master Transmitter - TWIInfo.mode = MasterTransmitter; - case TWI_START_SENT: // Start condition has been transmitted - case TWI_MT_DATA_ACK: // Data byte has been transmitted, ACK received - if (TXBuffIndex < TXBuffLen) // If there is more data to send - { - TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - TWISendTransmit(); // Send the data - } - // This transmission is complete however do not release bus yet - else if (TWIInfo.repStart) - { - TWIInfo.errorCode = 0xFF; - TWISendStart(); - } - // All transmissions are complete, exit - else - { - TWIInfo.mode = Ready; - TWIInfo.errorCode = 0xFF; - TWISendStop(); - } - break; - - // ----\/ ---- MASTER RECEIVER ----\/ ---- // - - case TWI_MR_SLAR_ACK: // SLA+R has been transmitted, ACK has been received - // Switch to Master Receiver mode - TWIInfo.mode = MasterReceiver; - // If there is more than one byte to be read, receive data byte and return an ACK - if (RXBuffIndex < RXBuffLen-1) - { - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - TWISendACK(); - } - // Otherwise when a data byte (the only data byte) is received, return NACK - else - { - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - TWISendNACK(); - } - break; - - case TWI_MR_DATA_ACK: // Data has been received, ACK has been transmitted. - - /// -- HANDLE DATA BYTE --- /// - TWIReceiveBuffer[RXBuffIndex++] = TWDR; - // If there is more than one byte to be read, receive data byte and return an ACK - if (RXBuffIndex < RXBuffLen-1) - { - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - TWISendACK(); - } - // Otherwise when a data byte (the only data byte) is received, return NACK - else - { - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - TWISendNACK(); - } - break; - - case TWI_MR_DATA_NACK: // Data byte has been received, NACK has been transmitted. End of transmission. - - /// -- HANDLE DATA BYTE --- /// - TWIReceiveBuffer[RXBuffIndex++] = TWDR; - // This transmission is complete however do not release bus yet - if (TWIInfo.repStart) - { - TWIInfo.errorCode = 0xFF; - TWISendStart(); - } - // All transmissions are complete, exit - else - { - TWIInfo.mode = Ready; - TWIInfo.errorCode = 0xFF; - TWISendStop(); - } - break; - - // ----\/ ---- MT and MR common ----\/ ---- // - - case TWI_MR_SLAR_NACK: // SLA+R transmitted, NACK received - case TWI_MT_SLAW_NACK: // SLA+W transmitted, NACK received - case TWI_MT_DATA_NACK: // Data byte has been transmitted, NACK received - case TWI_LOST_ARBIT: // Arbitration has been lost - // Return error and send stop and set mode to ready - if (TWIInfo.repStart) - { - TWIInfo.errorCode = TWI_STATUS; - TWISendStart(); - } - // All transmissions are complete, exit - else - { - TWIInfo.mode = Ready; - TWIInfo.errorCode = TWI_STATUS; - TWISendStop(); - } - break; - case TWI_REP_START_SENT: // Repeated start has been transmitted - // Set the mode but DO NOT clear TWINT as the next data is not yet ready - TWIInfo.mode = RepeatedStartSent; - break; - - // ----\/ ---- SLAVE RECEIVER ----\/ ---- // - - // TODO IMPLEMENT SLAVE RECEIVER FUNCTIONALITY - - // ----\/ ---- SLAVE TRANSMITTER ----\/ ---- // - - // TODO IMPLEMENT SLAVE TRANSMITTER FUNCTIONALITY - - // ----\/ ---- MISCELLANEOUS STATES ----\/ ---- // - case TWI_NO_RELEVANT_INFO: // It is not really possible to get into this ISR on this condition - // Rather, it is there to be manually set between operations - break; - case TWI_ILLEGAL_START_STOP: // Illegal START/STOP, abort and return error - TWIInfo.errorCode = TWI_ILLEGAL_START_STOP; - TWIInfo.mode = Ready; - TWISendStop(); - break; - } - -} diff --git a/drivers/avr/TWIlib.h b/drivers/avr/TWIlib.h deleted file mode 100644 index 23fd1f09a..000000000 --- a/drivers/avr/TWIlib.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * TWIlib.h - * - * Created: 6/01/2014 10:38:42 PM - * Author: Chris Herring - * http://www.chrisherring.net/all/tutorial-interrupt-driven-twi-interface-for-avr-part1/ - */ - - -#ifndef TWILIB_H_ -#define TWILIB_H_ -// TWI bit rate (was 100000) -#define TWI_FREQ 400000 -// Get TWI status -#define TWI_STATUS (TWSR & 0xF8) -// Transmit buffer length -#define TXMAXBUFLEN 20 -// Receive buffer length -#define RXMAXBUFLEN 20 -// Global transmit buffer -uint8_t TWITransmitBuffer[TXMAXBUFLEN]; -// Global receive buffer -volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; -// Buffer indexes -volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. -int RXBuffIndex; // Current index in the receive buffer -// Buffer lengths -int TXBuffLen; // The total length of the transmit buffer -int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) - -typedef enum { - Ready, - Initializing, - RepeatedStartSent, - MasterTransmitter, - MasterReceiver, - SlaceTransmitter, - SlaveReciever - } TWIMode; - - typedef struct TWIInfoStruct{ - TWIMode mode; - uint8_t errorCode; - uint8_t repStart; - }TWIInfoStruct; -TWIInfoStruct TWIInfo; - - -// TWI Status Codes -#define TWI_START_SENT 0x08 // Start sent -#define TWI_REP_START_SENT 0x10 // Repeated Start sent -// Master Transmitter Mode -#define TWI_MT_SLAW_ACK 0x18 // SLA+W sent and ACK received -#define TWI_MT_SLAW_NACK 0x20 // SLA+W sent and NACK received -#define TWI_MT_DATA_ACK 0x28 // DATA sent and ACK received -#define TWI_MT_DATA_NACK 0x30 // DATA sent and NACK received -// Master Receiver Mode -#define TWI_MR_SLAR_ACK 0x40 // SLA+R sent, ACK received -#define TWI_MR_SLAR_NACK 0x48 // SLA+R sent, NACK received -#define TWI_MR_DATA_ACK 0x50 // Data received, ACK returned -#define TWI_MR_DATA_NACK 0x58 // Data received, NACK returned - -// Miscellaneous States -#define TWI_LOST_ARBIT 0x38 // Arbitration has been lost -#define TWI_NO_RELEVANT_INFO 0xF8 // No relevant information available -#define TWI_ILLEGAL_START_STOP 0x00 // Illegal START or STOP condition has been detected -#define TWI_SUCCESS 0xFF // Successful transfer, this state is impossible from TWSR as bit2 is 0 and read only - - -#define TWISendStart() (TWCR = (1< +#include + +#include "i2c_master.h" + +#define F_SCL 400000UL // SCL frequency +#define Prescaler 1 +#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2) + +void i2c_init(void) +{ + TWBR = (uint8_t)TWBR_val; +} + +uint8_t i2c_start(uint8_t address) +{ + // reset TWI control register + TWCR = 0; + // transmit START condition + TWCR = (1< #include #include -#include "TWIlib.h" +#include "i2c_master.h" #include "progmem.h" // This is a 7-bit address, that gets left-shifted and bit 0 @@ -50,7 +50,7 @@ #define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' // Transfer buffer for TWITransmitData() -uint8_t g_twi_transfer_buffer[TXMAXBUFLEN]; +uint8_t g_twi_transfer_buffer[20]; // These buffers match the IS31FL3731 PWM registers 0x24-0xB3. // Storing them like this is optimal for I2C transfers to the registers. @@ -80,17 +80,11 @@ bool g_led_control_registers_update_required = false; void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ) { - g_twi_transfer_buffer[0] = (addr << 1) | 0x00; - g_twi_transfer_buffer[1] = reg; - g_twi_transfer_buffer[2] = data; + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; - // Set the error code to have no relevant information - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - // Continuously attempt to transmit data until a successful transmission occurs - //while ( TWIInfo.errorCode != 0xFF ) - //{ - TWITransmitData( g_twi_transfer_buffer, 3, 0 ); - //} + //Transmit data until succesful + while(i2c_transmit(addr << 1, g_twi_transfer_buffer,2) != 0); } void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) @@ -100,29 +94,21 @@ void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) // transmit PWM registers in 9 transfers of 16 bytes // g_twi_transfer_buffer[] is 20 bytes - // set the I2C address - g_twi_transfer_buffer[0] = (addr << 1) | 0x00; - // iterate over the pwm_buffer contents at 16 byte intervals for ( int i = 0; i < 144; i += 16 ) { // set the first register, e.g. 0x24, 0x34, 0x44, etc. - g_twi_transfer_buffer[1] = 0x24 + i; + g_twi_transfer_buffer[0] = 0x24 + i; // copy the data from i to i+15 // device will auto-increment register for data after the first byte // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer for ( int j = 0; j < 16; j++ ) { - g_twi_transfer_buffer[2 + j] = pwm_buffer[i + j]; + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; } - // Set the error code to have no relevant information - TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; - // Continuously attempt to transmit data until a successful transmission occurs - while ( TWIInfo.errorCode != 0xFF ) - { - TWITransmitData( g_twi_transfer_buffer, 16 + 2, 0 ); - } + //Transmit buffer until succesful + while(i2c_transmit(addr << 1, g_twi_transfer_buffer,17) != 0); } } diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h index 969fd5b4a..6905fd220 100644 --- a/keyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1up60rgb/1up60rgb.h @@ -63,4 +63,19 @@ K400, K401, K403, K406, K410, K411, K413, K414 \ ) +/* HHKB Variant */ +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K403, K406, K411, K413 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ + K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \ +) + #endif diff --git a/keyboards/1up60rgb/info.json b/keyboards/1up60rgb/info.json index d662dc60d..67f94b7fe 100644 --- a/keyboards/1up60rgb/info.json +++ b/keyboards/1up60rgb/info.json @@ -19,6 +19,9 @@ "LAYOUT_60_ansi_split_bs_rshift": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] } } } diff --git a/keyboards/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk index 7363b3c3d..540e4ea96 100644 --- a/keyboards/1up60rgb/rules.mk +++ b/keyboards/1up60rgb/rules.mk @@ -55,4 +55,4 @@ BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= yes -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb diff --git a/keyboards/6ball/6ball.h b/keyboards/6ball/6ball.h index 34fcc4e6a..234235341 100644 --- a/keyboards/6ball/6ball.h +++ b/keyboards/6ball/6ball.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k01, k02, k03, \ k04, k05, k06 \ ) \ @@ -11,6 +11,4 @@ { k02, k03, k06, k05, k04, k01 } \ } -#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06) - #endif diff --git a/keyboards/6ball/keymaps/default/keymap.c b/keyboards/6ball/keymaps/default/keymap.c index f93587ffc..5081161e3 100644 --- a/keyboards/6ball/keymaps/default/keymap.c +++ b/keyboards/6ball/keymaps/default/keymap.c @@ -1,28 +1,22 @@ -#include "6ball.h" +#include QMK_KEYBOARD_H #define _MAIN 0 #define _FN 1 -#define KC_ KC_TRNS - #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen #define KC_X0 LT(_FN, KC_ESC) -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAIN] = KC_KEYMAP( - F , X0 ,LCTL, - R , D , M + [_MAIN] = LAYOUT( + KC_F, KC_X0, KC_LCTL, + KC_R, KC_D, KC_M ), - [_FN] = KC_KEYMAP( - F , ,RHUI, - RTOG,RMOD,RHUD + [_FN] = LAYOUT( + KC_F, KC_TRNS, RGB_HUI, + RGB_TOG, RGB_MOD, RGB_HUD ) }; diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h index f1cb30628..b60dc53c0 100644 --- a/keyboards/9key/9key.h +++ b/keyboards/9key/9key.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, \ k10, k11, k12, \ k20, k21, k22 \ diff --git a/keyboards/9key/info.json b/keyboards/9key/info.json new file mode 100644 index 000000000..cadfdbc4c --- /dev/null +++ b/keyboards/9key/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "9key", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}] + } + } +} diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c index 65f0cdd20..9f6397169 100644 --- a/keyboards/9key/keymaps/default/keymap.c +++ b/keyboards/9key/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "9key.h" +#include QMK_KEYBOARD_H // Tap Dance Declarations enum { @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN * `-----------------------' */ -[0] = KEYMAP( \ +[0] = LAYOUT( \ KC_1, KC_2, KC_3, \ KC_4, TD(ENT_5), KC_6, \ TD(ZERO_7), KC_8, LT(1, KC_9) \ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 00 | . | | * `-----------------------' */ -[1] = KEYMAP( \ +[1] = LAYOUT( \ KC_ESC, KC_PLUS, KC_MINS, \ KC_BSPC, KC_ASTR, KC_SLSH, \ M(DBL_0), KC_DOT, KC_TRNS \ diff --git a/keyboards/acr60/acr60.h b/keyboards/acr60/acr60.h index 49defe00f..9a2d59f63 100644 --- a/keyboards/acr60/acr60.h +++ b/keyboards/acr60/acr60.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -17,7 +17,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -31,7 +31,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO } \ } -#define KEYMAP_TRUE_HHKB( \ +#define LAYOUT_true_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -45,7 +45,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ } -#define KEYMAP_2_SHIFTS( \ +#define LAYOUT_2_shifts( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -59,7 +59,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_DIRECTIONAL( \ +#define LAYOUT_directional( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -90,7 +90,7 @@ * | K400 | K401 | K403 | K404 | K406 | K408 | K410 | K411 | K413 | K414 | * `-----------------------------------------------------------------------------------------' */ -#define MITCHSPLIT( \ +#define LAYOUT_mitchsplit( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ diff --git a/keyboards/acr60/info.json b/keyboards/acr60/info.json new file mode 100644 index 000000000..660c35799 --- /dev/null +++ b/keyboards/acr60/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "ACR60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":7}, {"label":"K411", "x":11, "y":4, "w":1.5}, {"label":"K413", "x":12.5, "y":4}] + }, + "LAYOUT_true_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":6}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K411", "x":11.5, "y":4}] + }, + "LAYOUT_2_shifts": { + "key_count": 68, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3}, {"label":"K301", "x":1, "y":3}, {"label":"K302", "x":2, "y":3}, {"label":"K303", "x":3, "y":3}, {"label":"K304", "x":4, "y":3}, {"label":"K305", "x":5, "y":3}, {"label":"K306", "x":6, "y":3}, {"label":"K307", "x":7, "y":3}, {"label":"K308", "x":8, "y":3}, {"label":"K309", "x":9, "y":3}, {"label":"K310", "x":10, "y":3}, {"label":"K311", "x":11, "y":3}, {"label":"K312", "x":12, "y":3}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_directional": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K312", "x":11.25, "y":3, "w":1.75}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_mitchsplit": { + "key_count": 64, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K014", "x":13, "y":0, "w":2}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":2.25}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.75}, {"label":"K406", "x":6.5, "y":4, "w":1.25}, {"label":"K408", "x":7.75, "y":4, "w":2.25}, {"label":"K410", "x":10, "y":4, "w":1.25}, {"label":"K411", "x":11.25, "y":4, "w":1.25}, {"label":"K413", "x":12.5, "y":4, "w":1.25}, {"label":"K414", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index c9ea787dc..a07e0ddc5 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -12,21 +12,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * accent key set up on the 2nd layer, although on the first layer it includes grave key (tilde) when shift is held down, * via the function actions code at the bottom. */ - KEYMAP( + LAYOUT( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_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_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL), - KEYMAP( + LAYOUT( 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_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/acr60/keymaps/mitch/keymap.c b/keyboards/acr60/keymaps/mitch/keymap.c index 566b27359..b7fcb5a04 100644 --- a/keyboards/acr60/keymaps/mitch/keymap.c +++ b/keyboards/acr60/keymaps/mitch/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define _DFT 0 #define _NGUI 1 @@ -18,8 +18,9 @@ /* * This is Mitch's default ACR60 layout (also DZ60, on which the ACR60 is based). This is a * Mac-oriented layout, as noted by the GUI keys immediately next to the space bar area of the - * lower modifier row. This uses the MITCHSPLIT keymap as defined in arc60.h, which uses a - * 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for now). + * lower modifier row. This uses the LAYOUT_mitchsplit keymap as defined in arc60.h, which + * uses a 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for + * now). * * For me, this is a great place to start getting used to a split key setup and still mostly * sticking to a standard staggered 60% layout so my entire game isn't thrown off. @@ -62,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * Hit MO(_FN) and Alt in that order to lock into the _FN layer. */ - [_DFT] = MITCHSPLIT( /* Basic QWERTY */ + [_DFT] = LAYOUT_mitchsplit( /* Basic QWERTY */ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_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, \ MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -91,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * to the default layer. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_NGUI] = MITCHSPLIT( + [_NGUI] = LAYOUT_mitchsplit( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * To go to the _NGUI layer, Fn+comma, to go to _DFT from _NGUI, hit Fn+M. */ /* Layer 1: Functions, primary layer switching, media controls, directional */ - [_FN] = MITCHSPLIT( + [_FN] = LAYOUT_mitchsplit( 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_DEL, \ KC_CAPS, bbbbbb, bbbbbb, bbbbbb, bbbbbb, bbbbbb, KC_HOME, KC_PGUP, KC_UP , KC_PGDOWN,KC_END, bbbbbb, bbbbbb, bbbbbb, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, bbbbbb, bbbbbb, bbbbbb, KC_LEFT, KC_DOWN, KC_RIGHT, bbbbbb, bbbbbb, ______, \ @@ -159,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * something specific more quickly. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_SFX] = MITCHSPLIT( + [_SFX] = LAYOUT_mitchsplit( ______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_M_X, RGB_M_G,______, ______, ______, ______, ______, \ ______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ ______, RGB_TOG, RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index a7ac93421..4e8587435 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -55,7 +55,7 @@ along with this program. If not, see . { K70, K71, K72, K73, K74, K75, K76, K77 } \ } -#define LAYOUT_standard_60( \ +#define LAYOUT_60_ansi( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ diff --git a/keyboards/alps64/info.json b/keyboards/alps64/info.json index 41735cf7e..1f1af4f1f 100644 --- a/keyboards/alps64/info.json +++ b/keyboards/alps64/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, - "LAYOUT_standard_60": { + "LAYOUT_60_ansi": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 12f78952d..dd598379e 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -1,12 +1,13 @@ -#include "alps64.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - LAYOUT_kc( \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ - LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL), + /* 0: qwerty */ + LAYOUT_all( \ + 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_NUHS, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESC, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL + ), }; const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 621dc5a95..4f35faac2 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -64,3 +64,5 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA + +LAYOUTS = 60_ansi diff --git a/keyboards/alu84/alu84.h b/keyboards/alu84/alu84.h index 299b6a22b..c171e4c1d 100755 --- a/keyboards/alu84/alu84.h +++ b/keyboards/alu84/alu84.h @@ -22,7 +22,7 @@ -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ diff --git a/keyboards/alu84/info.json b/keyboards/alu84/info.json new file mode 100644 index 000000000..97f2b5fac --- /dev/null +++ b/keyboards/alu84/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ALU84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K100", "x":0, "y":1}, {"label":"K101", "x":1, "y":1}, {"label":"K102", "x":2, "y":1}, {"label":"K103", "x":3, "y":1}, {"label":"K104", "x":4, "y":1}, {"label":"K105", "x":5, "y":1}, {"label":"K106", "x":6, "y":1}, {"label":"K107", "x":7, "y":1}, {"label":"K108", "x":8, "y":1}, {"label":"K109", "x":9, "y":1}, {"label":"K110", "x":10, "y":1}, {"label":"K111", "x":11, "y":1}, {"label":"K112", "x":12, "y":1}, {"label":"K114", "x":13, "y":1, "w":2}, {"label":"K115", "x":15, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.5}, {"label":"K202", "x":1.5, "y":2}, {"label":"K203", "x":2.5, "y":2}, {"label":"K204", "x":3.5, "y":2}, {"label":"K205", "x":4.5, "y":2}, {"label":"K206", "x":5.5, "y":2}, {"label":"K207", "x":6.5, "y":2}, {"label":"K208", "x":7.5, "y":2}, {"label":"K209", "x":8.5, "y":2}, {"label":"K210", "x":9.5, "y":2}, {"label":"K211", "x":10.5, "y":2}, {"label":"K212", "x":11.5, "y":2}, {"label":"K213", "x":12.5, "y":2}, {"label":"K214", "x":13.5, "y":2, "w":1.5}, {"label":"K215", "x":15, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.75}, {"label":"K302", "x":1.75, "y":3}, {"label":"K303", "x":2.75, "y":3}, {"label":"K304", "x":3.75, "y":3}, {"label":"K305", "x":4.75, "y":3}, {"label":"K306", "x":5.75, "y":3}, {"label":"K307", "x":6.75, "y":3}, {"label":"K308", "x":7.75, "y":3}, {"label":"K309", "x":8.75, "y":3}, {"label":"K310", "x":9.75, "y":3}, {"label":"K311", "x":10.75, "y":3}, {"label":"K312", "x":11.75, "y":3}, {"label":"K313", "x":12.75, "y":3, "w":2.25}, {"label":"K315", "x":15, "y":3}, {"label":"K400", "x":0, "y":4, "w":2.25}, {"label":"K402", "x":2.25, "y":4}, {"label":"K403", "x":3.25, "y":4}, {"label":"K404", "x":4.25, "y":4}, {"label":"K405", "x":5.25, "y":4}, {"label":"K406", "x":6.25, "y":4}, {"label":"K407", "x":7.25, "y":4}, {"label":"K408", "x":8.25, "y":4}, {"label":"K409", "x":9.25, "y":4}, {"label":"K410", "x":10.25, "y":4}, {"label":"K411", "x":11.25, "y":4}, {"label":"K413", "x":12.25, "y":4, "w":1.75}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K500", "x":0, "y":5, "w":1.25}, {"label":"K501", "x":1.25, "y":5, "w":1.25}, {"label":"K503", "x":2.5, "y":5, "w":1.25}, {"label":"K506", "x":3.75, "y":5, "w":6.25}, {"label":"K510", "x":10, "y":5}, {"label":"K511", "x":11, "y":5}, {"label":"K512", "x":12, "y":5}, {"label":"K513", "x":13, "y":5}, {"label":"K514", "x":14, "y":5}, {"label":"K515", "x":15, "y":5}] + } + } +} diff --git a/keyboards/alu84/keymaps/default/keymap.c b/keyboards/alu84/keymaps/default/keymap.c index 31e640ec9..10dbe273a 100755 --- a/keyboards/alu84/keymaps/default/keymap.c +++ b/keyboards/alu84/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "alu84.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _BL 0 @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_BL] = KEYMAP( + [_BL] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER, 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, LCTL(LGUI(KC_N)), @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_FN1] = KEYMAP( + [_FN1] = LAYOUT( LALT(LGUI(KC_Q)), 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/keymaps/turbomech/keymap.c b/keyboards/alu84/keymaps/turbomech/keymap.c index 97b192a7b..b204a6865 100644 --- a/keyboards/alu84/keymaps/turbomech/keymap.c +++ b/keyboards/alu84/keymaps/turbomech/keymap.c @@ -15,7 +15,7 @@ */ -#include "alu84.h" +#include QMK_KEYBOARD_H #include "turbomech.h" #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' */ - [_QWERTY] = KEYMAP( + [_QWERTY] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER, 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, LCTL(LGUI(KC_N)), @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_FUNCTION] = KEYMAP( + [_FUNCTION] = LAYOUT( LALT(LGUI(KC_Q)), 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_RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/readme.md b/keyboards/alu84/readme.md index 9d23bff06..ab20c4138 100644 --- a/keyboards/alu84/readme.md +++ b/keyboards/alu84/readme.md @@ -5,10 +5,8 @@ ALU84 A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca). -Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) - -Hardware Supported: ALU84 - +Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) +Hardware Supported: ALU84 Hardware Availability: [MECHKEYS](https://mechkeys.ca) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/amj40/amj40.h b/keyboards/amj40/amj40.h index ab629cba7..613f3740f 100755 --- a/keyboards/amj40/amj40.h +++ b/keyboards/amj40/amj40.h @@ -17,7 +17,7 @@ * | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index e4607eae5..c81317b84 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -1,7 +1,7 @@ -#include "amj40.h" +#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. @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | * `-----------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ 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,\ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),BL_TOGG, BL_INC, BL_DEC, \ @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL, \ @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 41a128e2b..5055771ff 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -13,11 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "amj40.h" +#include QMK_KEYBOARD_H // Set the custom keymap -#undef KEYMAP -#define KEYMAP( \ +#undef LAYOUT +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( \ +[_COLEMAK] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( \ +[_DVORAK] = LAYOUT( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c index 62f4376f5..caf6700bc 100755 --- a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c @@ -1,8 +1,8 @@ -#include "amj40.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default Layer - [0] = KEYMAP( \ + [0] = LAYOUT( \ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, KC_ENT),\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),\ @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Number Layer - [1] = KEYMAP( \ + [1] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, MT(MOD_RSFT, KC_BSLS), \ @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Shifted Layer - [2] = KEYMAP( \ + [2] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,\ KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, \ @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Fkey Layer - [3] = KEYMAP( \ + [3] = LAYOUT( \ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET,\ KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Gaming Layer - [4] = KEYMAP( \ + [4] = LAYOUT( \ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,\ KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c index b36d6c61e..baddea72d 100644 --- a/keyboards/amj40/keymaps/myee/keymap.c +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -1,7 +1,7 @@ -#include "amj40.h" +#include QMK_KEYBOARD_H // Keymap myee // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -28,28 +28,28 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ F(2), 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, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \ ), - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \ _______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \ _______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \ ), - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/amj60/amj60.h b/keyboards/amj60/amj60.h index b6aa6b7d3..400f0691e 100644 --- a/keyboards/amj60/amj60.h +++ b/keyboards/amj60/amj60.h @@ -19,7 +19,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ 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, \ @@ -48,7 +48,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ANSI( \ +#define LAYOUT_60_ansi( \ 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, k2d, \ @@ -63,8 +63,6 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define LAYOUT_60_ansi KEYMAP_ANSI - /* AMJ60 HHKB matrix layout * ,------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 | @@ -79,7 +77,7 @@ * `------------------------------------------------------------' */ -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \ 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, k2d, \ @@ -107,7 +105,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO( \ +#define LAYOUT_iso( \ 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, \ @@ -135,7 +133,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO_SPLITRSHIFT( \ +#define LAYOUT_iso_splitrshift( \ 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, \ @@ -150,7 +148,7 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define KEYMAP_MAX( \ +#define LAYOUT_max( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ 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, k2d, \ diff --git a/keyboards/amj60/info.json b/keyboards/amj60/info.json new file mode 100644 index 000000000..dd6a7aef0 --- /dev/null +++ b/keyboards/amj60/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "AMJ60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.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}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3c", "x":12.25, "y":3, "w":1.75}, {"label":"k3d", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":2.25}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":2.75}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_hhkb": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":2.25}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.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}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":2.75}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso_splitrshift": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.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}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_max": { + "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":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"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}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c index 5c0b374fe..fd8e198f5 100644 --- a/keyboards/amj60/keymaps/default/keymap.c +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( KC_ESC, 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_GRV, \ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index ee6511f83..b5fd731dd 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is * `-----------------------------------------------------------' LEFT DWN RIGHT */ - [_DEF] = KEYMAP_ISO_SPLITRSHIFT( + [_DEF] = LAYOUT_iso_splitrshift( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ TABDUAL, 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, \ CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_ISO_SPLITRSHIFT( + [_SPC] = LAYOUT_iso_splitrshift( KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Pos1|PgDn|End | * `-----------------------------------------------------------' */ - [_TAB] = KEYMAP_ISO_SPLITRSHIFT( + [_TAB] = LAYOUT_iso_splitrshift( KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ @@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | |Alt |Left|Down|Right| * `-----------------------------------------------------------' */ - [_SFX] = KEYMAP_ISO_SPLITRSHIFT( + [_SFX] = LAYOUT_iso_splitrshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index 5c0b374fe..fd8e198f5 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( KC_ESC, 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_GRV, \ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h index ffba1c9b9..d9a051621 100644 --- a/keyboards/amjpad/amjpad.h +++ b/keyboards/amjpad/amjpad.h @@ -23,38 +23,40 @@ */ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, \ - k40, k41, k42, k43, \ - k50, k52 \ +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, XXX}, \ - {k40, k41, k42, k43}, \ - {k50, XXX, k52, XXX} \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, XXX}, \ + {k40, k41, k42, k43}, \ + {k50, XXX, k52, XXX} \ } -#define MAXKEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53\ + +#define LAYOUT_ortho_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {k50, k51, k52, k53} \ } + void matrix_init_user(void); void matrix_scan_user(void); diff --git a/keyboards/amjpad/info.json b/keyboards/amjpad/info.json index 3873d548f..dde839dd8 100644 --- a/keyboards/amjpad/info.json +++ b/keyboards/amjpad/info.json @@ -1,13 +1,17 @@ { - "keyboard_name": "AMJ Pad", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 4, - "height": 6, + "keyboard_name": "AMJ Pad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, "layouts": { "LAYOUT": { + "key_count": 21, "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}] + }, + "LAYOUT_all": { + "key_count": 24, + "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":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k33", "x":3, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}, {"label":"k53", "x":3, "y":5}] } } } diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 362afd107..1ec81e6db 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -33,13 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = KEYMAP( - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, LT(_FL,KC_PDOT)), + [_BL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, LT(_FL,KC_PDOT), KC_PENT \ + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -56,14 +57,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 |./FN| | * `-------------------' */ -[_FL] = KEYMAP( - - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, RESET, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, LT(_FL,KC_PDOT)), + [_FL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, RESET, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, LT(_FL,KC_PDOT), KC_PENT \ + ), }; enum function_id { diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c index 926a494a9..463a265de 100644 --- a/keyboards/amjpad/keymaps/max/keymap.c +++ b/keyboards/amjpad/keymaps/max/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -33,14 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = MAXKEYMAP( - - KC_ESC, KC_TAB, KC_MINS,KC_EQL, \ - KC_F1, KC_F2, KC_F3, KC_F4, \ - KC_P7, KC_P8, KC_P9, KC_PMNS, \ - KC_P4, KC_P5, KC_P6, KC_PENT, \ - KC_P1, KC_P2, KC_P3, KC_BSLS, \ - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + [_BL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_MINS,KC_EQL, \ + KC_F1, KC_F2, KC_F3, KC_F4, \ + KC_P7, KC_P8, KC_P9, KC_PMNS, \ + KC_P4, KC_P5, KC_P6, KC_PENT, \ + KC_P1, KC_P2, KC_P3, KC_BSLS, \ + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -57,14 +57,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 |./FN| | * `-------------------' */ -[_FL] = MAXKEYMAP( - - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, RESET, \ - KC_P4, KC_P5, KC_P6, KC_PENT, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + [_FL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, RESET, \ + KC_P4, KC_P5, KC_P6, KC_PENT, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), }; enum function_id { diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c index d3e4d9944..5245138bd 100644 --- a/keyboards/amjpad/keymaps/ortho_left/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -30,14 +30,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = MAXKEYMAP( - - KC_T, KC_G, KC_B, KC_SPACE,\ - KC_R, KC_F, KC_V, MO(1), \ - KC_E, KC_D, KC_C, KC_LGUI, \ - KC_W, KC_S, KC_X, KC_LALT, \ - KC_Q, KC_A, KC_Z, KC_LCTL, \ - KC_TAB, KC_ESC, KC_LSHIFT, MO(1)), + [_BL] = LAYOUT_ortho_6x4( + KC_T, KC_G, KC_B, KC_SPACE,\ + KC_R, KC_F, KC_V, MO(1), \ + KC_E, KC_D, KC_C, KC_LGUI, \ + KC_W, KC_S, KC_X, KC_LALT, \ + KC_Q, KC_A, KC_Z, KC_LCTL, \ + KC_TAB, KC_ESC, KC_LSHIFT, MO(1) + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -54,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Del|Shft| | * `-------------------' */ -[_FL] = MAXKEYMAP( - - KC_5, KC_F5, KC_F11, _______, \ - KC_4, KC_F4, KC_F10, _______, \ - KC_3, KC_F3, KC_F9, _______, \ - KC_2, KC_F2, KC_F8, _______, \ - KC_1, KC_F1, KC_F7, _______, \ - KC_GRV,KC_DEL, _______, _______), + [_FL] = LAYOUT_ortho_6x4( + KC_5, KC_F5, KC_F11, _______, \ + KC_4, KC_F4, KC_F10, _______, \ + KC_3, KC_F3, KC_F9, _______, \ + KC_2, KC_F2, KC_F8, _______, \ + KC_1, KC_F1, KC_F7, _______, \ + KC_GRV,KC_DEL, _______, _______ + ), }; diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c index 33e599abd..52e93524b 100644 --- a/keyboards/amjpad/keymaps/ortho_right/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -29,15 +29,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Rght| Ret| " |Bspc| * `-------------------' */ - -[_BL] = MAXKEYMAP( - - KC_SPACE, KC_N, KC_H, KC_Y, \ - MO(1), KC_M, KC_J, KC_U, \ - KC_LEFT, KC_COMM, KC_K, KC_I, \ - KC_DOWN, KC_DOT, KC_L, KC_O, \ - KC_UP, KC_SLASH, KC_SCLN, KC_P, \ - KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC), + [_BL] = LAYOUT_ortho_6x4( + KC_SPACE, KC_N, KC_H, KC_Y, \ + MO(1), KC_M, KC_J, KC_U, \ + KC_LEFT, KC_COMM, KC_K, KC_I, \ + KC_DOWN, KC_DOT, KC_L, KC_O, \ + KC_UP, KC_SLASH, KC_SCLN, KC_P, \ + KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -54,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Rght| Ret| \ | Del| * `-------------------' */ -[_FL] = MAXKEYMAP( - - _______, KC_F12, KC_F6, KC_6, \ - _______, _______, KC_MINS, KC_7, \ - _______, _______, KC_EQL, KC_8, \ - _______, _______, KC_LBRC, KC_9, \ - _______, _______, KC_RBRC, KC_0, \ - _______, _______, KC_BSLS, KC_DEL), + [_FL] = LAYOUT_ortho_6x4( + _______, KC_F12, KC_F6, KC_6, \ + _______, _______, KC_MINS, KC_7, \ + _______, _______, KC_EQL, KC_8, \ + _______, _______, KC_LBRC, KC_9, \ + _______, _______, KC_RBRC, KC_0, \ + _______, _______, KC_BSLS, KC_DEL + ), }; diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index dd5b2bbe0..f378a4ede 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -64,3 +64,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c index b987c433f..15343ab33 100644 --- a/keyboards/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H // These are all aliases for the function layers. #define _L0 0 @@ -9,25 +9,25 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_L0] = LAYOUT_ansi( +[_L0] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_L1), \ KC_LCTL, KC_LGUI, KC_LALT, TG(_L3), KC_SPC, KC_SPC, MO(_L2), KC_RALT, KC_APP, KC_RCTRL), \ -[_L2] = LAYOUT_ansi( +[_L2] = LAYOUT( _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_L1] = LAYOUT_ansi( +[_L1] = LAYOUT( 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_L3] = LAYOUT_ansi( +[_L3] = LAYOUT( _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c index 945e66ab7..a66961fba 100644 --- a/keyboards/atom47/keymaps/default/keymap.c +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -13,25 +13,25 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT_ansi( +[_MA] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), \ KC_LCTL, KC_LGUI, KC_LALT, MO(_PN), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTRL), \ -[_FN] = LAYOUT_ansi( +[_FN] = LAYOUT( _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_FN1] = LAYOUT_ansi( +[_FN1] = LAYOUT( 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_PN] = LAYOUT_ansi( +[_PN] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, \ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/atom47/keymaps/maartenwut/keymap.c index abe63a41e..33ed0936a 100644 --- a/keyboards/atom47/keymaps/maartenwut/keymap.c +++ b/keyboards/atom47/keymaps/maartenwut/keymap.c @@ -19,19 +19,19 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT_ansi( +[_MA] = LAYOUT( KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_RALT, KC_APP, KC_RCTRL), \ -[_LO] = LAYOUT_ansi( +[_LO] = LAYOUT( 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, CTRLZ, CTRLX, CTRLC, CTRLV, _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), \ -[_RA] = LAYOUT_ansi( +[_RA] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, \ KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, \ diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md index 1e96d42e9..66f599c6b 100644 --- a/keyboards/atom47/readme.md +++ b/keyboards/atom47/readme.md @@ -4,11 +4,11 @@ ## Support Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) -Hardware Supported: Atom47 rev3 +Hardware Supported: Atom47 rev2/rev3 Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) -## Features +## Features (rev3 and up) - QMK Firmware - 6 Underglow RGB leds - In-switch leds @@ -19,7 +19,7 @@ Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?t - CapsLock indicator ## Build -To build the default keymap, simply run `make atom47:default`. +To build the default keymap for the latest revision, simply run `make atom47:default`. Specifiy the revision like so: `make atom47/rev3:default`. See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/atom47/rev2/info.json b/keyboards/atom47/rev2/info.json index 219e0f271..3c45ca8d4 100644 --- a/keyboards/atom47/rev2/info.json +++ b/keyboards/atom47/rev2/info.json @@ -1,12 +1,11 @@ { "keyboard_name": "Atom47", - "url": "", - "maintainer": "qmk", - "bootloader": "", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", "width": 13, "height": 4, "layouts": { - "LAYOUT_ansi": { + "LAYOUT": { "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":12, "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}, {"x":11.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":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] } } diff --git a/keyboards/atom47/rev2/rev2.h b/keyboards/atom47/rev2/rev2.h index f0134511d..bfea34e06 100644 --- a/keyboards/atom47/rev2/rev2.h +++ b/keyboards/atom47/rev2/rev2.h @@ -6,7 +6,7 @@ // readability #define XXX KC_NO -#define LAYOUT_ansi( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, \ diff --git a/keyboards/atom47/rev1/config.h b/keyboards/atom47/rev3/config.h similarity index 94% rename from keyboards/atom47/rev1/config.h rename to keyboards/atom47/rev3/config.h index d21d8ce34..8a91e2990 100644 --- a/keyboards/atom47/rev1/config.h +++ b/keyboards/atom47/rev3/config.h @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#ifndef REV3_CONFIG_H +#define REV3_CONFIG_H #include "config_common.h" @@ -26,7 +26,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0003 #define MANUFACTURER Vortex #define PRODUCT Core -#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.1 +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.3 /* key matrix size */ #define MATRIX_ROWS 4 diff --git a/keyboards/atom47/rev1/info.json b/keyboards/atom47/rev3/info.json similarity index 92% rename from keyboards/atom47/rev1/info.json rename to keyboards/atom47/rev3/info.json index 219e0f271..3c45ca8d4 100644 --- a/keyboards/atom47/rev1/info.json +++ b/keyboards/atom47/rev3/info.json @@ -1,12 +1,11 @@ { "keyboard_name": "Atom47", - "url": "", - "maintainer": "qmk", - "bootloader": "", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", "width": 13, "height": 4, "layouts": { - "LAYOUT_ansi": { + "LAYOUT": { "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":12, "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}, {"x":11.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":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] } } diff --git a/keyboards/atom47/rev1/rev1.c b/keyboards/atom47/rev3/rev3.c similarity index 96% rename from keyboards/atom47/rev1/rev1.c rename to keyboards/atom47/rev3/rev3.c index 816b43b9a..2cd04fa76 100644 --- a/keyboards/atom47/rev1/rev1.c +++ b/keyboards/atom47/rev3/rev3.c @@ -1,4 +1,4 @@ -#include "rev1.h" +#include "rev3.h" #include "led.h" void matrix_init_kb(void) { diff --git a/keyboards/atom47/rev1/rev1.h b/keyboards/atom47/rev3/rev3.h similarity index 90% rename from keyboards/atom47/rev1/rev1.h rename to keyboards/atom47/rev3/rev3.h index f8329a784..ad875bb40 100644 --- a/keyboards/atom47/rev1/rev1.h +++ b/keyboards/atom47/rev3/rev3.h @@ -1,12 +1,12 @@ -#ifndef ATOM47_REV1_H -#define ATOM47_REV1_H +#ifndef ATOM47_REV3_H +#define ATOM47_REV3_H #include "quantum.h" // readability #define XXX KC_NO -#define LAYOUT_ansi( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ diff --git a/keyboards/atom47/rev1/rules.mk b/keyboards/atom47/rev3/rules.mk similarity index 100% rename from keyboards/atom47/rev1/rules.mk rename to keyboards/atom47/rev3/rules.mk diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk index bebdb98d6..5f3dbb668 100644 --- a/keyboards/atom47/rules.mk +++ b/keyboards/atom47/rules.mk @@ -62,5 +62,5 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -DEFAULT_FOLDER = atom47/rev2 +DEFAULT_FOLDER = atom47/rev3 diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json index 34933672f..73cff2509 100644 --- a/keyboards/atreus/info.json +++ b/keyboards/atreus/info.json @@ -1,13 +1,12 @@ { - "keyboard_name": "Atreus", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 12.5, - "height": 4.6, + "keyboard_name": "Atreus", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4.7, "layouts": { "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "h":1.5}, {"x":6.5, "y":3, "h":1.5}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}] + "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}] } } -} \ No newline at end of file +} diff --git a/keyboards/atreus62/info.json b/keyboards/atreus62/info.json index af2201d5c..5a7ed3754 100644 --- a/keyboards/atreus62/info.json +++ b/keyboards/atreus62/info.json @@ -2,11 +2,11 @@ "keyboard_name": "Atreus62", "url": "", "maintainer": "qmk", - "width": 14.5, - "height": 5, + "width": 15, + "height": 5.7, "layouts": { "LAYOUT": { - "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":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4, "h":1.5}, {"x":7.5, "y":4, "h":1.5}, {"x":8.5, "y":4}, {"x":9.5, "y":4}, {"x":10.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}] + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] } } -} \ No newline at end of file +} diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 8cf4bc9a1..378831737 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,16 +14,25 @@ CHANGELOG: 0.1 - Initial commit. Based off of Profet's default keymap. - 0.2 - Converted to a more Planck/Preonic keymap style file with + 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. + 0.3 - Moved location of media & volume keys. Added Print Screen, + Scroll Lock and Pause keys. Added a WOW gaming layer that + changes the location of Ctrl & Alt to the thumb keys. Added + readme. + 0.4 - After more useage, I realized that the ESC key was in the way + of my muscle memory (gee, thanks, Planck!) so I moved it to + the normal Caps Lock position, and moved Caps Lock to the same + position on the RAISE and LOWER layers. Added code to turn off + the Pro Micro LEDs after flashing. + 0.5 - Converted keymap to LAYOUT standard. TODO: * Make the layout more efficient, even if it means changing the RAISE and LOWER functionality. * Add legends in comments for each layer. Maybe. - * Add a gaming layer. */ @@ -58,54 +67,57 @@ enum atreus52_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases to make the keymap clearer. +#define CTL_ENT CTL_T(KC_ENT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DVORAK] = LAYOUT( /* dvorak */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + [_DVORAK] = LAYOUT ( /* dvorak */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_QWERTY] = LAYOUT( /* qwerty */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + [_QWERTY] = LAYOUT ( /* qwerty */ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_COLEMAK] = LAYOUT( /* colemak */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + [_COLEMAK] = LAYOUT ( /* colemak */ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_WOW] = LAYOUT( /* Dvorak with minor modifications for playing World of Warcraft */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT ), - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), - [_RAISE] = LAYOUT( + [_RAISE] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), - [_ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT ( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md new file mode 100644 index 000000000..cf00b65e3 --- /dev/null +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -0,0 +1,131 @@ +# Xyverz's Atreus62 Keymap + +## About this keymap: + +This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk. I've blatantly stolen what works for me from the Planck and Preonic layouts and modified this file to fit me. Initial credet goes to u/profet23 for the doing all the work and adding this keyboard to QMK in the first place. + +I've got Dvorak, Qwerty, and Colemak layouts at this time, with the possibility of adding more in the future. + +The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards have been my daily drivers for the last 17 years. I hope You can get some enjoyment out of this layout should you chose it! + +### CHANGELOG: + +#### 0.1 + * Initial commit. Based off of Profet's default keymap. +#### 0.2 + * Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. + * Added a TODO list. +#### 0.3 + * Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. + * Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Right thumb is Ctrl when held, Enter when tapped. + * Added readme. +#### 0.4 + * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. + * Put Tilde/Grave in the upper-left corner + * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. + +### TODO: + + * Make the layout more efficient, even if it means changing the RAISE + and LOWER functionality. + * Add legends in comments for each layer. Maybe. + * Enjoy this revision; figure out new things later. + +### Layer 0: Dvorak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Layer 1: QWERTY layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 2: Colemak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 3: WoW gaming layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 4: LOWER layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | + | { | } | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + + +### Keymap 5: RAISE layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | = | [ | ] | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 6: ADJUST layer + + ,-----------------------------------------. ,-----------------------------------------. + | | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RESET | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | |Qwerty|Colemk|Dvorak| | WoW | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | | | | | || | | | | | | | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | | | | |------'`------| | | | | | | + `-----------------------------------------' `-----------------------------------------' diff --git a/keyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/bananasplit/keymaps/talljoe/config.h new file mode 100644 index 000000000..bb2aadfa6 --- /dev/null +++ b/keyboards/bananasplit/keymaps/talljoe/config.h @@ -0,0 +1,23 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS +#define SPACE_COUNT 3 + +#define TEMPLATE( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ +) { \ + { 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, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ +} + +#endif diff --git a/keyboards/bananasplit/keymaps/talljoe/keymap.c b/keyboards/bananasplit/keymaps/talljoe/keymap.c new file mode 100644 index 000000000..7812add81 --- /dev/null +++ b/keyboards/bananasplit/keymaps/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/keyboards/bantam44/bantam44.h b/keyboards/bantam44/bantam44.h index 3c0117434..38afbbdde 100644 --- a/keyboards/bantam44/bantam44.h +++ b/keyboards/bantam44/bantam44.h @@ -7,17 +7,17 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38 \ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38 \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 } \ } #endif diff --git a/keyboards/bantam44/info.json b/keyboards/bantam44/info.json new file mode 100644 index 000000000..485d624f5 --- /dev/null +++ b/keyboards/bantam44/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bantam-44", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "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":"K0B", "x":11, "y":0}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2}, {"label":"K21", "x":1, "y":2}, {"label":"K22", "x":2, "y":2}, {"label":"K23", "x":3, "y":2}, {"label":"K24", "x":4, "y":2}, {"label":"K25", "x":5, "y":2}, {"label":"K26", "x":6, "y":2}, {"label":"K27", "x":7, "y":2}, {"label":"K28", "x":8, "y":2}, {"label":"K29", "x":9, "y":2}, {"label":"K2A", "x":10, "y":2}, {"label":"K2B", "x":11, "y":2}, {"label":"K30", "x":0, "y":3, "w":1.25}, {"label":"K31", "x":1.25, "y":3, "w":1.25}, {"label":"K32", "x":2.5, "y":3, "w":1.25}, {"label":"K33", "x":3.75, "y":3, "w":1.25}, {"label":"K34", "x":5, "y":3, "w":2.75}, {"label":"K35", "x":7.75, "y":3, "w":1.25}, {"label":"K36", "x":9, "y":3}, {"label":"K37", "x":10, "y":3}, {"label":"K38", "x":11, "y":3}] + } + } +} diff --git a/keyboards/bantam44/keymaps/default/keymap.c b/keyboards/bantam44/keymaps/default/keymap.c index ed795eee1..0e15bebf8 100644 --- a/keyboards/bantam44/keymaps/default/keymap.c +++ b/keyboards/bantam44/keymaps/default/keymap.c @@ -1,30 +1,33 @@ -#include "bantam44.h" - +#include QMK_KEYBOARD_H + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Base */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(1), KC_NO, KC_SPC, KC_NO, MO(2), KC_SCLN, KC_QUOT, KC_SLSH } - }, - [1] = { /* LOWER */ - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, - {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_END, KC_PGDN, KC_EXLM } - }, - [2] = { /* RAISE */ - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, - {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT } - } + /* Base */ + [0] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(2), KC_SCLN, KC_QUOT, KC_SLSH \ + ), + /* LOWER */ + [1] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \ + KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \ + ), + /* RAISE */ + [2] = LAYOUT( \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \ + KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \ + ) }; - + const uint16_t PROGMEM fn_actions[] = { }; - + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; -}; \ No newline at end of file +}; diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c index 4936e4249..fea57b651 100644 --- a/keyboards/bfo9000/serial.c +++ b/keyboards/bfo9000/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/bigseries/bigseries.h b/keyboards/bigseries/bigseries.h index 4a8ac1116..344140779 100755 --- a/keyboards/bigseries/bigseries.h +++ b/keyboards/bigseries/bigseries.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00 \ ) { \ { K00 } \ diff --git a/keyboards/bigseries/info.json b/keyboards/bigseries/info.json new file mode 100644 index 000000000..ff2fd54c5 --- /dev/null +++ b/keyboards/bigseries/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Big Series 1-Key", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigseries/keymaps/8ball/keymap.c b/keyboards/bigseries/keymaps/8ball/keymap.c index df4e3dde8..1097eb94a 100755 --- a/keyboards/bigseries/keymaps/8ball/keymap.c +++ b/keyboards/bigseries/keymaps/8ball/keymap.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" +#include QMK_KEYBOARD_H static const char * const ANSWERS[] = { // "Yes" answers @@ -51,7 +51,7 @@ static const char * const ANSWERS[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -KEYMAP( +LAYOUT( KC_A), }; diff --git a/keyboards/bigseries/keymaps/default/keymap.c b/keyboards/bigseries/keymaps/default/keymap.c index 67cfb168c..7ce837357 100755 --- a/keyboards/bigseries/keymaps/default/keymap.c +++ b/keyboards/bigseries/keymaps/default/keymap.c @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -KEYMAP( +LAYOUT( KC_A), diff --git a/keyboards/bigseries/keymaps/dudeofawesome/README.md b/keyboards/bigseries/keymaps/dudeofawesome/README.md new file mode 100644 index 000000000..86b79b462 --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/README.md @@ -0,0 +1,18 @@ +# DudeOfAwesome's Big Series 1-key layout + +## Features + +### Tap dancing taps: +1. Media Play / Pause +1. Media Next +1. RGB Mode Next +1. RGB Mode Previous + +## Building and flashing + +1. Put your board in DFU mode with the button on the bottom +1. Flash: + ```bash + $ make bigseries:dudeofawesome:dfu + ``` + diff --git a/keyboards/bigseries/keymaps/dudeofawesome/config.h b/keyboards/bigseries/keymaps/dudeofawesome/config.h new file mode 100644 index 000000000..30b86224c --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define TAPPING_TERM 1000 + +#endif diff --git a/keyboards/bigseries/keymaps/dudeofawesome/keymap.c b/keyboards/bigseries/keymaps/dudeofawesome/keymap.c new file mode 100755 index 000000000..4c3739bbe --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum TAP_DANCE { + TD_PLAY = 0, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT(TD(TD_PLAY)), +}; + +void tap_dance (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 0 ... 1: + register_code(KC_MEDIA_PLAY_PAUSE); + unregister_code(KC_MEDIA_PLAY_PAUSE); + break; + case 2: + register_code(KC_MEDIA_NEXT_TRACK); + unregister_code(KC_MEDIA_NEXT_TRACK); + break; + case 3: + rgblight_step(); + break; + case 4: default: + rgblight_step_reverse(); + break; + } +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_PLAY] = ACTION_TAP_DANCE_FN(tap_dance), +}; diff --git a/keyboards/bigseries/keymaps/dudeofawesome/rules.mk b/keyboards/bigseries/keymaps/dudeofawesome/rules.mk new file mode 100644 index 000000000..e5ddcae8d --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/bigseries/keymaps/leddance/keymap.c b/keyboards/bigseries/keymaps/leddance/keymap.c index 4cb57f437..3cd8f1db7 100755 --- a/keyboards/bigseries/keymaps/leddance/keymap.c +++ b/keyboards/bigseries/keymaps/leddance/keymap.c @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" -#include "print.h" +#include QMK_KEYBOARD_H + extern rgblight_config_t rgblight_config; @@ -66,9 +66,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( +[BASE] = LAYOUT( TD(TD_TOGGLE)), -[LED] = KEYMAP( +[LED] = LAYOUT( TD(TD_TOGGLE) ) diff --git a/keyboards/bigseries/readme.md b/keyboards/bigseries/readme.md index dfb415668..528df0de0 100644 --- a/keyboards/bigseries/readme.md +++ b/keyboards/bigseries/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make bigseries:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/build-compile-instructions) for more information. diff --git a/keyboards/bigswitch/README.md b/keyboards/bigswitch/README.md new file mode 100644 index 000000000..2679a0aec --- /dev/null +++ b/keyboards/bigswitch/README.md @@ -0,0 +1,10 @@ +Big Switch PCB by flehrad +========================= + +Designed by Don of the Board Podcast and sold as a kit by [keeb.io](https://keeb.io/collections/frontpage/products/big-switch-pcb?variant=7507922845726) + +### Technical Specifications + + * Uses a atmega32u4 pro micro or pin compatible MCU + * Pins B5 and B6 connect to the pins on the Big Switch + * Optionally you may add a RGB strip to pin D3 for data and take power from VCC and GND diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c new file mode 100644 index 000000000..dfd9710e2 --- /dev/null +++ b/keyboards/bigswitch/bigswitch.c @@ -0,0 +1,33 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "bigswitch.h" + +volatile uint8_t runonce = true; +static uint16_t my_timer; + +void matrix_init_user(void) { + my_timer = timer_read(); +} + +void matrix_scan_user(void) { + if (runonce && timer_elapsed(my_timer) > 1000) { + runonce = false; + rgblight_sethsv_noeeprom(0x0, 0xff, 0x80); + rgblight_mode_noeeprom(9); + rgblight_enable_noeeprom(); + } +} diff --git a/keyboards/bigswitch/bigswitch.h b/keyboards/bigswitch/bigswitch.h new file mode 100755 index 000000000..ea3d51a1f --- /dev/null +++ b/keyboards/bigswitch/bigswitch.h @@ -0,0 +1,28 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BIGSWITCH_H +#define BIGSWITCH_H + +#include "quantum.h" + +#define LAYOUT( \ + K00 \ +) { \ + { K00 } \ +} + +#endif diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h new file mode 100755 index 000000000..cc290fd79 --- /dev/null +++ b/keyboards/bigswitch/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER flehrad +#define PRODUCT BigSwitch PCB +#define DESCRIPTION A single key board for Novelkeys Big Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5 } +#define MATRIX_COL_PINS { B6 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 50 + +/* key combination for command */ +#define IS_COMMAND() ( \ + false \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#endif + +#endif diff --git a/keyboards/bigswitch/info.json b/keyboards/bigswitch/info.json new file mode 100644 index 000000000..8d3d746f5 --- /dev/null +++ b/keyboards/bigswitch/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bigswitch PCB", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigswitch/keymaps/default/keymap.c b/keyboards/bigswitch/keymaps/default/keymap.c new file mode 100755 index 000000000..210d00123 --- /dev/null +++ b/keyboards/bigswitch/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#define KC_OSX_EJECT 0x66 +#define LOCK_OSX LSFT(LCTL(KC_OSX_EJECT)) +#define SLEEP_OSX LALT(LGUI(KC_OSX_EJECT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT(SLEEP_OSX), + +}; diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk new file mode 100755 index 000000000..e4e72f09a --- /dev/null +++ b/keyboards/bigswitch/rules.mk @@ -0,0 +1,60 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. + diff --git a/keyboards/bmini/bmini.h b/keyboards/bmini/bmini.h index 65ffbe947..9a70f9204 100644 --- a/keyboards/bmini/bmini.h +++ b/keyboards/bmini/bmini.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ @@ -38,7 +38,7 @@ along with this program. If not, see . { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ diff --git a/keyboards/bmini/info.json b/keyboards/bmini/info.json new file mode 100644 index 000000000..a047a3ef5 --- /dev/null +++ b/keyboards/bmini/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "B.mini", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K10", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5}, {"label":"KB0", "x":11, "y":5}, {"label":"KC0", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + } + } +} diff --git a/keyboards/bmini/keymaps/default/keymap.c b/keyboards/bmini/keymaps/default/keymap.c index 5c52e1d9b..1f9e22981 100644 --- a/keyboards/bmini/keymaps/default/keymap.c +++ b/keyboards/bmini/keymaps/default/keymap.c @@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bmini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_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_BSLS, KC_INS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT ), - [1] = KEYMAP( + [1] = LAYOUT( KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_DEL, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS, diff --git a/keyboards/bmini/readme.md b/keyboards/bmini/readme.md index fc39e7c57..01017e175 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/bmini/readme.md @@ -3,9 +3,9 @@ B.mini A 75% keyboard with RGB -Keyboard Maintainer: QMK Community -Hardware Supported: B.mini PCB -Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ +Keyboard Maintainer: QMK Community +Hardware Supported: B.mini PCB +Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c index 91f4826f9..6f24a895f 100644 --- a/keyboards/ca66/ca66.c +++ b/keyboards/ca66/ca66.c @@ -1 +1,30 @@ #include "ca66.h" +#include "config.h" + +void bootmagic_lite(void) +{ + // The lite version of TMK's bootmagic. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCING_DELAY); + matrix_scan(); + + // If the Esc (matrix 0,0) is held down on power up, + // reset the EEPROM valid state and jump to bootloader. + if ( matrix_get_row(0) & (1<<0) ) + { + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); + // Jump to bootloader. + bootloader_jump(); + } +} + +void matrix_init_kb(void) +{ + bootmagic_lite(); + matrix_init_user(); +} diff --git a/keyboards/ca66/keymaps/olivia/keymap.c b/keyboards/ca66/keymaps/olivia/keymap.c new file mode 100644 index 000000000..f27824e57 --- /dev/null +++ b/keyboards/ca66/keymaps/olivia/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, 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_GRV, KC_PGUP, + 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_PGDN, + 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_DEL, + 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, MO(1), + KC_NO, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + KC_PWR, 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_INS, KC_DEL, RESET, + KC_CAPS, RGB_RMOD,RGB_SMOD,RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, 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_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= (1 << 1); PORTD &= ~(1 << 1); + } else { + DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); + } +} diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c new file mode 100644 index 000000000..bc69df2e5 --- /dev/null +++ b/keyboards/canoe/canoe.c @@ -0,0 +1,65 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" +#include "rgblight.h" +#endif + +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} + +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { + rgblight_task(); +} +#endif diff --git a/keyboards/canoe/canoe.h b/keyboards/canoe/canoe.h new file mode 100644 index 000000000..5658eb1b4 --- /dev/null +++ b/keyboards/canoe/canoe.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CANOE_H +#define CANOE_H + +#include "quantum.h" + +#define LAYOUT_iso( \ + K0D, K0C, K0B, K0A, K09, K08, K07, K06, K05, K04, K03, K02, K01, K00, K0E, \ + K1D, K1C, K1B, K1A, K19, K18, K17, K16, K15, K14, K13, K12, K11, K1E, \ + K2D, K2C, K2B, K2A, K29, K28, K27, K26, K25, K24, K23, K22, K10, K21, K2E, \ + K3D, K4A, K3C, K3B, K3A, K39, K38, K37, K36, K35, K34, K33, K32, K30, K3E, \ + K4D, K4C, K4B, K48, K44, K43, K42, K40, 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 }, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT( \ + KD0, KC0, KB0, KA0, K90, K80, K70, K60, K50, K40, K30, K20, K10, K00, KE0, \ + KD1, KC1, KB1, KA1, K91, K81, K71, K61, K51, K41, K31, K21, K11, K01, KE1, \ + KD2, KC2, KB2, KA2, K92, K82, K72, K62, K52, K42, K32, K22, K12, KE2, \ + KD3, KC3, KB3, KA3, K93, K83, K73, K63, K53, K43, K33, K23, K03, KE3, \ + KD4, KC4, KB4, K84, K44, K34, K24, K04, KE4 \ +){ \ + { K00, K10, K20, K30, K40, K50, K60, K70, K80, K90, KA0, KB0, KC0, KD0, KE0 }, \ + { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ + { KC_NO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ + { K03, KC_NO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ + { K04, KC_NO, K24, K34, K44, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KB4, KC4, KD4, KE4 } \ +} + +#endif diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h new file mode 100644 index 000000000..0e70094ae --- /dev/null +++ b/keyboards/canoe/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CANOE_CONFIG_H +#define CANOE_CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER NotActuallyPercent +#define PRODUCT CANOE + +#define RGBLED_NUM 2 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/canoe/i2c.c b/keyboards/canoe/i2c.c new file mode 100644 index 000000000..a4f952135 --- /dev/null +++ b/keyboards/canoe/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +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 . +*/ + +// Please do not modify this file + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +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 . +*/ + +// Please do not modify this file + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json new file mode 100644 index 000000000..ddabae88c --- /dev/null +++ b/keyboards/canoe/info.json @@ -0,0 +1,394 @@ +{ + "keyboard_name": "canoe", + "maintainer": "qmk", + "url": "", + "height": 8, + "width": 15, + "layouts": { + "LAYOUT_iso": { + "key_count": 68, + "layout": [ + { + "label": "Esc", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "w": 2, + "x": 13, + "y": 0 + }, + { + "label": "Insert", + "x": 15, + "y": 0 + }, + { + "label": "Tab", + "w": 1.5, + "x": 0, + "y": 1 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "ks": [ + [ + 0, + 0 + ], + [ + 1.5, + 0 + ], + [ + 1.5, + 2 + ], + [ + 0.25, + 2 + ], + [ + 0.25, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ], + "label": "Enter", + "x": 13.5, + "y": 1 + }, + { + "label": "Delete", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "w": 1.75, + "x": 0, + "y": 2 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "l", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "\\", + "x": 12.75, + "y": 2 + }, + { + "label": "Home", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "w": 1.25, + "x": 0, + "y": 3 + }, + { + "label": "~", + "x": 1.25, + "y": 3 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "w": 1.75, + "x": 12.25, + "y": 3 + }, + { + "label": "Up", + "x": 14, + "y": 3 + }, + { + "label": "Page Down", + "x": 14, + "y": 3 + }, + { + "label": "Control", + "w": 1.25, + "x": 0, + "y": 4 + }, + { + "label": "Win", + "w": 1.25, + "x": 1.25, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 2.5, + "y": 4 + }, + { + "w": 6.25, + "x": 3.75, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 10, + "y": 4 + }, + { + "label": "Fn0", + "w": 1.25, + "x": 11.25, + "y": 4 + }, + { + "label": "Left", + "x": 13, + "y": 4 + }, + { + "label": "Down", + "x": 14, + "y": 4 + }, + { + "label": "Right", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/canoe/keymaps/default/keymap.c b/keyboards/canoe/keymaps/default/keymap.c new file mode 100644 index 000000000..fc6730847 --- /dev/null +++ b/keyboards/canoe/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + 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_PSCR, \ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_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_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + 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_DEL, KC_PAUS, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, KC_NO, KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_PGUP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_HOME, KC_PGDOWN,KC_END) + +}; diff --git a/keyboards/canoe/keymaps/iso/keymap.c b/keyboards/canoe/keymaps/iso/keymap.c new file mode 100644 index 000000000..89af719d1 --- /dev/null +++ b/keyboards/canoe/keymaps/iso/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + KC_ESC, 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_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_END, + KC_LSFT, KC_NUHS, 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_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; + diff --git a/keyboards/canoe/matrix.c b/keyboards/canoe/matrix.c new file mode 100644 index 000000000..57aa36b5f --- /dev/null +++ b/keyboards/canoe/matrix.c @@ -0,0 +1,106 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +#define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md new file mode 100644 index 000000000..fa2bfbb33 --- /dev/null +++ b/keyboards/canoe/readme.md @@ -0,0 +1,16 @@ +CANOE +======== + +A 65% keyboard with some RGB + +Keyboard Maintainer: QMK Community + +Hardware Supported: Canoe + +Hardware Availability: https://geekhack.org/index.php?topic=92418.0 + +Make example for this keyboard (after setting up your build environment): + + make canoe:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/canoe/rules.mk b/keyboards/canoe/rules.mk new file mode 100644 index 000000000..73c361e2a --- /dev/null +++ b/keyboards/canoe/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/canoe/usbconfig.h b/keyboards/canoe/usbconfig.h new file mode 100644 index 000000000..d2d848fcd --- /dev/null +++ b/keyboards/canoe/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/chibios_test/readme.md b/keyboards/chibios_test/readme.md new file mode 100644 index 000000000..096ecd6ae --- /dev/null +++ b/keyboards/chibios_test/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test Keyboards + +Test code for several ARM based ChibiOS boards \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/readme.md b/keyboards/chibios_test/stm32_f072_onekey/readme.md new file mode 100644 index 000000000..c5e504e49 --- /dev/null +++ b/keyboards/chibios_test/stm32_f072_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f072 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/readme.md b/keyboards/chibios_test/stm32_f103_onekey/readme.md new file mode 100644 index 000000000..d375ef7d8 --- /dev/null +++ b/keyboards/chibios_test/stm32_f103_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f103 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/readme.md b/keyboards/chibios_test/teensy_lc_onekey/readme.md new file mode 100644 index 000000000..4f9911387 --- /dev/null +++ b/keyboards/chibios_test/teensy_lc_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the teensy lc one key keyboard \ No newline at end of file diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index 3f08808a7..e3f413b49 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -2,77 +2,140 @@ // It's based on the default keymap, but Dvorak! #include "66.h" +#include "action_layer.h" +#include "eeconfig.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +extern keymap_config_t keymap_config; // 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. -#define _BL 0 -#define _FL 1 -#define _RS 2 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _FL 3 +#define _CL 4 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' - */ -[_BL] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ - LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' - */ -[_FL] = LAYOUT( - 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_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | RGB| |VAL+| - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | |VAL-| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |SAT+| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| - * `----------------------------------------------------------------------------------' - */ -[_RS] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK }; +// Useful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWERTY: Base Layer (Default Layer) + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ + +[_QWERTY] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + 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_PGDN, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _COLEMAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| R| S| T| D| H| N| E| I| O| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _DVORAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| O| E| U| I| D| H| T| N| S| -| | Ent| + * |--------------------------------------------------------------. + * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT ( + 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_DEL, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL), _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL), _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/clueboard/keymaps/xyverz/config.h b/keyboards/clueboard/keymaps/xyverz/config.h new file mode 100644 index 000000000..4999e4ff6 --- /dev/null +++ b/keyboards/clueboard/keymaps/xyverz/config.h @@ -0,0 +1,3 @@ +#include "../config.h" + +#define TAPPING_TERM 600 // ms diff --git a/keyboards/contra/keymaps/losinggeneration/README.md b/keyboards/contra/keymaps/losinggeneration/README.md new file mode 100644 index 000000000..affd2fb9b --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/README.md @@ -0,0 +1,30 @@ +losinggeneration's Contra Layout +============================ + +This build uses the MIT layout. + +See description of the layout in the common folder +[here](../../../../users/losinggeneration/README.md) + +## Features +- Adjust + - Removed AGSwap, AGNorm, & Del + - Added Caps Lock, F1-F12 in a 4x3 grid, arrow cluster, + and layer transitions to the new layers. + - Moved Reset & Audio control to the right side + +## Layouts + +### Adjust (Lower + Raise) + +``` + ,-----------------------------------------------------------------------------------. + | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + |------+------+------+------+------+------+------+------+------+------+------+------| + | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | | | | XXX | Left | Down |Right | + `-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/contra/keymaps/losinggeneration/config.h b/keyboards/contra/keymaps/losinggeneration/config.h new file mode 100644 index 000000000..759b1d9a0 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Danny Nguyen +Copyright 2018 Harley Laue + +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 +long with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H +#define USE_MIT_LAYOUT + +#define TAPPING_TERM 250 + +#endif diff --git a/keyboards/contra/keymaps/losinggeneration/keymap.c b/keyboards/contra/keymaps/losinggeneration/keymap.c new file mode 100644 index 000000000..d4a336c33 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H +#include "losinggeneration-config.h" +#include "losinggeneration-keymap.h" + +extern keymap_config_t keymap_config; + +#define MT_CAPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = CATMAP( QWERTY_LAYER ), +[_COLEMAK] = CATMAP( COLEMAK_LAYER ), +[_WORKMAN] = CATMAP( WORKMAN_LAYER ), +[_DVORAK] = CATMAP( DVORAK_LAYER ), +[_GAME] = CATMAP( GAME_LAYER ), +[_NUMPAD] = CATMAP( NUMPAD_LAYER ), +[_MOUSE] = CATMAP( MOUSE_LAYER ), +[_LOWER] = CATMAP( LOWER_LAYER ), +[_RAISE] = CATMAP( RAISE_LAYER ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | XXX | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = CATMAP( \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ + MT_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ +) + +}; + diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk new file mode 100644 index 000000000..1728afd85 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -0,0 +1,17 @@ +# 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 +# +AUDIO_ENABLE = no # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +MIDI_ENABLE = no # MIDI controls +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c index db84fb02c..1ac5c5039 100644 --- a/keyboards/deltasplit75/matrix.c +++ b/keyboards/deltasplit75/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c index 6faed09ce..74bcbb6bf 100644 --- a/keyboards/deltasplit75/serial.c +++ b/keyboards/deltasplit75/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 88948b6a6..4a7dcddfd 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -43,11 +43,11 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 } #define UNUSED_PINS /* Backlight Setup */ -#define BACKLIGHT_PIN F4 +#define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 6 //#define BACKLIGHT_BREATHING diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c index 502d02a40..c1e509c5d 100644 --- a/keyboards/do60/do60.c +++ b/keyboards/do60/do60.c @@ -1,19 +1,50 @@ #include "do60.h" +#include "led.h" + +//extern inline void do60_caps_led_on(void); +//extern inline void do60_bl_led_on(void); + +//extern inline void do60_caps_led_off(void); +//extern inline void do60_bl_led_off(void); + +extern inline void setdefaultrgb(void); -extern inline void do60_caps_led_on(void); -extern inline void do60_bl_led_on(void); +void matrix_init_kb(void) { + // Keyboard start-up code goes here + // Runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + setdefaultrgb(); +}; -extern inline void do60_caps_led_off(void); -extern inline void do60_bl_led_off(void); +void matrix_scan_kb(void) { + // Looping keyboard code goes here + // This runs every cycle (a lot) + matrix_scan_user(); +}; +void led_init_ports(void) { + // Set caps lock LED pin as output + DDRB |= (1 << 2); + // Default to off + PORTB |= (1 << 2); +} void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/dz60/keymaps/xtonhasvim/config.h b/keyboards/dz60/keymaps/xtonhasvim/config.h new file mode 100644 index 000000000..b1f549e0b --- /dev/null +++ b/keyboards/dz60/keymaps/xtonhasvim/config.h @@ -0,0 +1,17 @@ +#ifndef CONFIG_KEYMAP_H +#define CONFIG_KEYMAP_H + +#include "../../config.h" + +// help for fast typist+dual function keys? +#define PERMISSIVE_HOLD + +/* speed up mousekeys a bit */ +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 8 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#endif diff --git a/keyboards/dz60/keymaps/xtonhasvim/keymap.c b/keyboards/dz60/keymaps/xtonhasvim/keymap.c new file mode 100644 index 000000000..8a7419214 --- /dev/null +++ b/keyboards/dz60/keymaps/xtonhasvim/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H +#include "xtonhasvim.h" + +enum layers { + _QWERTY, + _FUN, + _MOVE, + _MOUSE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_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, + LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, KC_ENT, + 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_NO, + KC_LCTL, KC_LALT, KC_LGUI, VIM_START, TG(_MOUSE), KC_SPC, KC_RGUI, KC_RALT, X_____X, KC_RCTL, MO(_FUN)), + + [_FUN] = LAYOUT( + 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, + TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_MOVE] = LAYOUT( + X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, + X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, X_____X, X_____X, + X_____X, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X, X_____X, + _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, + TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + + [_MOUSE] = LAYOUT( + X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, + X_____X, X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X, X_____X, X_____X, + X_____X, X_____X,KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, X_____X, + _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______, + TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_EDIT] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + TO(_QWERTY), _______, _______, VIM_START, _______, _______, _______, _______, _______, _______, _______), + + [_CMD] = LAYOUT( + X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, + X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, X_____X, X_____X, + VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, X_____X, + VIM_SHIFT, X_____X, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT,X_____X, + TO(_QWERTY), _______, _______, TO(_QWERTY), X_____X, X_____X, _______, _______, _______, _______, _______), + +}; + +#define LED_BIT 1 << 2 +#define LED_MASK ~(1 << 2) + +void user_led_on(void) { + DDRB |= LED_BIT; + PORTB &= LED_MASK; +} + +void user_led_off(void) { + DDRB &= ~LED_BIT; + PORTB &= LED_MASK; +} + +void matrix_init_user(void) { + user_led_off(); +} + +uint32_t layer_state_set_user(uint32_t state) { + static uint32_t last_state = 0; + + if(last_state != state) { + switch (biton32(state)) { + case _CMD: + user_led_on(); + break; + default: + user_led_off(); + break; + } + last_state = state; + } + return state; +} + + diff --git a/keyboards/dz60/keymaps/xtonhasvim/readme.md b/keyboards/dz60/keymaps/xtonhasvim/readme.md new file mode 100644 index 000000000..5d0e38a3e --- /dev/null +++ b/keyboards/dz60/keymaps/xtonhasvim/readme.md @@ -0,0 +1,10 @@ +# Xton has a DZ60 and it's Vimtastic! + +Mine has a split spacebar, no arrowkeys and an opaque case. Changes from the default layout: + +* Vim mode toggled by hitting left spacebar (see `users/xtonhasvim`). Reusing the capslock LED to indicate VIM is on. +* Momentary directional control by holding down `;`. +* Mousekeys toggled with middle space button. +* Escape is dual-function with control (which replaces capslock AS IT SHOULD BE). +* Bottom left key is the "halp my kb doesn't work" key that always dumps you back to QWERTY. + diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 9c4082da2..77055348c 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -53,4 +53,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB 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 AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/e6v2/e6v2.h b/keyboards/e6v2/e6v2.h index 954d800b0..6416b4bd5 100644 --- a/keyboards/e6v2/e6v2.h +++ b/keyboards/e6v2/e6v2.h @@ -18,7 +18,7 @@ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ } -#define LAYOUT_ansi( \ +#define LAYOUT_60_ansi( \ 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, K2D, \ diff --git a/keyboards/e6v2/info.json b/keyboards/e6v2/info.json index fc6f9660a..1cac56f7e 100644 --- a/keyboards/e6v2/info.json +++ b/keyboards/e6v2/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, - "LAYOUT_ansi": { + "LAYOUT_60_ansi": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, diff --git a/keyboards/e6v2/keymaps/amnesia0287/keymap.c b/keyboards/e6v2/keymaps/amnesia0287/keymap.c index 33fb6cda0..625ddb74a 100644 --- a/keyboards/e6v2/keymaps/amnesia0287/keymap.c +++ b/keyboards/e6v2/keymaps/amnesia0287/keymap.c @@ -1,4 +1,4 @@ -#include "e6v2.h" +#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. diff --git a/keyboards/e6v2/keymaps/default/keymap.c b/keyboards/e6v2/keymaps/default/keymap.c index 4349793a3..945787f0d 100644 --- a/keyboards/e6v2/keymaps/default/keymap.c +++ b/keyboards/e6v2/keymaps/default/keymap.c @@ -1,14 +1,14 @@ -#include "e6v2.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_ansi( + [0] = LAYOUT_60_ansi( KC_ESC, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_MENU, KC_RCTL ), - [1] = LAYOUT_ansi( + [1] = LAYOUT_60_ansi( 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_DEL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, diff --git a/keyboards/e6v2/rules.mk b/keyboards/e6v2/rules.mk index c2c02b614..7d28042d8 100644 --- a/keyboards/e6v2/rules.mk +++ b/keyboards/e6v2/rules.mk @@ -66,3 +66,5 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/eagle_viper/rules.mk b/keyboards/eagle_viper/rules.mk index ba2241fa8..ad8bd5ca1 100644 --- a/keyboards/eagle_viper/rules.mk +++ b/keyboards/eagle_viper/rules.mk @@ -1 +1,3 @@ DEFAULT_FOLDER = eagle_viper/v2 + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/eagle_viper/v2/keymaps/default/keymap.c b/keyboards/eagle_viper/v2/keymaps/default/keymap.c index 3fdd1cfdd..2a6bda74f 100644 --- a/keyboards/eagle_viper/v2/keymaps/default/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "eagle_viper.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ diff --git a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c b/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c deleted file mode 100644 index a7f14b678..000000000 --- a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2017 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "eagle_viper.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* layer 0: qwerty */ - [0] = LAYOUT_eagle(\ - 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_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, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL), - - [1] = LAYOUT_eagle(\ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_PGDN, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [2] = LAYOUT_eagle(\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), - }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; diff --git a/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md b/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md deleted file mode 100644 index 2e8784696..000000000 --- a/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -MechMerlin's Duck Eagle V2 Layout -====================== - -This is the preferred 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. - -![Duck Eagle V2 Layout](https://imgur.com/FRcsmJc.png) - -## Keymap Notes -- Highly influenced by the KBP V60 and WKL B.Face standard layouts -- Does not support any form of inswitch lighting as Merlin hates them. -- Arrow toggle switch is FN + Space -- Reset is FN + R - -### Build -To build this keymap, simply run `make eagle_viper/v2:mechmerlin` from the qmk_firmware directory. \ No newline at end of file diff --git a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c index bd53fc3e7..d3be5e800 100644 --- a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "eagle_viper.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..b68f9f858 --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -0,0 +1,201 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +// Default ECO Layout +// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 + +#include "eco.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Aliases to make reading the keymap easier +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* Colemak + * ,-------------------------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | | H | N | E | I | O | " | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* Dvorak + * ,-------------------------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | | | F | G | C | R | L | / | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_NO, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* Lower + * ,-------------------------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Caps | | Mute | Vol- | Vol+ | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Brite| | Home | End | | Del | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ +), + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ +), + + +/* Adjust + * ,-------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | Reset| | | | | | | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , + _______, RESET, _______, _______, _______, _______, KC_NO, KC_NO, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/eco/keymaps/xyverz/readme.md b/keyboards/eco/keymaps/xyverz/readme.md new file mode 100644 index 000000000..cf168377d --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/readme.md @@ -0,0 +1,3 @@ +# ECO Default Layout by u/That-Canadian + +KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 \ No newline at end of file diff --git a/keyboards/eco/keymaps/xyverz/rules.mk b/keyboards/eco/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..9a3059e71 --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/rules.mk @@ -0,0 +1,21 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ergo42/keymaps/hdbx/config.h b/keyboards/ergo42/keymaps/hdbx/config.h index 39be7526a..6bddef1ea 100644 --- a/keyboards/ergo42/keymaps/hdbx/config.h +++ b/keyboards/ergo42/keymaps/hdbx/config.h @@ -34,8 +34,7 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define TAPPING_TERM 120 -#define TAPPING_TOGGLE 3 +/* Use RGB Underglow */ #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c index 8b3df3f4a..6a7430e49 100644 --- a/keyboards/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -17,7 +17,7 @@ extern keymap_config_t keymap_config; #define _ADJUST 4 enum custom_keycodes { - QWERTY = SAFE_RANGE, // デフォルトレイヤー用 + QWERTY = SAFE_RANGE, // QWERTYレイヤーへ MCR1, // マクロ1 MCR2, // マクロ2 MCR3, // マクロ3 @@ -35,14 +35,17 @@ enum custom_keycodes { #define KC_RASE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise #define KC_LSLB MT(MOD_LSFT, JP_LBRC) // タップで[ ホールドで左Shift #define KC_RSRB MT(MOD_RSFT, JP_RBRC) // タップで] ホールドで右Shift -#define KC_ALTB MT(MOD_LALT, KC_TAB) // タップでTAB ホールドで左ALT -#define KC_ESCA LT(_ADJUST,KC_ESC) // タップでESC ホールドでADJUSTレイヤーon +#define KC_ALTB MT(MOD_LALT, KC_TAB) // タップでTAB ホールドで左Alt #define CTL_ZH CTL_T(KC_ZKHK) // タップで半角/全角 ホールドで左Control (Windows) +#define WN_CAPS S(KC_CAPS) // Caps Lock (Windows) #define KC_ALPS LALT(KC_PSCR) // Alt + PrintScreen +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define GAME DF(_GAME) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY +/* QWERTY // WindowsでJIS配列時のデフォルトキーマップ * ,-------------------------------------------------------. ,-------------------------------------------------------. * |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| @@ -50,97 +53,123 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| * | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | TT | GUI | \ | Esc/ | LOWER | Enter | Del | | End | Space | RAISE | Left | Down | Up | Right | - * |(_GAME)| | |_ADJUST| 無変換| | | | | | 変換 | | | | | + * |WN CAPS| GUI | \ | Esc |無変換 | Enter | Del | | End | Space | 変換 | Left | Down | Up | Right | + * | | | | | LOWER | | | | | | RAISE | | | | | * `-------------------------------------------------------' `-------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ - KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \ - KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \ - TT(_GAME),KC_LGUI, JP_YEN, KC_ESCA, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \ + KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \ + WN_CAPS, KC_LGUI, JP_YEN, KC_ESC, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -/* LOWER +/* LOWER // 数字入力用レイヤー * ,-------------------------------------------------------. ,-------------------------------------------------------. - * |Tab/Alt| 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | O | = | BSPC | + * | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |ZH/Ctrl| F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | Home | 1 | 2 | 3 | + | * | Shift | + * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |XXXXXXX| GUI |XXXXXXX| Esc | | Enter | Del | | End | 0 | . | Left | Down | Up | Right | + * | | |XXXXXXX| | | | | | | 0 | | | | | | * `-------------------------------------------------------' `-------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_0, JP_EQL, _______, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ - _______, _______, XXXXXXX, KC_ESC, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, _______, _______ \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_PDOT, JP_EQL, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______ \ ), -/* RAISE +/* RAISE // 記号入力用レイヤー * ,-------------------------------------------------------. ,-------------------------------------------------------. - * |Tab/Alt| ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| BSPC | + * | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |ZH/Ctrl|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | + * | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | + * | Shift |M-PLAY |M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |XXXXXXX| GUI | | | Esc |XXXXXXX| Enter | Del | |PageDwn| Space | | Left | Down | Up | Right | + * | | | | | | | | | |PageDwn| | | | | | | * `-------------------------------------------------------' `-------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ - _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \ - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - _______, _______, JP_PIPE, KC_ESC, XXXXXXX, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ + _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \ + KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + _______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ ), -/* GAME +/* GAME // 左手はゲーム用レイヤー、右手はNumPad * ,-------------------------------------------------------. ,-------------------------------------------------------. - * | Esc | Q | W | E | R | T |PrntScr| | | | | | | | | + * | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | A | S | D | F | G | F5 | | | | | | | | | + * | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | F2 | |PageUp | | | | | | | + * | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | | GUI | Tab | Alt | Space | Enter | Del | |PageDwn| Space |XXXXXXX| Left | Down | Up | Right | + * | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right | * `-------------------------------------------------------' `-------------------------------------------------------' */ [_GAME] = KEYMAP( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LBRC, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_PGUP, _______, _______, _______, _______, _______, _______, \ - _______, KC_LGUI, KC_TAB, KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_PGDN, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, KC_ESC, KC_P7, KC_P8, KC_P9, KC_PDOT, JP_EQL, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ + KC_DEL, KC_LGUI, KC_LALT, KC_ESC, LOWER, KC_SPC, KC_ENT, KC_PGDN, KC_P0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -/* ADJUST +/* ADJUST // 設定用レイヤー (LOWER+RAISE) * ,-------------------------------------------------------. ,-------------------------------------------------------. * |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC | * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | RESET |RGB_MOD|_PLAIN |_BREATH|RGB_HuI|RGB_SaI|RGB_VaI| |XXXXXXX|QWERTY |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + * | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX| * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift |_RAINBW|_SNAKE |_GRADIE|RGB_HuD|RGB_SaD|RGB_VaD| |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| + * | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | DEBUG |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| Left | Down | Up | Right | + * | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right | * `-------------------------------------------------------' `-------------------------------------------------------' */ + [_ADJUST] = KEYMAP( \ - RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \ - RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \ - DEBUG, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \ + RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \ + DEBUG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +// RGB Underglow使用時のレイヤー毎のカラー切り替え +uint32_t layer_state_set_keymap (uint32_t state) { + return state; +} + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_setrgb_teal(); +#endif +} + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + switch (biton32(state)) { + case _RAISE: + rgblight_setrgb_chartreuse(); // RAISE:シャルトリューズ + break; + case _LOWER: + rgblight_setrgb_pink(); // LOWER:ピンク + break; + case _ADJUST: + rgblight_setrgb_red(); // ADJUST:レッド + break; + default: // for any other layers, or the default layer + rgblight_setrgb_teal(); // 他:ティール + break; + } +#endif +return state; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -151,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; @@ -171,19 +200,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case MCR1: if (record->event.pressed) { - SEND_STRING("hogehoge"); // 送信文字列 + SEND_STRING("hoge"); // 送信文字列 } return false; break; case MCR2: if (record->event.pressed) { - SEND_STRING("hogehogehoge"SS_TAP(X_ENTER)); // 送信文字列 + SEND_STRING("hogehoge"SS_TAP(X_ENTER)); // 送信文字列 } return false; break; case MCR3: if (record->event.pressed) { - SEND_STRING("hoge@hoge.co.jp"); // 送信文字列 + SEND_STRING("hoge@hoge.hoge"); // 送信文字列 } return false; break; diff --git a/keyboards/ergo42/keymaps/hdbx/readme.md b/keyboards/ergo42/keymaps/hdbx/readme.md index fe76fc7cf..aa05362e9 100644 --- a/keyboards/ergo42/keymaps/hdbx/readme.md +++ b/keyboards/ergo42/keymaps/hdbx/readme.md @@ -6,62 +6,62 @@ Designed for Japanese Keyboardists using JIS on the Ergo42. ```` QWERTY -,-------------------------------------------------------. ,-------------------------------------------------------. -|Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -|ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| TT | GUI | \ | Esc/ | LOWER | Enter | Del | | End | Space | RAISE | Left | Down | Up | Right | -|(_GAME)| | |_ADJUST| –³•ÏŠ·| | | | | | •ÏŠ· | | | | | -`-------------------------------------------------------' `-------------------------------------------------------' + ,-------------------------------------------------------. ,-------------------------------------------------------. + |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + |ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + |WN CAPS| GUI | \ | Esc | MHEN/ | Enter | Del | | End | Space | HENK/ | Left | Down | Up | Right | + | | | | | LOWER | | | | | | RAISE | | | | | + `-------------------------------------------------------' `-------------------------------------------------------' LOWER -,-------------------------------------------------------. ,-------------------------------------------------------. -|Tab/Alt| 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | O | = | BSPC | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Ctrl | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Shift | F7 | F8 | F9 | F10 | F11 | F12 | | Home | 1 | 2 | 3 | + | * | Shift | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -|XXXXXXX| GUI |XXXXXXX| Esc | | Enter | Del | | End | 0 | . | Left | Down | Up | Right | -`-------------------------------------------------------' `-------------------------------------------------------' + ,-------------------------------------------------------. ,-------------------------------------------------------. + | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | | |XXXXXXX| | | | | | | 0 | | | | | | + `-------------------------------------------------------' `-------------------------------------------------------' RAISE -,-------------------------------------------------------. ,-------------------------------------------------------. -|Tab/Alt| ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| BSPC | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Ctrl |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Shift |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -|XXXXXXX| GUI | | | Esc |XXXXXXX| Enter | Del | |PageDwn| Space | | Left | Down | Up | Right | -`-------------------------------------------------------' `-------------------------------------------------------' - -GAME -,-------------------------------------------------------. ,-------------------------------------------------------. -| Esc | Q | W | E | R | T |PrntScr| | | | | | | | | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Ctrl | A | S | D | F | G | F5 | | | | | | | | | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Shift | Z | X | C | V | B | F2 | |PageUp | | | | | | | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| | GUI | Tab | Alt | Space | Enter | Del | |PageDwn| Space |XXXXXXX| Left | Down | Up | Right | -`-------------------------------------------------------' `-------------------------------------------------------' + ,-------------------------------------------------------. ,-------------------------------------------------------. + | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | | M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | |PageDwn| | | | | | | + `-------------------------------------------------------' `-------------------------------------------------------' ADJUST -,-------------------------------------------------------. ,-------------------------------------------------------. -|RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC | -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| RESET |RGB_MOD|_PLAIN |_BREATH|RGB_HuI|RGB_SaI|RGB_VaI| |XXXXXXX|QWERTY |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| Shift |_RAINBW|_SNAKE |_GRADIE|RGB_HuD|RGB_SaD|RGB_VaD| |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| -|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| -| DEBUG |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| Left | Down | Up | Right | -`-------------------------------------------------------' `-------------------------------------------------------' + ,-------------------------------------------------------. ,-------------------------------------------------------. + |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX| + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right | + `-------------------------------------------------------' `-------------------------------------------------------' + +GAME + ,-------------------------------------------------------. ,-------------------------------------------------------. + | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift | + |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right | + `-------------------------------------------------------' `-------------------------------------------------------' ```` ## Notes -Supports RGB Underglow and Dynamic Macros. +Supports RGB Underglow color sync to layer switching. diff --git a/keyboards/ergo42/matrix.c b/keyboards/ergo42/matrix.c index 80d4ce46a..fc42dd14d 100644 --- a/keyboards/ergo42/matrix.c +++ b/keyboards/ergo42/matrix.c @@ -151,7 +151,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/ergodone/ergodone.h b/keyboards/ergodone/ergodone.h index c63afe838..b04826e69 100644 --- a/keyboards/ergodone/ergodone.h +++ b/keyboards/ergodone/ergodone.h @@ -99,6 +99,38 @@ inline void ergodox_led_all_set(uint8_t n) {} { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ } +#define LAYOUT_ergodox_80( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { 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, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ + } + #define KEYMAP_PRETTY( \ /* left hand, spatial positions */ /* right hand, spatial positions */ \ L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ @@ -120,6 +152,27 @@ inline void ergodox_led_all_set(uint8_t n) {} { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ } +#define LAYOUT_ergodox_pretty_80( \ + /* left hand, spatial positions */ /* right hand, spatial positions */ \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L45,L46,L54, R52,R40,R41, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \ + { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \ + { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \ + { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \ + { L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46 }, \ + { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ + } + #define LAYOUT_ergodox KEYMAP #define LAYOUT_ergodox_pretty KEYMAP_PRETTY diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json index 64ab0fe66..81c7e2afa 100644 --- a/keyboards/ergodone/info.json +++ b/keyboards/ergodone/info.json @@ -5,11 +5,103 @@ "height": 9.375, "layouts": { - "LAYOUT_ergodox": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] - }, - "LAYOUT_ergodox_pretty": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] - } + "LAYOUT_ergodox": { + + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_80": { + + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + }, + "LAYOUT_ergodox_pretty_80": { + + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] } + } } diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index fc39c7848..7470ab906 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -7,16 +7,98 @@ "layouts": { "LAYOUT_ergodox": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] }, "LAYOUT_ergodox_pretty": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] }, "LAYOUT_ergodox_80": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] - }, + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + }, "LAYOUT_ergodox_pretty_80": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] - } + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + } } } diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h new file mode 100644 index 000000000..11c81f2eb --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h @@ -0,0 +1,28 @@ +#include "../../config.h" + +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 5 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 100 + +#undef TAPPING_TOGGLE +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c new file mode 100644 index 000000000..ec77b6aa0 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -0,0 +1,234 @@ +// An Ergodox EZ keymap mostly following the programmer's dvorak layout. +// There is a standard QWERTY layer as well +// +// See the README.md file for an image of this keymap. + +#include QMK_KEYBOARD_H + +// The layers that we are defining for this keyboards. +#define BASE 0 +#define NUM 1 +#define QWERTY 2 +#define MAC 3 + +// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +#define TAP_MACRO 0 + +// SAFE_RANGE must be used to tag the first element of the enum. +// DYNAMIC_MACRO_RANGE must always be the last element of the enum if other +// values are added (as its value is used to create a couple of other keycodes +// after it). +enum custom_keycodes { + MC_ARROW = SAFE_RANGE, + DYNAMIC_MACRO_RANGE +}; + +// A 'transparent' key code (that falls back to the layers below it). +#define ___ KC_TRANSPARENT + +// A 'blocking' key code. Does nothing but prevent falling back to another layer. +#define XXX KC_NO + +// Some combined keys (one normal keycode when tapped and one modifier or layer +// toggle when held). +#define SPC_RALT MT(MOD_RALT, KC_SPC) // SPACE key and right alt modifier. + +// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +#define MK_CUT LSFT(KC_DEL) // shift + delete +#define MK_COPY LCTL(KC_INS) // ctrl + insert +#define MK_PASTE LSFT(KC_INS) // shift + insert +//Move mac desktop spaces +#define MAC_L LGUI(LSFT(KC_UP)) // cmd + shift + up +#define MAC_R LGUI(LSFT(KC_DOWN)) // cmd + shift + down + +// This file must be included after DYNAMIC_MACRO_RANGE is defined... +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Layer 0: basic keys. + [BASE] = LAYOUT_ergodox_pretty( + KC_DLR, KC_AMPR, KC_LBRC, KC_LCBR, KC_RCBR, KC_LPRN, KC_CIRC, KC_F4, KC_EQUAL,KC_ASTR, KC_BSLASH, KC_PLUS, KC_RBRACKET, KC_EXLM, + GUI_T(KC_BSLASH), KC_SCOLON,KC_COMMA, KC_DOT, KC_P, KC_Y, KC_PERC, KC_DELETE, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + MO(NUM), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_LSPO, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_LALT, TD(TAP_MACRO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + KC_AT, KC_HASH, KC_GRAVE, KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_HOME, KC_END, TO(QWERTY), + ALT_T(KC_APPLICATION), ALL_T(KC_NO), KC_PGUP, KC_LGUI, + KC_BSLASH, TO(MAC), + KC_ENTER, KC_TAB, CTL_T(KC_ESCAPE), CTL_T(KC_ESCAPE), KC_BSPACE, KC_SPACE), + + // Layer 1: function and numpad keys. + [NUM] = LAYOUT_ergodox_pretty( + ___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___, ___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + ___, KC_EXLM, KC_COMMA, KC_DOT, KC_MS_BTN1, KC_MS_BTN2, ___, ___, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + XXX, ___, KC_LCBR, KC_RCBR, MC_ARROW, KC_GRAVE, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, + ___, ___, KC_CIRC, KC_LBRACKET, KC_RBRACKET, KC_TILD, ___, ___, KC_0, KC_1, KC_2, KC_3, KC_KP_SLASH, KC_BSLASH, + ___, ___, ___, ___, ___, ___, KC_0, KC_KP_DOT, KC_EQUAL, ___, + ___, ___, KC_KP_ASTERISK, KC_KP_SLASH, + KC_LCTL, ___, + KC_KP_PLUS, KC_KP_MINUS, KC_DLR, KC_DELETE, KC_BSPACE, KC_SPACE), + + // Layer 2: QWERTY control. + [QWERTY] = LAYOUT_ergodox_pretty( + /* left hand */ + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RIGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_DELETE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, TO(BASE), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + MO(NUM), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, GUI_T(KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALT_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, + KC_GRAVE, KC_QUOTE, LALT(KC_TAB), KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, TO(BASE), + ___, KC_LGUI, ___, KC_ESCAPE, + KC_HOME, KC_PGUP, + KC_ENTER, KC_TAB, KC_END, KC_PGDOWN, KC_BSPACE, KC_SPACE), + + // Layer 3: Mac layer + [MAC] = LAYOUT_ergodox_pretty( + /* left hand */ + ___, KC_1, KC_2, KC_3, KC_4, KC_5, ___, ___, KC_6, KC_7, KC_8, KC_9, KC_0, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, MAC_L, MAC_R, ___, ___, ___, ___, ___, + ___, ___, ___, ___, + ___, TO(BASE), + KC_LGUI, KC_LALT, KC_LGUI, KC_LGUI, KC_LALT, KC_LGUI), +}; + +// Whether the macro 1 is currently being recorded. +static bool is_macro1_recording = false; + +// The current set of active layers (as a bitmask). +// There is a global 'layer_state' variable but it is set after the call +// to layer_state_set_user(). +static uint32_t current_layer_state = 0; +uint32_t layer_state_set_user(uint32_t state); + +// Method called at the end of the tap dance on the TAP_MACRO key. That key is +// used to start recording a macro (double tap or more), to stop recording (any +// number of tap), or to play the recorded macro (1 tap). +void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { + uint16_t keycode; + keyrecord_t record; + dprintf("macro_tap_dance_fn %d\n", state->count); + if (is_macro1_recording) { + keycode = DYN_REC_STOP; + is_macro1_recording = false; + layer_state_set_user(current_layer_state); + } else if (state->count == 1) { + keycode = DYN_MACRO_PLAY1; + } else { + keycode = DYN_REC_START1; + is_macro1_recording = true; + layer_state_set_user(current_layer_state); + } + + record.event.pressed = true; + process_record_dynamic_macro(keycode, &record); + record.event.pressed = false; + process_record_dynamic_macro(keycode, &record); +} + +// The definition of the tap dance actions: +qk_tap_dance_action_t tap_dance_actions[] = { + // This Tap dance plays the macro 1 on TAP and records it on double tap. + [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn) +}; + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode != TD(TAP_MACRO)) { + // That key is processed by the macro_tapdance_fn. Not ignoring it here is + // mostly a no-op except that it is recorded in the macros (and uses space). + // We can't just return false when the key is a tap dance, because + // process_record_user, is called before the tap dance processing (and + // returning false would eat the tap dance). + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + if(record->event.pressed) { + switch(keycode) { + case MC_ARROW: + SEND_STRING("=>"); + return false; + break; + } + } + } + + return true; // Let QMK send the enter press/release events +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + +// Whether the given layer (one of the constant defined at the top) is active. +#define LAYER_ON(layer) (current_layer_state & (1<", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}] - }, - "LAYOUT_ergodox_pretty": { - "layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}] - } + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + } } } diff --git a/keyboards/ergodox_infinity/keymaps/gordon/config.h b/keyboards/ergodox_infinity/keymaps/gordon/config.h new file mode 100644 index 000000000..88d495b12 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/gordon/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2018 Daniel Gordon + +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 . +*/ + +#define PREVENT_STUCK_MODIFIERS + +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT + +#undef PERMISSIVE_HOLD +// #define PERMISSIVE_HOLD + +#define ONESHOT_TAP_TOGGLE 2 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#define FORCE_NKRO diff --git a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c index 7e3e51cdd..73dd3b325 100644 --- a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c @@ -10,16 +10,6 @@ #include "keymap_nordic.h" -#define TLSLSH M(TIL_SLASH) -#define F1_F13 TD(F1F13) -#define F2_F14 TD(F2F14) -#define F5_F15 TD(F5F15) -#define F4_ALTF4 TD(ALTF4) -#define END_ESC TD(ENDESC) -#define SHF6_AF7 TD(F6F7) -#define F12_RUN TD(F12ETAPS) -#define COMMA_TD TD(COMMA) - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -27,129 +17,94 @@ enum custom_keycodes { RGB_SLD, }; -//Tap dance enums -enum { - F12TAP = 0, - F12ETAPS, - CALCCOMP, - REFRESH, //send R, or Control+R if double tapped. - ENDESC, - XESC, //'quad function'. x, control, escape, alt - ALY2, //'quad function': a, Hyper, ctrl+a, layer 2 - PRLOCK, - F6F7, // Shift F6 or Alt F7 - TABCOMBO, - FCTRL, - F3D, - ALTF4, - COMMA, - AT, - HTAB, - F1F13, - F2F14, - F5F15 -}; - - // Custom tapping terms for each key. // Requires changes to action_taping.c -/* uint16_t get_tapping_term(keyevent_t* event) { - uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); - if (keycode == LT(3,KC_E) ) { - return TAPPING_TERM + 50; - } - return TAPPING_TERM; -} */ +// uint16_t get_tapping_term(keyevent_t* event) { +// uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); +// if (keycode == NAV_E ) { +// return TAPPING_TERM + 50; +// } +// return TAPPING_TERM; +// } - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // simple tap dance - [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), - [REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)), - [ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC), - [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), - [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), - [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), - [F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13), - [F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14), - [F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), - [TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset), - [F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset), - [COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset), - [HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset) -}; + +// _XXXXXX_ is a symbol that means, "DO NOT ASSIGN THIS KEY TO ANTYING", because the key +// underneath this layer is the key that sends you to/from this layer. +// Meaning, if you were to put something here - then you will be stuck in this layer. +// It is simply a visual reminder not to use that key for this layer. +// Example: On the numpad layer, under the letter `D` is `_XXXXXXX_`, because pressing and holding +// `D` sends you to the numpad layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -//**************************FIRST LAYER - LAYER ZERO ************************************** +//**************************FIRST LAYER - LAYER ZERO ************************************** [_QWERTY] = KEYMAP( - SHF6_AF7, F1_F13, F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, - ________, KC_Q, CTR_SH_W, NAV_E, CTR_AL_R, KC_T, PRINTSCR, - KC_TAB, KC_A, MEH_S, NUMPAD_D, CTRL_F, WIN_G, - ALT_SHFT, CTRL_Z, HYPER_X, MOUSE_C, ALT_V, KC_B, TT(_MOUSE), + SHF6_AF7, F1_F13 , F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, + SPRK_TCK , Q_ESC , CTR_SH_W, NAV_E, ALT_SH_R, KC_T, PRINTSCR, + KC_TAB , KC_A , MEH_S, NUMPAD_D, CTRL_F, WIN_G, + OSL(_ONESHOT), CTRL_Z , HYPER_X, MOUSE_C, ALT_V, KC_B, OSL(_MOUSE), KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, - - KC_INSERT, KC_DELETE, - ALT_HOME, - KC_LSHIFT, SYMB_BSP, END_ESC, + + LSFT(KC_INSERT), TT(_QWERTY_KIDS), + ________ , + KC_LSHIFT, SYMB_BSP, KC_INSERT , F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP), - ________, KC_Y, KC_U, KC_I, KC_O, KC_P, ________, - WIN_H, CTRL_J, KC_K, MEH_L, COL_MOUS, ________, - KC_LEAD, KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, TD(TABCOMBO), - KC_UP, KC_DOWN, KC_ESC, KC_TILD, KC_UNDS, + CALTDEL , KC_Y, KC_U, KC_I, KC_O, KC_P, MODRESET, + WIN_H, CTRL_J, APP_SW_K, MEH_L, COL_MOUS, END_HOME, + OSL(_ONESHOT), KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, ID_MAN_IP, + KC_UP, KC_DOWN,KC_DELETE, KC_TILD, KC_UNDS, - KC_ESCAPE, KC_DELETE, - ALT_T(KC_PGUP), - RCTL_T(KC_PGDOWN), LT(_NAV,KC_ENTER), SPAC_SYM), + TT(_STREET_FIGHTER), ________, + KC_PGUP, + KC_PGDOWN, LT(_NAV,KC_ENTER), SPAC_TXT), //**************************SYMBOLS LAYER************************** [_SYMBOLS] = KEYMAP( ________, ________, ________, ________, ________, ________, ________, - ________, TLSLSH, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, - ________, KC_EXLM, KC_PIPE, KC_LPRN, KC_RPRN, M(DEREF), + ________, DEREF , KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, + ________, KC_EXLM, KC_HASH, KC_LPRN, KC_RPRN, ________, ________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________, - ________, M(TICK3), ________, ________, ________, + ________,TICK3 , ________, ________, ________, ________,________, ________, - ________,________,________, + ________,_XXXXXX_,________, ________, ________, ________, ________, ________, ________, NUMLOCK, - ________, TLSLSH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, - M(EQRIGHT), KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, - ________, KC_PIPE, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, - ________,________,________,M(TILD3),________, + ________,TIL_SLASH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, + EQRIGHT, KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, + ________, KC_M, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, + ________,________ ,________,TILD3,________, ________,________, ________, - ________,________,________), - + ________,________,_XXXXXX_), + //**************************MOUSE MOVEMENT LAYER************************** - [_MOUSE] = KEYMAP(RESET,________,________,________,________,________,________, - RESET,________,________,KC_MS_UP,________,KC_MS_WH_UP,CALTDEL, + [_MOUSE] = KEYMAP(UP_ENTER_RESET,________,________,________,________,________,MODRESET, + RESET,KC_SECRET_5,________,KC_MS_UP,KC_SECRET_4,KC_MS_WH_UP,________, ________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN, - KC_SECRET_1,________,HYPR(KC_F13),________,HYPR(KC_F14),KC_SECRET_2,________, + KC_SECRET_5,KC_SECRET_4,KC_SECRET_3,_XXXXXX_,KC_SECRET_2,KC_SECRET_1,_XXXXXX_, ________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT, - + ________,________, ________, KC_MS_BTN1,KC_MS_BTN2,________, - - + + ________,________,________,________,________,________,________, - KC_MS_WH_UP,________,________,KC_UP,________,________,________, - ________,KC_LEFT,KC_DOWN,KC_RIGHT,________,________, - KC_MS_WH_DOWN,________,KC_PGUP,KC_PGDOWN,KC_MEDIA_NEXT_TRACK,________,________, - KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_MEDIA_PLAY_PAUSE,________, + ________,________,________,KC_UP,________,KC_MEDIA_PLAY_PAUSE,________, + ________,KC_LEFT,KC_DOWN,KC_RIGHT,_XXXXXX_,________, + ________,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_MUTE,________,________, + KC_MS_WH_UP,KC_MS_WH_DOWN,________,________,________, ________,________, ________, - ________,________,KC_WWW_BACK), + ________,KC_WWW_BACK,KC_WWW_FORWARD), @@ -157,23 +112,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //**************************WINDOWS NAVIGATION LAYER************************** [_NAV] = KEYMAP(________,________,________,________,________,________,________, - ________,________,SNAPLEFT,________,SNAPRGHT,LALT(KC_LEFT),________, - ________,LCTL(KC_W),PREVTAB,LGUI(KC_D),NEXTTAB,________, - ________,________,WORKLEFT,________,WORKRIGHT,________,________, + ________,________,SNAPLEFT,_XXXXXX_,SNAPRGHT,________,________, + ________,KC_WWW_BACK,PREVTAB,________,NEXTTAB,SNAPUP, + ________,________,WORKLEFT,________,WORKRIGHT,SNAPDOWN,________, ________,________,________,________,________, - + ________,________, ________, - ________,________,________, - - + ________,________,________, + + ________,________,________,________,________,________,________, ________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________, ________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________, ________,________,________,________,________,________,________, ________,________,________,________,________, - - + + ________,________, ________, ________,________,________), @@ -181,95 +136,207 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //****************************NUMPAD LAYER**************************** [_NUMPAD] = KEYMAP(________,________,________,________,________,________,________, ________,________,________,________,________,________,________, - ________,________,________,________,________,________, - ________,________,________,________,________,________,________, + ________,KC_DOT ,KC_SPACE,_XXXXXX_, KC_ESC ,________, + ________,DBMS_OUT,________,________,________,________,________, ________,________,________,________,________, - + ________,________, ________, - ________,________,________, - + KC_PLUS,KC_MINUS,________, + BL_TOGG ,BL_STEP ,________,________,________,________,________, ________,________,KC_7 ,KC_8 ,KC_9 ,________,________, ________,KC_4 ,KC_5 ,KC_6 ,________,________, - ________,________,KC_1 ,KC_2 ,KC_3 ,________,________, - KC_0 ,KC_0 , KC_DOT ,________,________, - + ________,KC_DOT, KC_1 ,KC_2 ,KC_3 ,________,________, + KC_0 ,KC_DOT , KC_DOT ,________,________, + ________,________, ________, ________,________,KC_0), + + //****************************APP SWITCH LAYER**************************** + [_APPSWITCH] = KEYMAP(________,________,________,________,________,________,________, + ________,________ , ________ , ________ ,________ ,________,________, + ________,APP_5,APP_6,APP_7,APP_8,________, + ________,DBMS_OUT,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + KC_PLUS,________,________, + + ________,________,________,________,________,________,________, + ________,________,APP_3 ,________,APP_4 ,________,________, + ________,APP_1 ,_XXXXXX_,APP_2 ,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________), + + + [_ONESHOT] = KEYMAP( UP_ENTER_RESET , ________, ________, ________, ________, ________, ________, + ________, ________, ________, KC_UP , ________, ________, ________, + ________, ________, KC_LEFT , KC_DOWN , KC_RIGHT, ________, + MAGIC_TOGGLE_NKRO, ________, ________, ________, ________, ________, ________, + ________, ________, ________, ________, ________, + + ________, ________, + ________, + ________, ________, ________, + + ________, ________, ________, ________, ________, ________, ________, + ________, ________, KC_7, KC_8, KC_9, KC_PLUS, ________, + ________, KC_4, KC_5, KC_6, KC_EQUAL, ________, + ________, ________, KC_1, KC_2, KC_3, KC_ASTR, ________, + ________, ________, KC_0, ________, ________, + + ________, ________, + ________, + ________, ________, ________), //****************************TEXT/INTELLIJ NAVIGATION LAYER**************************** [_TEXTNAV] = KEYMAP(________,________,________,________,________,________,________, ________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________, - ________,LALT(KC_F7),LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), - ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________,________,________,________,________,________,________,________,________,________,LCTL(KC_DELETE),________,LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)),________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)),LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________) + ________,________,LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), + ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________, + ________,________,________,________,________, + + ________,________,________,________,________,________, + + LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)), + ________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)), + LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________, + ________,________,________,________,________,________,________,________,________,_XXXXXX_), + [_QWERTY_KIDS] = KEYMAP( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Q , KC_W, KC_E, KC_R, KC_T, KC_NO , + KC_NO , KC_A , KC_S, KC_D, KC_F, KC_G , + KC_NO , KC_Z , KC_X, KC_C, KC_V, KC_B, KC_NO , + KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, + + KC_NO , TT(_QWERTY_KIDS) , + KC_NO , + KC_LSHIFT, KC_BSPACE, KC_NO , + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO , + KC_H, KC_J, KC_K, KC_L, KC_SCOLON , KC_NO, + KC_NO , KC_N, KC_M, KC_COMMA , KC_DOT , KC_SLASH, KC_NO , + KC_UP, KC_DOWN, KC_DELETE, KC_TILD, KC_UNDS, + + KC_NO , KC_NO , + KC_NO, + KC_NO, KC_ENTER, KC_SPACE), + + [_STREET_FIGHTER] = KEYMAP( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , DIE_1000X_LEFT, KC_UP, DIE_1000X_RIGHT, KC_NO, KC_NO , + KC_NO , KC_NO , KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO , + KC_NO , KC_NO , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + ________ , ________ , + ________ , + ________, ________, ________ , + + KC_NO, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO, KC_G, KC_H, KC_J, KC_NO, KC_NO , + KC_NO, KC_B, KC_N, KC_M, KC_K , KC_NO, + KC_NO , KC_NO, KC_NO, KC_NO , KC_NO , KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + TT(_STREET_FIGHTER) , ________ , + ________, + ________, ________, ________), + + + //************************Windows navigation to directories************************* + [_DIRNAV] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), + + + [_TEXT_MACROS] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________) + + +/* FOR FORMATTING FUTURE LAYERS + NO KEY CODES SHOULD BE MORE THAN 8 CHARACTERS + GOES LEFT HAND THEN RIGHT HAND + [_DIRNAV] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), */ + + + + }; const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(1) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case INFOQM: { - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - - case TIL_SLASH: { - if (record->event.pressed) { - SEND_STRING ("~/."); - } - break; - } - - case DEREF: { - if (record->event.pressed) { - SEND_STRING ("->"); - } - break; - } - - case EQRIGHT: { - if (record->event.pressed) { - SEND_STRING ("=>"); - } - break; - } - - case TICK3: { - if (record->event.pressed) { - SEND_STRING ("```"); - } - break; - } - - case TILD3: { - if (record->event.pressed) { - SEND_STRING ("~~~"); - } - break; - } - - case ALTTAB_START: { - register_code(KC_LALT); - layer_on(8); - } - - case ALTTAB_END: { - unregister_code(KC_LALT); - layer_off(8); - } - - - - } - return MACRO_NONE; -}; - void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); @@ -281,35 +348,51 @@ void matrix_scan_user(void) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { - case _SYMBOLS: - ergodox_right_led_1_on(); - break; - case _MOUSE: - ergodox_right_led_2_on(); - break; - case _NUMPAD: - ergodox_right_led_3_on(); - break; - case _NAV: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case 5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - case 6: - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - case 7: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - default: - break; - } + // _delay_ms(45); + switch (layer) + { + case _SYMBOLS: + ergodox_right_led_1_on(); + break; + case _MOUSE: + ergodox_right_led_2_on(); + break; + case _NUMPAD: + ergodox_right_led_3_on(); + break; + case _NAV: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case _MACROS: + //layer unused right now + break; + case _FUNCTION: + //layer unused right nowex + break; + case _APPSWITCH: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _ONESHOT: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _TEXTNAV: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case _QWERTY_KIDS: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _STREET_FIGHTER: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + default: + break; + } }; diff --git a/keyboards/ergodox_infinity/keymaps/gordon/rules.mk b/keyboards/ergodox_infinity/keymaps/gordon/rules.mk new file mode 100644 index 000000000..9a56408f8 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/gordon/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes + diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h new file mode 100644 index 000000000..d42440486 --- /dev/null +++ b/keyboards/facew/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef FACEW_CONFIG_H +#define FACEW_CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER NotActuallyWinkeyless +#define PRODUCT facew + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c new file mode 100644 index 000000000..9c255c68f --- /dev/null +++ b/keyboards/facew/facew.c @@ -0,0 +1,66 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "facew.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h new file mode 100644 index 000000000..7d949de98 --- /dev/null +++ b/keyboards/facew/facew.h @@ -0,0 +1,57 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef FACEW_H +#define FACEW_H + +#include "quantum.h" + +#define LAYOUT_all( \ + K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ + K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ + K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ + K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ + K09, K00, K39, K30, K59, K69, K57, K29\ +){ \ + { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ + { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ +} + +#define LAYOUT_60_ansi( \ + K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K60,\ + K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ + K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ + K19, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, \ + K09, K00, K39, K30, K59, K69, K57, K29\ +){ \ + { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ + { KC_NO, K11, K12, KC_NO, K14, K15, K16, KC_NO, K18, K19, KC_NO}, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, KC_NO}, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ +} + +#endif diff --git a/keyboards/facew/i2c.c b/keyboards/facew/i2c.c new file mode 100644 index 000000000..a4f952135 --- /dev/null +++ b/keyboards/facew/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +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 . +*/ + +// Please do not modify this file + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +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 . +*/ + +// Please do not modify this file + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/facew/info.json b/keyboards/facew/info.json new file mode 100644 index 000000000..3f94985b2 --- /dev/null +++ b/keyboards/facew/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "FaceW", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/facew/keymaps/default/keymap.c b/keyboards/facew/keymaps/default/keymap.c new file mode 100644 index 000000000..a237f8489 --- /dev/null +++ b/keyboards/facew/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_BSLS, KC_GRV, + 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, + MO(1), 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_NO, 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_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL + ), + [1] = LAYOUT_all( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c new file mode 100644 index 000000000..35b59e6a4 --- /dev/null +++ b/keyboards/facew/keymaps/mechmerlin/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_all( + 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_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/facew/keymaps/mechmerlin/readme.md b/keyboards/facew/keymaps/mechmerlin/readme.md new file mode 100644 index 000000000..eeb83b0a1 --- /dev/null +++ b/keyboards/facew/keymaps/mechmerlin/readme.md @@ -0,0 +1,18 @@ +MechMerlin's FaceW Sprit Edition Layout +====================== + +This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin). + +## Keyboard Notes +- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com) +- Uses ps2avru instead of ps2avrgb +- To put in reset mode hold `q` while inserting the USB cable +- Use flashing instructions from ps2avrgb QMK port + +## Keymap Notes +- Does not support any form of inswitch lighting as Merlin hates them. +- Arrow toggle switch to the right of right shift +- Reset is FN + Left Shift + R + +### Build +To build this keymap, simply run `make facew:mechmerlin` from the qmk_firmware directory. diff --git a/keyboards/facew/matrix.c b/keyboards/facew/matrix.c new file mode 100644 index 000000000..57aa36b5f --- /dev/null +++ b/keyboards/facew/matrix.c @@ -0,0 +1,106 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +#define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md new file mode 100644 index 000000000..727c04d93 --- /dev/null +++ b/keyboards/facew/readme.md @@ -0,0 +1,24 @@ +# FaceW + +A 60% no frills keyboard. + +The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs +but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It +is designed and manufactured in Korea. It originally uses BootMapperClient for programming but +can now also use QMK. + +Keyboard Maintainer: [MechMerlin](www.github.com/mechmerlin) +Hardware Supported: FaceW Sprit Edition PCB +Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1352 + +## Keyboard Notes +- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com) +- Uses ps2avru instead of ps2avrgb +- To put in reset mode hold `q` while inserting the USB cable +- When flashing, type `bootloadHID -r yourfile.hex` and wait awhile + +Make example for this keyboard (after setting up your build environment): + + make facew:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk new file mode 100644 index 000000000..77d29b332 --- /dev/null +++ b/keyboards/facew/rules.mk @@ -0,0 +1,52 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = 60_ansi diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h new file mode 100644 index 000000000..d2d848fcd --- /dev/null +++ b/keyboards/facew/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/fourier/info.json b/keyboards/fourier/info.json new file mode 100644 index 000000000..b16476c4b --- /dev/null +++ b/keyboards/fourier/info.json @@ -0,0 +1,67 @@ +{ + "keyboard_name": "Fourier", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + + {"label":"Y", "x":7, "y":0}, + {"label":"U", "x":8, "y":0}, + {"label":"I", "x":9, "y":0}, + {"label":"O", "x":10, "y":0}, + {"label":"P", "x":11, "y":0}, + {"label":"Del", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + + {"label":"Esc", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + + {"label":"H", "x":7.25, "y":1}, + {"label":"J", "x":8.25, "y":1}, + {"label":"K", "x":9.25, "y":1}, + {"label":"L", "x":10.25, "y":1}, + {"label":";", "x":11.25, "y":1}, + {"label":"Enter", "x":12.25, "y":1, "w":1.75}, + + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + + {"label":"N", "x":7.75, "y":2}, + {"label":"M", "x":8.75, "y":2}, + {"label":"<", "x":9.75, "y":2}, + {"label":">", "x":10.75, "y":2}, + {"label":"?", "x":11.75, "y":2}, + {"label":"Shift", "x":12.75, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Alt", "x":1, "y":3}, + {"label":"Gui", "x":2, "y":3}, + {"label":"Fn1", "x":3, "y":3}, + {"label":"Space", "x":4, "y":3, "w":2.25}, + + {"label":"Backspace", "x":7.25, "y":3, "w":2.25}, + {"label":"Gui", "x":9.5, "y":3}, + {"label":"Alt", "x":10.5, "y":3, "w":1.25}, + {"label":"Fn2", "x":11.75, "y":3}, + {"label":"Ctrl", "x":12.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/fourier/keymaps/valgrahf/keymap.c b/keyboards/fourier/keymaps/valgrahf/keymap.c index 93c92a68a..53ac6f4ba 100644 --- a/keyboards/fourier/keymaps/valgrahf/keymap.c +++ b/keyboards/fourier/keymaps/valgrahf/keymap.c @@ -34,7 +34,7 @@ enum custom_keycodes { #define KC_RVAD RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. TAB , Q , W , E , R , T , Y , U , I , O , P , DEL,BSPC, //|----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`-----+----+-----+-------------|--------+-----+-----+-----+------' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , , //|----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`-----+----+-----+-------------|--------+-----+-----+-----+------' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, , , //|----`----`----`----`----`----|----`----`----`----`----`----`----| diff --git a/keyboards/fourier/keymaps/xyverz/config.h b/keyboards/fourier/keymaps/xyverz/config.h new file mode 100644 index 000000000..9b46a61cc --- /dev/null +++ b/keyboards/fourier/keymaps/xyverz/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +#define EE_HANDS + +#endif diff --git a/keyboards/fourier/keymaps/xyverz/keymap.c b/keyboards/fourier/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..3dd191be5 --- /dev/null +++ b/keyboards/fourier/keymaps/xyverz/keymap.c @@ -0,0 +1,85 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_FN1 MO(_FN1) +#define KC_FN2 MO(_FN2) +#define KC_SPFN1 LT(_FN1, KC_SPACE) +#define KC_SPFN2 LT(_FN2, KC_SPACE) +#define KC_BSFN1 LT(_FN1, KC_BSPC) +#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define KC_RST RESET +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_kc( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,MINS, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + ESC , A , O , E , U , I , D , H , T , N , S , ENTER , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + CAPS ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, , , ,SCLN, , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN2] = LAYOUT_kc( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + CAPS , , ,INS ,PGUP,HOME, F1 , F2 , F3 , F4 , F5 , F6 , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + , , , , DEL , INS , , , , + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ) + +}; + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + diff --git a/keyboards/fourier/matrix.c b/keyboards/fourier/matrix.c index ed913f34b..fdeead7dc 100644 --- a/keyboards/fourier/matrix.c +++ b/keyboards/fourier/matrix.c @@ -149,7 +149,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h index 32307ece5..953172a8b 100644 --- a/keyboards/frosty_flake/frosty_flake.h +++ b/keyboards/frosty_flake/frosty_flake.h @@ -87,4 +87,20 @@ /* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ } +#define LAYOUT_tkl_ansi( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) KEYMAP_TKL( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KC_NO, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) + #endif diff --git a/keyboards/frosty_flake/rules.mk b/keyboards/frosty_flake/rules.mk index f9c43d3ed..94619e03d 100644 --- a/keyboards/frosty_flake/rules.mk +++ b/keyboards/frosty_flake/rules.mk @@ -68,4 +68,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches CUSTOM_MATRIX = yes -SRC += matrix.c \ No newline at end of file +SRC += matrix.c + +LAYOUTS = tkl_ansi diff --git a/keyboards/handwired/dactyl_manuform/matrix.c b/keyboards/handwired/dactyl_manuform/matrix.c index c3bfe8042..904850d4d 100644 --- a/keyboards/handwired/dactyl_manuform/matrix.c +++ b/keyboards/handwired/dactyl_manuform/matrix.c @@ -157,7 +157,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/hs60/config.h b/keyboards/hs60/config.h new file mode 100644 index 000000000..d37fc8990 --- /dev/null +++ b/keyboards/hs60/config.h @@ -0,0 +1,145 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0257 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT HS60 +#define DESCRIPTION GH60 compatible, tool free RGB keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { B0, B1, B2, B3, F7 } +#define MATRIX_COL_PINS { F1, F4, F5, E6, F0, B7, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS { B6, C6, C7, F6 } + +/* bootloader configuration */ + +#define QMK_ESC_OUTPUT B5 // usually COL +#define QMK_ESC_INPUT B2 // usually ROW + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* Backlight options */ + +//This is experimental do not enable yet +//#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_SKIP_FRAMES 0 + +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110101 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 30 + +#ifdef HS60_ANSI +#define DRIVER_2_LED_TOTAL 31 +#else +#define DRIVER_2_LED_TOTAL 32 +#endif + +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +#endif diff --git a/keyboards/hs60/hs60.c b/keyboards/hs60/hs60.c new file mode 100644 index 000000000..169f84b02 --- /dev/null +++ b/keyboards/hs60/hs60.c @@ -0,0 +1,496 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "hs60.h" +#include "config.h" + +// Please ignore this is for upcoming features +/*#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t command = data[0]; + switch ( command ) + { + case id_protocol_version: + { + msg_protocol_version *msg = (msg_protocol_version*)&data[1]; + msg->version = PROTOCOL_VERSION; + break; + } +#if USE_KEYMAPS_IN_EEPROM + case id_keymap_keycode_load: + { + msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1]; + msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column ); + break; + } + case id_keymap_keycode_save: + { + msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1]; + keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode); + break; + } + case id_keymap_default_save: + { + keymap_default_save(); + break; + } +#endif // USE_KEYMAPS_IN_EEPROM + case id_backlight_config_set_values: + { + msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1]; + backlight_config_set_values(msg); + backlight_config_save(); + break; + } + case id_backlight_config_set_alphas_mods: + { + msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1]; + backlight_config_set_alphas_mods( msg->alphas_mods ); + backlight_config_save(); + break; + } + case id_backlight_set_key_color: + { + msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1]; + backlight_set_key_color(msg->row, msg->column, msg->hsv); + break; + } + case id_system_get_state: + { + msg_system_state *msg = (msg_system_state*)&data[1]; + msg->value = backlight_get_tick(); + break; + } + default: + { + // Unhandled message. + data[0] = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif*/ + +#ifdef HS60_ANSI + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_6, C8_6, C7_6}, //A14 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_8, C7_7, C6_7}, //A16 + + {0, C1_9, C3_10, C4_10}, //B1 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + {0, C9_11, C8_11, C7_11}, //B11 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_14, C8_14, C7_14}, //B14 + + {1, C1_1, C3_2, C4_2}, //C1 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {1, C9_7, C8_7, C6_6}, //C15 + {1, C9_8, C7_7, C6_7}, //C16 + + {1, C1_9, C3_10, C4_10}, //D1 + //D2 + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {1, C9_13, C8_13, C7_13}, //D13 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_16, C7_15, C6_15} //D16 +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// +// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, +// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, +// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, ---, A14, +// D3, ---, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, +// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 + {{0|(12<<4)}, {204, 0}, 0}, + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{0|(7<<4)}, {119, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, + {{2|(13<<4)}, {224, 32}, 1}, + {{2|(12<<4)}, {224, 16}, 0}, + {{2|(11<<4)}, {197, 32}, 0}, + + {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 + {{3|(9<<4)}, {153, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(11<<4)}, {187, 48}, 0}, + {{3|(13<<4)}, {214, 48}, 1}, + {{4|(13<<4)}, {224, 64}, 1}, + {{4|(12<<4)}, {204, 64}, 1}, + {{4|(11<<4)}, {187, 64}, 1}, + {{4|(10<<4)}, {170, 64}, 1}, + + {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 + {{0|(5<<4)}, { 85, 0}, 0}, + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{0|(0<<4)}, { 0, 0}, 1}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(6<<4)}, {102, 32}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, + + {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 + //D2 + {{3|(0<<4)}, { 10, 48}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(3<<4)}, {102, 64}, 0}, + {{4|(2<<4)}, { 34, 68}, 1}, + {{4|(1<<4)}, { 17, 68}, 1}, + {{4|(0<<4)}, { 0, 68}, 1} +}; + +#else + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_6, C8_6, C7_6}, //A14 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_8, C7_7, C6_7}, //A16 + + {0, C1_9, C3_10, C4_10}, //B1 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + {0, C9_11, C8_11, C7_11}, //B11 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_14, C8_14, C7_14}, //B14 + + {1, C1_1, C3_2, C4_2}, //C1 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {1, C9_7, C8_7, C6_6}, //C15 + {1, C9_8, C7_7, C6_7}, //C16 + + {1, C1_9, C3_10, C4_10}, //D1 + {1, C1_10, C2_10, C4_11}, //D2 + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {1, C9_13, C8_13, C7_13}, //D13 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_16, C7_15, C6_15} //D16 +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// +// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, +// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, +// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14, +// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, +// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 + {{0|(12<<4)}, {204, 0}, 0}, + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{0|(7<<4)}, {119, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, + {{2|(13<<4)}, {224, 8}, 1}, + {{2|(12<<4)}, {204, 32}, 0}, + {{2|(11<<4)}, {187, 32}, 0}, + + {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 + {{3|(9<<4)}, {153, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(11<<4)}, {187, 48}, 0}, + {{3|(13<<4)}, {214, 48}, 1}, + {{4|(13<<4)}, {224, 64}, 1}, + {{4|(12<<4)}, {204, 64}, 1}, + {{4|(11<<4)}, {187, 64}, 1}, + {{4|(10<<4)}, {170, 64}, 1}, + + {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 + {{0|(5<<4)}, { 85, 0}, 0}, + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{0|(0<<4)}, { 0, 0}, 1}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(6<<4)}, {102, 32}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, + + {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 + {{3|(1<<4)}, { 17, 48}, 0}, + {{3|(0<<4)}, { 0, 48}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(3<<4)}, {102, 64}, 0}, + {{4|(2<<4)}, { 34, 68}, 1}, + {{4|(1<<4)}, { 17, 68}, 1}, + {{4|(0<<4)}, { 0, 68}, 1} +}; + +#endif + +void bootmagic_lite(void) +{ + // The lite version of TMK's bootmagic made by Wilba. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCING_DELAY); + matrix_scan(); + + // If the Esc and space bar are held down on power up, + // reset the EEPROM valid state and jump to bootloader. + // Assumes Esc is at [0,0] and spacebar is at [4,6]. + // This isn't very generalized, but we need something that doesn't + // rely on user's keymaps in firmware or EEPROM. + if ( ( matrix_get_row(0) & (1<<0) ) && + ( matrix_get_row(4) & (1<<6) ) ) + { + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); + //eeprom_set_valid(false); + // Jump to bootloader. + bootloader_jump(); + } +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + bootmagic_lite(); + + // Please ignore this is for upcoming features + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + /*if (eeprom_is_valid()) + { + backlight_config_load(); + + // TODO: do something to "turn on" keymaps in EEPROM? + } + else + { + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the zeal_backlight_config instance. + backlight_config_save(); + + // Clear the LED colors stored in EEPROM + for ( int row=0; row < MATRIX_ROWS; row++ ) + { + HSV hsv; + for ( int column=0; column < MATRIX_COLS; column++ ) + { + hsv.h = rand() & 0xFF; + hsv.s = rand() & 0x7F; + hsv.v = 255; + backlight_set_key_color( row, column, hsv ); + } + } + #ifdef USE_KEYMAPS_IN_EEPROM + keymap_default_save(); + #endif + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + }*/ + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + //backlight_set_indicator_state(usb_led); +} + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} \ No newline at end of file diff --git a/keyboards/hs60/hs60.h b/keyboards/hs60/hs60.h new file mode 100644 index 000000000..4de781e5f --- /dev/null +++ b/keyboards/hs60/hs60.h @@ -0,0 +1,52 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef HS60_H +#define HS60_H + +#define XXX KC_NO + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_60_iso( \ + 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, \ + 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, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { 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, XXX }, \ + { 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, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} + +#define LAYOUT_60_ansi( \ + 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, K2C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { 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, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} +#endif \ No newline at end of file diff --git a/keyboards/hs60/info.json b/keyboards/hs60/info.json new file mode 100644 index 000000000..677054cc6 --- /dev/null +++ b/keyboards/hs60/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "HS60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/hs60/keymaps/ansi/config.h b/keyboards/hs60/keymaps/ansi/config.h new file mode 100644 index 000000000..bab67fd55 --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Include overwrites for specific keymap */ + +#define HS60_ANSI + +#endif \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ansi/keymap.c b/keyboards/hs60/keymaps/ansi/keymap.c new file mode 100644 index 000000000..923af9e2c --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( /* 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi( /* FN */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , 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_TRNS, KC_TRNS,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ansi/readme.md b/keyboards/hs60/keymaps/ansi/readme.md new file mode 100644 index 000000000..fa811319d --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 +================================ + +![Layout image](https://imgur.com/CSyPw0J.png) + +Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/keymaps/default/keymap.c b/keyboards/hs60/keymaps/default/keymap.c new file mode 100644 index 000000000..2a5e82361 --- /dev/null +++ b/keyboards/hs60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso( /* 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/default/readme.md b/keyboards/hs60/keymaps/default/readme.md new file mode 100644 index 000000000..9125cb349 --- /dev/null +++ b/keyboards/hs60/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 +=============================== + +![Layout image](https://imgur.com/HXj4tYL.png) + +Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/readme.md b/keyboards/hs60/readme.md new file mode 100644 index 000000000..939b58828 --- /dev/null +++ b/keyboards/hs60/readme.md @@ -0,0 +1,18 @@ +HS60 +==== + +[HS60](https://mechboards.co.uk/wp-content/uploads/2018/04/IMG_20180420_140353.jpg) + +This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI and support full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 +Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ + +Due to the RGB implementation, the HS60 is currently not compatible with community layouts. + +Make example for this keyboard (after setting up your build environment): + + make hs60:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/hs60/rules.mk b/keyboards/hs60/rules.mk new file mode 100644 index 000000000..bff965948 --- /dev/null +++ b/keyboards/hs60/rules.mk @@ -0,0 +1,74 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# project specific files +#SRC = + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section +BOOTLOADER = qmk-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# 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) +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGB_MATRIX_ENABLE = yes # Use RGB matrix + +# Experimental features for zealcmd please do no enable +#RAW_ENABLE = yes +#USE_KEYMAPS_IN_EEPROM = yes diff --git a/keyboards/iris/info.json b/keyboards/iris/info.json index ed4528b9d..a26ffae87 100644 --- a/keyboards/iris/info.json +++ b/keyboards/iris/info.json @@ -6,7 +6,18 @@ "height": 5, "layouts": { "LAYOUT": { - "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":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4}] + "layout": [ + {"x":0, "y":0.375}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, + {"x":9, "y":0.25}, {"x":10, "y":0.125}, {"x":11, "y":0}, {"x":12, "y":0.125}, {"x":13, "y":0.375}, {"x":14, "y":0.375}, + {"x":0, "y":1.375}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, + {"x":9, "y":1.25}, {"x":10, "y":1.125}, {"x":11, "y":1}, {"x":12, "y":1.125}, {"x":13, "y":1.375}, {"x":14, "y":1.375}, + {"x":0, "y":2.375}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, + {"x":9, "y":2.25}, {"x":10, "y":2.125}, {"x":11, "y":2}, {"x":12, "y":2.125}, {"x":13, "y":2.375}, {"x":14, "y":2.375}, + {"x":0, "y":3.375}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, + {"x":6.15, "y":3.75}, {"x":7.85, "y":3.75}, + {"x":9, "y":3.25}, {"x":10, "y":3.125}, {"x":11, "y":3}, {"x":12, "y":3.125}, {"x":13, "y":3.375}, {"x":14, "y":3.375}, + {"x":3.5, "y":4.25}, {"x":4.5, "y":4.375}, {"x":5.6, "y":4.75}, {"x":8.4, "y":4.75}, {"x":9.5, "y":4.375}, {"x":10.5, "y":4.25} + ] } } } diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/iris/keymaps/drashna/config.h index 2a451e7c7..bfdd0022b 100644 --- a/keyboards/iris/keymaps/drashna/config.h +++ b/keyboards/iris/keymaps/drashna/config.h @@ -41,6 +41,8 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 #define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 + +#define RGBLIGHT_LIMIT_VAL 225 #endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index 64d074fc9..b24e5fe53 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -2,79 +2,94 @@ #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef INDICATOR_LIGHTS +extern userspace_config_t userspace_config; + +uint8_t last_mod; +uint8_t last_led; +uint8_t last_osm; +bool has_mods_changed = false; +#endif #define KC_ALAP ALT_T(KC_APP) - +#define KC_OSLG OSM(MOD_LGUI) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, - KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, - KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_LGUI, _________________QWERTY_R3_________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_COLEMAK] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS, - KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, - KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_LGUI, _________________COLEMAK_R3________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_DVORAK] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS, - KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, - KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_LGUI, _________________DVORAK_R3_________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, + KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_WORKMAN] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS, - KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, - KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_LGUI, _________________WORKMAN_R3________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, + KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), - [_MODS] = LAYOUT( + [_MODS] = LAYOUT_wrapper( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, _______, _______, _______, _______, _______, _______ ), - [_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + [_LOWER] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LPRN, KC_RPRN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, - _______, _______, KC_DEL, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT( - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_UNDS, KC_EQL , KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_END, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ + [_RAISE] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, + _______, _______, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT( - KC_MAKE, KC_RST, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), - KC_RGB_T,RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, - _______, _______, _______, _______, _______, _______ + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST, + VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, EPRM, + _______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, + TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + _______, _______, _______, _______, _______, _______ ) }; +void matrix_init_keymap(void) { +#ifdef INDICATOR_LIGHTS + last_mod = get_mods(); + last_led = host_keyboard_leds(); + last_osm =get_oneshot_mods(); +#endif +} -#ifdef INDICATOR_LIGHT uint32_t layer_state_set_keymap (uint32_t state) { +#ifdef INDICATOR_LIGHTS uint8_t modifiders = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -92,41 +107,49 @@ uint32_t layer_state_set_keymap (uint32_t state) { rgblight_sethsv_at(120, 255, 255, 7); rgblight_sethsv_at(120, 255, 255, 8); } +#endif return state; } void matrix_scan_keymap (void) { - static uint8_t current_mods; - static uint8_t current_host_leds; - static uint8_t current_oneshot_mods; - static bool has_status_changed = true; - if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) { - has_status_changed = true; - current_mods = get_mods(); - current_host_leds = host_keyboard_leds(); - current_oneshot_mods = get_oneshot_mods(); +#ifdef INDICATOR_LIGHTS + uint8_t current_mod = get_mods(); + uint8_t current_led = host_keyboard_leds(); + uint8_t current_osm =get_oneshot_mods(); + + if (last_mod == current_mod) { + last_mod = current_mod; + has_mods_changed = true; + } + if (last_led == current_led) { + last_led = current_led; + has_mods_changed = true; + } + if (last_osm == current_osm) { + last_osm = current_osm; + has_mods_changed = true; } - if (has_status_changed) { - has_status_changed = false; - if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<event.pressed) { + if (edvorakjp_config.enable_kc_lang) { + SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); + } else { + SEND_STRING( SS_LGUI("L") ); + } + } + return false; + } + return true; +} + +uint32_t layer_state_set_keymap(uint32_t state) { + switch (biton32(state)) { + case _EDVORAKJ1: + case _EDVORAKJ2: + // _EDVORAKJ1 & J2 are same colored + rgblight_setrgb (0xFF, 0xFF, 0xFF); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case _RAISE: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case _ADJUST: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + default: // for any other layers, or the default layer + rgblight_mode(28); + break; + } + return state; +} diff --git a/keyboards/iris/keymaps/edvorakjp/readme.md b/keyboards/iris/keymaps/edvorakjp/readme.md new file mode 100644 index 000000000..e5d3eab11 --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/readme.md @@ -0,0 +1,21 @@ +# edvorakjp + +Epaew's Enhanced Dvorak layout for Japanese Programmer +see [here](../../../../users/edvorakjp) for more informations. + +## License + +Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew + +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 . diff --git a/keyboards/iris/keymaps/edvorakjp/rules.mk b/keyboards/iris/keymaps/edvorakjp/rules.mk new file mode 100644 index 000000000..1c88fbc7b --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/rules.mk @@ -0,0 +1,16 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/iris/keymaps/hag/keymap.c index a708b5602..a690f8761 100644 --- a/keyboards/iris/keymaps/hag/keymap.c +++ b/keyboards/iris/keymaps/hag/keymap.c @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----+----+----' `----+----+----' ), - [_ADJUST] = KEYMAP( + [_ADJUST] = LAYOUT( //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/iris/keymaps/mtdjr/config.h b/keyboards/iris/keymaps/mtdjr/config.h new file mode 100644 index 000000000..0e8938775 --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +//#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +#define TAPPING_TERM 250 +// #define MASTER_RIGHT +// #define EE_HANDS + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/iris/keymaps/mtdjr/keymap.c b/keyboards/iris/keymaps/mtdjr/keymap.c new file mode 100644 index 000000000..ba95d16b2 --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/keymap.c @@ -0,0 +1,307 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "action_macro.h" +#include +#include "pincontrol.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _SUPER 3 +#define _ADJUST 16 +#define SOLENOID_DEFAULT_DWELL 12 +#define SOLENOID_MAX_DWELL 100 +#define SOLENOID_MIN_DWELL 4 +#define SOLENOID_PIN C6 + + +bool solenoid_enabled = false; +bool solenoid_on = false; +bool solenoid_buzz = false; +bool solenoid_buzzing = false; +uint16_t solenoid_start = 0; +uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; + + +void solenoid_buzz_on(void) { + solenoid_buzz = true; +} + +void solenoid_buzz_off(void) { + solenoid_buzz = false; +} + +void solenoid_dwell_minus(void) { + if (solenoid_dwell > 0) solenoid_dwell--; +} + +void solenoid_dwell_plus(void) { + if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; +} + +void solenoid_toggle(void) { + solenoid_enabled = !solenoid_enabled; +} + +void solenoid_stop(void) { + digitalWrite(SOLENOID_PIN, PinLevelLow); + solenoid_on = false; + solenoid_buzzing = false; +} + +void solenoid_fire(void) { + if (!solenoid_enabled) return; + + if (!solenoid_buzz && solenoid_on) return; + if (solenoid_buzz && solenoid_buzzing) return; + + solenoid_on = true; + solenoid_buzzing = true; + solenoid_start = timer_read(); + digitalWrite(SOLENOID_PIN, PinLevelHigh); +} + +void solenoid_check(void) { + uint16_t elapsed = 0; + + if (!solenoid_on) return; + + elapsed = timer_elapsed(solenoid_start); + + //Check if it's time to finish this solenoid click cycle + if (elapsed > solenoid_dwell) { + solenoid_stop(); + return; + } + + //Check whether to buzz the solenoid on and off + if (solenoid_buzz) { + if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ + if (!solenoid_buzzing) { + solenoid_buzzing = true; + digitalWrite(SOLENOID_PIN, PinLevelHigh); + } + } + else { + if (solenoid_buzzing) { + solenoid_buzzing = false; + digitalWrite(SOLENOID_PIN, PinLevelLow); + } + } + } +} + +void solenoid_setup(void) { + pinMode(SOLENOID_PIN, PinDirectionOutput); +} + +void matrix_init_user(void) { + solenoid_setup(); +} + +void matrix_scan_user(void) { + solenoid_check(); +} + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + SUPER, + ADJUST, + SOL_TOG, + SOLENOID_DWELL_MINUS, + SOLENOID_DWELL_PLUS, + SOLENOID_BUZZ_ON, + SOLENOID_BUZZ_OFF, + TD_ESC = 0, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_SUPR SUPER +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_EXC TD(TD_ESC) +#define SOLTOG SOLENOID_TOG + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_PSEF M(2) +#define KC_XCPY M(3) +#define KC_XINS M(4) +#define UM_CAD M(5) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + EXC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + EQL, Z , X , C , V , B ,LGUI, LALT, N , M ,COMM,DOT ,SLSH,MINS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LCTL,RASE,SPC , SPC ,LOWR,SUPR + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , ,LCBR,RCBR,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , UP , , ,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , ,HOME, ,END , ,EQL , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , , , , ,LBRC,RBRC,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F5 , F6 , F7 , F8 , , , , , , ,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F9 ,F10 ,F11 ,F12 , , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , ,XCPY,XINS, , , , , , , , ,PLUS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_SUPER] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + SOL_TOG, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UM_CAD , + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for grave accent, twice for ESC + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_ESC) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + solenoid_fire(); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case SUPER: + if (record->event.pressed) { + layer_on(_SUPER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_SUPER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case SOLTOG: + if (record->event.pressed) { + solenoid_toggle(); + } + break; + case SOLENOID_DWELL_MINUS: + if (record->event.pressed) { + solenoid_dwell_minus(); + } + break; + case SOLENOID_DWELL_PLUS: + if (record->event.pressed) { + solenoid_dwell_plus(); + } + break; + case SOLENOID_BUZZ_ON: + if (record->event.pressed) { + solenoid_buzz_on(); + } + break; + case SOLENOID_BUZZ_OFF: + if (record->event.pressed) { + solenoid_buzz_off(); + } + break; + } + return true; +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + case 3: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 4: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 5: + return MACRO(D(LCTL), D(RALT), T(DEL), END); + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/iris/keymaps/mtdjr/rules.mk new file mode 100644 index 000000000..7c19013e5 --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no +TAP_DANCE_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/iris/keymaps/swedish/keymap.c index 70699bce1..015e26aec 100644 --- a/keyboards/iris/keymaps/swedish/keymap.c +++ b/keyboards/iris/keymaps/swedish/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----+----+----' `----+----+----' ), - [_LOWER] = KEYMAP( + [_LOWER] = LAYOUT( //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `-------+-------+-------' `-------+-------+-------' ), - [_RAISE] = KEYMAP( + [_RAISE] = LAYOUT( //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/iris/keymaps/transmogrified/keymap.c index 714b826ac..43d6cc600 100644 --- a/keyboards/iris/keymaps/transmogrified/keymap.c +++ b/keyboards/iris/keymaps/transmogrified/keymap.c @@ -27,6 +27,8 @@ enum custom_keycodes { ONEHANDL, RLAYER, LLAYER, + RLOCK, + LLOCK, DUAL, CONFIG, }; @@ -44,13 +46,15 @@ enum { /* LAYERS */ #define KC_LLAY LLAYER #define KC_RLAY RLAYER +#define KC_RLOK RLOCK +#define KC_LLOK LLOCK #define KC_QWER QWERTY #define KC_DVOR DVORAK #define KC_COLE COLEMAK #define KC_ONER ONEHANDR #define KC_ONEL ONEHANDL #define KC_DUAL DUAL -#define KC_CONF OSL(_CONFIG) +#define KC_CONF CONFIG /* Custom Shortened Keys */ #define KC_MCTB LCTL(KC_TAB) @@ -71,7 +75,7 @@ enum { #define KC_BLUP BL_INC #define KC_BLDN BL_DEC #define KC_SYSR KC_SYSREQ -#define KC_FLASH RESET +#define KC_REST RESET /* Tap Dance */ #define KC_LGUA TD(TD_LGUIAPP) @@ -82,13 +86,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| CTEC, A , S , D , F , G , H , J , K , L ,SCLN,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL, Z , X , C , V , B ,XXXX, XXXX, N , M ,COMM,DOT ,SLSH,RSFT, + SHCL, Z , X , C , V , B ,LLOK, RLOK, N , M ,COMM,DOT ,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -96,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_COLEMAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| - CTEC, A , R , S , T , D , H , N , E , I ,SCLN,ENT , + CTEC, A , R , S , T , D , H , N , E , I , O ,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL, Z , X , C , V , B ,XXXX, XXXX, K , M ,COMM,DOT ,SLSH,RSFT, + SHCL, Z , X , C , V , B ,LLOK, RLOK, K , M ,COMM,DOT ,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -110,13 +114,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, //|----+----+----+----+----+----| |----+----+----+----+----+----| CTEC, A , O , E , U , I , D , H , T , N , S ,ENT , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SHCL,SCLN, Q , J , K , X ,XXXX, XXXX, B , M , W , V , Z ,EQL , + SHCL,SCLN, Q , J , K , X ,LLOK, RLOK, B , M , W , V , Z ,EQL , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LALT,LLAY,TAB , SPC ,RLAY,LGUA // `----+----+----' `----+----+----' @@ -138,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ONEHANDL] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,LEAD, + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, T , R , E , W , Q ,TAB , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -152,14 +156,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RLAYER] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,XXXX,XXXX,XXXX,XXXX,XXXX, MUTE,VOLD,VOLU,BLDN,BLUP, , + ,SLCK,SYSR,PSCR,INS ,PAUS, MUTE,VOLD,VOLU,BLDN,BLUP, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,TILD,GRV ,EQL ,LBRC,RBRC, PGUP,ASTR, UP ,AMPR,CIRC, , + ,TILD,GRV ,EQL ,LBRC,RBRC, ASTR,HOME, UP ,PGUP,PLUS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,EXLM,PIPE,DLR ,LPRN,RPRN, HOME,LEFT,DOWN,RGHT,END ,QUOT, + ,EXLM,PIPE,DLR ,LPRN,RPRN, AMPR,LEFT,DOWN,RGHT,MINS,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , AT ,HASH,PERC,LCBR,RCBR,LGUI, ,PGDN,UNDS,MINS,PLUS,BSLS, , - //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , AT ,HASH,PERC,LCBR,RCBR, , ,CIRC,END ,UNDS,PGDN,BSLS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' ), @@ -172,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,XXXX,MCST,DOWN,MCTB,ENT , SLSH, 4 , 5 , 6 ,MINS, , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,XXXX,XXXX,BSPC,SPC ,SINS,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , , + ,XXXX,XXXX,BSPC,SINS,SPC ,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , 0 , , // `----+----+----' `----+----+----' @@ -180,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DUAL] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,XXXX,XXXX,PSCR,INS ,XXXX, XXXX,SLEP,SLCK,PAUS,SYSR,XXXX, + ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,MS_U,XXXX,XXXX,MCAD, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -194,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_CONFIG] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - FLASH,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, + REST,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| XXXX,QWER,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,ONER,XXXX,XXXX, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -237,6 +241,11 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +/* Variables for layer light toggling */ +static uint16_t currentBL = 0; +static uint16_t rlocked = 0; +static uint16_t llocked = 0; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -263,14 +272,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CONFIG: + if (record->event.pressed) { + set_single_persistent_default_layer(_CONFIG); + backlight_toggle(); + } + return false; + break; case RLAYER: if (record->event.pressed) { layer_on(_RLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + /* add logic to toggle backlight change when on a layer */ + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } } else { unregister_code(KC_LGUI); + rlocked = 0; layer_off(_RLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + if ( llocked == 0 ) { + backlight_set(currentBL); + } else { + } } return false; break; @@ -278,9 +306,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { layer_on(_LLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + /* add logic to toggle backlight change when on a layer */ + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } } else { + llocked = 0; layer_off(_LLAYER); update_tri_layer(_RLAYER, _LLAYER, _DUAL); + if ( rlocked == 0 ) { + backlight_set(currentBL); + } else { + } + } + return false; + break; + case RLOCK: + if (record->event.pressed) { + layer_on(_RLAYER); + /* add logic to toggle backlight change when on a layer */ + rlocked = 1; + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } + } else { + } + return false; + break; + case LLOCK: + if (record->event.pressed) { + layer_on(_LLAYER); + /* add logic to toggle backlight change when on a layer */ + llocked = 1; + currentBL = get_backlight_level(); + if ( currentBL == 0 || currentBL == 1 ) { + backlight_set(5); + } else { + backlight_set(0); + } + } else { } return false; break; diff --git a/keyboards/iris/keymaps/xyverz/config.h b/keyboards/iris/keymaps/xyverz/config.h new file mode 100644 index 000000000..0c61a8eac --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#define USE_SERIAL +#define EE_HANDS + +#define PREVENT_STUCK_MODIFIERS + +#undef PRODUCT +#define PRODUCT Iris Keyboard + +#undef MANUFACTURER +#define MANUFACTURER Ian Sterling + +#undef DESCRIPTION +#define DESCRIPTION A column-staggered split ortholinear keyboard + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/iris/keymaps/xyverz/keymap.c b/keyboards/iris/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..c1a066b68 --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_____ KC_TRNS +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_QWRT QWERTY +#define KC_CLMK COLEMAK +#define KC_DVRK DVORAK +#define KC_BSLT ALT_T(KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc ( + EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, + ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + LSFT, Z , X , C , V , B ,LOWR, RASE, N , M ,COMM,DOT ,SLSH,RSFT, + LCTL,BSPC,LGUI, ENT ,SPC ,LALT + ), + + [_COLEMAK] = LAYOUT_kc ( + EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC, + ESC , A , R , S , T , D , H , N , E , I , O ,QUOT, + LSFT, Z , X , C , V , B ,LOWR, RASE, K , M ,COMM,DOT ,SLSH,RSFT, + LCTL,BSPC,LGUI, ENT ,SPC ,LALT + ), + + [_DVORAK] = LAYOUT_kc ( + LBRC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,RBRC, + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, + ESC , A , O , E , U , I , D , H , T , N , S ,MINS, + LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, + LCTL,BSLT,LGUI, ENT ,SPC ,LALT + ), + + [_LOWER] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + TILD,____,____, UP ,____,____, ____,____,____,____,____,____, + CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,UNDS,PLUS,LCBR,RCBR,PIPE, + BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____, + ____,DEL ,____, ____,INS ,____ + ), + + [_RAISE] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + GRV ,____,____, UP ,____,____, ____,____,____,____,____,____, + CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,MINS,EQL ,LBRC,RBRC,BSLS, + BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____, + ____,DEL ,____, ____,INS ,____ + ), + + [_ADJUST] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + ____,RST ,____,____,____,____, ____,____,____,____,____,____, + ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,____,____, + ____,____,____,____,____,____,____, ____,____,____,____,____,____,____, + ____,____,____, ____,____,____ + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/xyverz/rules.mk b/keyboards/iris/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..d7463419b --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/iris/matrix.c b/keyboards/iris/matrix.c index dcfc0216e..217264f26 100644 --- a/keyboards/iris/matrix.c +++ b/keyboards/iris/matrix.c @@ -30,7 +30,11 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#include "backlight.h" + +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef USE_I2C # include "i2c.h" @@ -86,7 +90,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static void select_col(uint8_t col); #endif - __attribute__ ((weak)) void matrix_init_kb(void) { matrix_init_user(); @@ -150,7 +153,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else @@ -202,7 +204,7 @@ int i2c_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - err = i2c_master_write(get_backlight_level()); + err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); #else // Write zero, so our byte index is the same err = i2c_master_write(0x00); @@ -244,7 +246,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; #endif return 0; } diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/iris/rev1/rev1.c index 609c479eb..3fdfaa94b 100644 --- a/keyboards/iris/rev1/rev1.c +++ b/keyboards/iris/rev1/rev1.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/iris/rev1_led/rev1_led.c index 7a4c87488..681625f4b 100644 --- a/keyboards/iris/rev1_led/rev1_led.c +++ b/keyboards/iris/rev1_led/rev1_led.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/iris/rev2/rev2.c index fb53f283e..133fce66a 100644 --- a/keyboards/iris/rev2/rev2.c +++ b/keyboards/iris/rev2/rev2.c @@ -20,3 +20,23 @@ void matrix_init_kb(void) { matrix_init_user(); }; + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, +}; +#endif + diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h index 0000bc7ed..3ed6149f0 100644 --- a/keyboards/jd40/jd40.h +++ b/keyboards/jd40/jd40.h @@ -4,7 +4,7 @@ #include "quantum.h" #include "led.h" -/* GH60 LEDs +/* GH60 LEDs * GPIO pads * 0 F7 WASD LEDs * 1 F6 ESC LED @@ -13,7 +13,7 @@ * B2 Capslock LED * B0 not connected */ - + /* inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } @@ -30,7 +30,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } /* JD40 MKII keymap definition macro */ -#define LAYOUT( \ +#define LAYOUT_kc( \ 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, \ @@ -42,4 +42,16 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } { KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_NO, KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_NO } \ } +#define LAYOUT( \ + 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, K40, K41, K42, K43, K44 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, KC_NO }, \ + { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, KC_NO }, \ + { K35, K36, K37, K38, K39, KC_NO, K40, K41, K42, K43, K44, KC_NO } \ +} + #endif diff --git a/keyboards/jd40/keymaps/default/keymap.c b/keyboards/jd40/keymaps/default/keymap.c index b8cff95ac..b4ec05505 100644 --- a/keyboards/jd40/keymaps/default/keymap.c +++ b/keyboards/jd40/keymaps/default/keymap.c @@ -7,25 +7,25 @@ #define _UL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT( + [_BL] = LAYOUT_kc( F12, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, ENT, LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT, LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT), - [_AL] = LAYOUT( + [_AL] = LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL, CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT, TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END), - [_FL] = LAYOUT( + [_FL] = LAYOUT_kc( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - [_UL] = LAYOUT( + [_UL] = LAYOUT_kc( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN4, FN5, FN11, FN10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, diff --git a/keyboards/jj40/jj40.h b/keyboards/jj40/jj40.h index 44d8b0f37..bb7068fdc 100644 --- a/keyboards/jj40/jj40.h +++ b/keyboards/jj40/jj40.h @@ -67,6 +67,28 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ } +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + KEYMAP_GRID( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + + #define KEYMAP KEYMAP_MIT +#define LAYOUT_ortho_4x12 KEYMAP_GRID + +#define LAYOUT_2U_space KEYMAP_MIT +#define LAYOUT_planck_mit KEYMAP_MIT + +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP + #endif diff --git a/keyboards/jj40/keymaps/ajp10304/jj40.h b/keyboards/jj40/keymaps/ajp10304/jj40.h deleted file mode 100644 index a6162d9c0..000000000 --- a/keyboards/jj40/keymaps/ajp10304/jj40.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" -// #include "keycode.h" -// #include "action.h" - -#define KEYMAP_GRID( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_MIT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_OFFSET( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ -} - -#define KEYMAP KEYMAP_GRID -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid - -#endif diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c index b6d4d7b55..c0d0062c7 100644 --- a/keyboards/jj40/keymaps/ajp10304/keymap.c +++ b/keyboards/jj40/keymaps/ajp10304/keymap.c @@ -1,6 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "keymap_uk.h" extern keymap_config_t keymap_config; @@ -54,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP(\ +[_QWERTY] = LAYOUT_ortho_4x12(\ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,\ MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,\ KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,\ @@ -72,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = KEYMAP(\ +[_FUNC] = LAYOUT_ortho_4x12(\ 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,\ KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\ @@ -90,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP(\ +[_LOWER] = LAYOUT_ortho_4x12(\ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,\ LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,\ KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\ @@ -108,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Mouse| | | | | Alt | Enter|Raise | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP(\ +[_RAISE] = LAYOUT_ortho_4x12(\ KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,\ KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,\ _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,\ @@ -126,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP(\ +[_ADJUST] = LAYOUT_ortho_4x12(\ M(0), RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\ KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\ TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\ @@ -144,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_MOUSE] = KEYMAP(\ +[_MOUSE] = LAYOUT_ortho_4x12(\ KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______,\ KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______,\ @@ -162,42 +160,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC2] = KEYMAP(\ +[_FUNC2] = LAYOUT_ortho_4x12(\ _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,\ _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,\ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98), \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_MAC]= KEYMAP(\ +[_MAC]= LAYOUT_ortho_4x12(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 \ ), -[_MLWR] = KEYMAP(\ +[_MLWR] = LAYOUT_ortho_4x12(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_MRSE] = KEYMAP(\ +[_MRSE] = LAYOUT_ortho_4x12(\ _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,\ _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_MFNC]= KEYMAP(\ +[_MFNC]= LAYOUT_ortho_4x12(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_MFNC2] = KEYMAP(\ +[_MFNC2] = LAYOUT_ortho_4x12(\ _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,\ _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,\ _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99), \ diff --git a/keyboards/jj40/keymaps/cockpit/keymap.c b/keyboards/jj40/keymaps/cockpit/keymap.c index e8534b63d..02deaaa8e 100644 --- a/keyboards/jj40/keymaps/cockpit/keymap.c +++ b/keyboards/jj40/keymaps/cockpit/keymap.c @@ -1,5 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #define LT_1 RALT(KC_1) #define LT_2 RALT(KC_2) @@ -64,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Fn | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_2U_space( \ KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -86,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | Alt |Lower|| Space | | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_2U_space( \ KC_GRV, LT_A_OG, LT_C_CA, LT_E_OG, LT_E_DO, LT_I_OG, LT_S_CA, LT_U_OG, LT_U_MA, LT_Z_CA, KC_MINS, KC_BSPC, \ KC_TAB, LT_EXLM, LT_AT, LT_HASH, LT_DLR, LT_PERC, LT_CIRC, LT_AMPR, LT_ASTR, KC_LPRN, KC_RPRN, KC_DEL , \ KC_LSFT, KC_PEQL, KC_PPLS, KC_PMNS, KC_PIPE, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KC_INS , \ @@ -108,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | Alt | | Space |Raise|| Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_2U_space( \ KC_GRV, LT_1, LT_2, LT_3, LT_4, LT_5, LT_6, LT_7, LT_8, LT_9, LT_0, KC_BSPC, \ KC_TAB, LT_4, LT_5, LT_6, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, \ KC_LSFT, LT_7, LT_8, LT_9, LT_0, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -131,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl |||Fn||| Mode | Alt | | Space |MPrev |MStop |MNext |MPlay | Lock | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = KEYMAP( \ +[_FUNC] = LAYOUT_2U_space( \ 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \ KC_LSFT, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \ diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/jj40/keymaps/default/keymap.c index 70c73c966..1db887bd0 100644 --- a/keyboards/jj40/keymaps/default/keymap.c +++ b/keyboards/jj40/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "jj40.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H + #define _QWERTY 0 #define _LOWER 1 @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_2U_space( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_2U_space( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_2U_space( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ diff --git a/keyboards/jj40/keymaps/fun40/jj40.h b/keyboards/jj40/keymaps/fun40/jj40.h deleted file mode 100644 index a6162d9c0..000000000 --- a/keyboards/jj40/keymaps/fun40/jj40.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" -// #include "keycode.h" -// #include "action.h" - -#define KEYMAP_GRID( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_MIT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_OFFSET( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ -} - -#define KEYMAP KEYMAP_GRID -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid - -#endif diff --git a/keyboards/jj40/keymaps/fun40/keymap.c b/keyboards/jj40/keymaps/fun40/keymap.c index d6fcfe7c2..bbe6279e3 100644 --- a/keyboards/jj40/keymaps/fun40/keymap.c +++ b/keyboards/jj40/keymaps/fun40/keymap.c @@ -1,9 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _LOWER 1 @@ -31,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Del | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_ortho_4x12( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ @@ -49,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | nkro | Alt | NKRO |Lower | PgDn | PgUp |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_ortho_4x12( \ 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, \ KC_LSFT, KC_PSCR, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, _______, _______, BL_ON, BL_STEP, KC_ENT, \ @@ -67,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | Alt | |Lower | | |Raise | 0 | | Home | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_ortho_4x12( \ KC_CAPS, KC_MINS, KC_PLUS, KC_EQL, KC_LPRN, KC_RPRN, _______, KC_7, KC_8, KC_9, KC_BSPC, KC_DEL, \ KC_LOCK, KC_TILD, KC_UNDS, _______,KC_LBRC, KC_RBRC, _______, KC_4, KC_5, KC_6, _______, _______, \ KC_INS, KC_GRV, KC_BSLS, KC_PIPE, KC_LCBR, KC_RCBR, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \ diff --git a/keyboards/jj40/keymaps/krusli/keymap.c b/keyboards/jj40/keymaps/krusli/keymap.c index 2e6e9a76e..73dd0b287 100644 --- a/keyboards/jj40/keymaps/krusli/keymap.c +++ b/keyboards/jj40/keymaps/krusli/keymap.c @@ -1,5 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _LOWER 1 @@ -36,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT_2U_space( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -54,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play | | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT_2U_space( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \ @@ -72,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Prev | Play | Next | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT_2U_space( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \ @@ -90,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Qwerty| 0 | . | . |Enter |Enter | | | | | | * `-----------------------------------------------------------------------------------' */ - [_NUMPAD] = KEYMAP( \ + [_NUMPAD] = LAYOUT_2U_space( \ KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \ KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \ _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/jj40/keymaps/oscillope/keymap.c index d4bca0e49..710fa16f7 100644 --- a/keyboards/jj40/keymaps/oscillope/keymap.c +++ b/keyboards/jj40/keymaps/oscillope/keymap.c @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "jj40.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef KEYMAP #undef KEYMAP diff --git a/keyboards/jj40/keymaps/suzuken/jj40.h b/keyboards/jj40/keymaps/suzuken/jj40.h deleted file mode 100644 index a6162d9c0..000000000 --- a/keyboards/jj40/keymaps/suzuken/jj40.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" -// #include "keycode.h" -// #include "action.h" - -#define KEYMAP_GRID( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_MIT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_OFFSET( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ -} - -#define KEYMAP KEYMAP_GRID -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid - -#endif diff --git a/keyboards/jj40/keymaps/suzuken/keymap.c b/keyboards/jj40/keymaps/suzuken/keymap.c index 10288ac8a..269e26cd7 100644 --- a/keyboards/jj40/keymaps/suzuken/keymap.c +++ b/keyboards/jj40/keymaps/suzuken/keymap.c @@ -1,5 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H enum jj40_layers { _QWERTY, @@ -27,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn | Ctrl | Alt | GUI |Space |Lower |Raise |Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ @@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_PIPE, \ @@ -63,13 +62,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_BSLS, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - + /* Functions * Note: Terminal uses Calculator shortcut, change your OS keyboard shortcut appropriately. * ,-----------------------------------------------------------------------------------. @@ -86,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |||Fn||| Mode | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = KEYMAP( \ +[_FUNC] = LAYOUT_ortho_4x12( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \ _______, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \ diff --git a/keyboards/jj40/keymaps/waples/jj40.h b/keyboards/jj40/keymaps/waples/jj40.h deleted file mode 100644 index a6162d9c0..000000000 --- a/keyboards/jj40/keymaps/waples/jj40.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" -// #include "keycode.h" -// #include "action.h" - -#define KEYMAP_GRID( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_MIT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \ -} - -#define KEYMAP_OFFSET( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ -) \ -{ \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ -} - -#define KEYMAP KEYMAP_GRID -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid - -#endif diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/jj40/keymaps/waples/keymap.c index a8f2f631a..81416f982 100644 --- a/keyboards/jj40/keymaps/waples/keymap.c +++ b/keyboards/jj40/keymaps/waples/keymap.c @@ -1,6 +1,4 @@ -#include "jj40.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -28,42 +26,42 @@ enum jj40_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ KC_PSCR, KC_BSPC, KC_LALT, _______, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -[_DVORAK] = KEYMAP( \ +[_DVORAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \ KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), -[_GAME] = KEYMAP( \ +[_GAME] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \ CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \ KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), -[_LEFTY] = KEYMAP( \ +[_LEFTY] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), -[_RIGHTY] = KEYMAP( \ +[_RIGHTY] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, _______, KC_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______, \ _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \ ), -[_DUAL] = KEYMAP( \ +[_DUAL] = LAYOUT_ortho_4x12( \ RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, BL_BRTG, RESET, \ _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, BL_TOGG, _______, \ _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \ diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 42b3d1155..4e6f62617 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -56,3 +56,5 @@ SRC = matrix.c i2c.c backlight.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = ortho_4x12 planck_mit planck_grid diff --git a/keyboards/kbd66/info.json b/keyboards/kbd66/info.json index c242abb9f..339be95e7 100644 --- a/keyboards/kbd66/info.json +++ b/keyboards/kbd66/info.json @@ -1,84 +1,12 @@ { - "keyboard_name": "kbd66", + "keyboard_name": "KBD66", "url": "", "maintainer": "qmk", "width": 16.5, "height": 5, "layouts": { - "LAYOUT": { - "layout": [ - { "label": "~", "x": 0, "y": 0 }, - { "label": "!", "x": 1, "y": 0 }, - { "label": "@", "x": 2, "y": 0 }, - { "label": "#", "x": 3, "y": 0 }, - { "label": "$", "x": 4, "y": 0 }, - { "label": "%", "x": 5, "y": 0 }, - { "label": "^", "x": 6, "y": 0 }, - { "label": "&", "x": 7, "y": 0 }, - { "label": "*", "x": 8, "y": 0 }, - { "label": "(", "x": 9, "y": 0 }, - { "label": ")", "x": 10, "y": 0 }, - { "label": "_", "x": 11, "y": 0 }, - { "label": "+", "x": 12, "y": 0 }, - { "label": "Bkspc", "x": 13, "y": 0 }, - { "label": "Bkspc", "x": 14, "y": 0 }, - { "x": 15.5, "y": 0 }, - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "{", "x": 11.5, "y": 1 }, - { "label": "}", "x": 12.5, "y": 1 }, - { "label": "|", "x": 13.5, "y": 1, "w": 1.5 }, - { "x": 15.5, "y": 1 }, - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ":", "x": 10.75, "y": 2 }, - { "label": "\"", "x": 11.75, "y": 2 }, - { "x": 12.75, "y": 2 }, - { "label": "Enter", "x": 13.75, "y": 2, "w": 1.25 }, - { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, - { "x": 1.25, "y": 3 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": "<", "x": 9.25, "y": 3 }, - { "label": ">", "x": 10.25, "y": 3 }, - { "label": "?", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.25 }, - { "label": "Fn", "x": 13.5, "y": 3 }, - { "label": "Up", "x": 14.5, "y": 3 }, - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.5 }, - { "label": "Win", "x": 1.5, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.75, "y": 4, "w": 1.25 }, - { "x": 4, "y": 4, "w": 2.75 }, - { "x": 6.75, "y": 4, "w": 2.75 }, - { "label": "Alt", "x": 9.5, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 10.75, "y": 4, "w": 1.25 }, - { "label": "Menu", "x": 12, "y": 4, "w": 1.5 }, - { "label": "Left", "x": 13.5, "y": 4 }, - { "label": "Down", "x": 14.5, "y": 4 }, - { "label": "Right", "x": 15.5, "y": 4 } - ] - } + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.25}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":2.75}, {"x":6.75, "y":4, "w":2.75}, {"label":"Alt", "x":9.5, "y":4, "w":1.5}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] + } } -} +} \ No newline at end of file diff --git a/keyboards/kbd66/kbd66.h b/keyboards/kbd66/kbd66.h index 784e8e493..6a4b99ec4 100644 --- a/keyboards/kbd66/kbd66.h +++ b/keyboards/kbd66/kbd66.h @@ -19,7 +19,7 @@ #include "quantum.h" // This a shortcut to help you visually see your layout. -#define LAYOUT( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D,k0E, k0F, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ diff --git a/keyboards/kbd66/keymaps/ansi/keymap.c b/keyboards/kbd66/keymaps/ansi/keymap.c index 253d8d5db..f2275d9f6 100644 --- a/keyboards/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbd66/keymaps/ansi/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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, XXXXX, KC_BSPC, KC_INS, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = LAYOUT_all( 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/default/keymap.c b/keyboards/kbd66/keymaps/default/keymap.c index 3e8a90ee5..6a4c0b57f 100644 --- a/keyboards/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbd66/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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_GRV, KC_BSPC, KC_INS, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = LAYOUT_all( 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/iso/keymap.c b/keyboards/kbd66/keymaps/iso/keymap.c index 6b9b7ac4d..4e3040984 100644 --- a/keyboards/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbd66/keymaps/iso/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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_GRV, KC_BSPC, KC_INS, 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_NUHS, KC_DEL, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = LAYOUT_all( 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/maartenwut/keymap.c b/keyboards/kbd66/keymaps/maartenwut/keymap.c index da438022e..daeb93477 100755 --- a/keyboards/kbd66/keymaps/maartenwut/keymap.c +++ b/keyboards/kbd66/keymaps/maartenwut/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Main Layer -[_MA] = LAYOUT( +[_MA] = LAYOUT_all( 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_MPLY, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, SPACE, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), //Function Layer -[_FL] = LAYOUT( +[_FL] = LAYOUT_all( 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, TRNS, RESET, KC_PSCR, TRNS, ______, ______, ______, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, TRNS, ______, ______, ______, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, KC_PGDN, ______), //Arrow keys layer (space bar) -[_AR] = LAYOUT( +[_AR] = LAYOUT_all( 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, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), //Game layer (fn + g) -[_GA] = LAYOUT( +[_GA] = LAYOUT_all( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbd8x/kbd8x.c index 51e785241..af7ab7a07 100644 --- a/keyboards/kbd8x/kbd8x.c +++ b/keyboards/kbd8x/kbd8x.c @@ -39,5 +39,26 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if(usb_led & (1<. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c new file mode 100644 index 000000000..6e3950e50 --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2017 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + 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_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RESET, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbd8x/keymaps/default_backlighting/readme.md b/keyboards/kbd8x/keymaps/default_backlighting/readme.md new file mode 100644 index 000000000..773a3dfba --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/readme.md @@ -0,0 +1,3 @@ +# The default keymap for kbd8x + +This keymap uses the LAYOUT_all macro when creating its keymap. \ No newline at end of file diff --git a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk new file mode 100644 index 000000000..e806a1ca5 --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk @@ -0,0 +1,17 @@ +#Build Options + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/kc60/kc60.h b/keyboards/kc60/kc60.h index 227d1f130..b8e16c0b3 100644 --- a/keyboards/kc60/kc60.h +++ b/keyboards/kc60/kc60.h @@ -41,9 +41,9 @@ * |-----------------------------------------------------------------------------------------+ * | K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | * |-----------------------------------------------------------------------------------------+ - * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2C | + * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2D | * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | + * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | * |-----------------------------------------------------------------------------------------+ * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | * `-----------------------------------------------------------------------------------------' @@ -52,15 +52,15 @@ #define LAYOUT_60_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ - { 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, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ + { 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, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } /* Mini Lshift diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index 4834659ae..f28e441b0 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FNCAPS 1 diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index 93b3adae2..10e00650d 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN 1 diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index 2736745f2..045ab810f 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Basic QWERTY */ diff --git a/keyboards/kc60/keymaps/mechmerlin/keymap.c b/keyboards/kc60/keymaps/mechmerlin/keymap.c deleted file mode 100644 index d27493e16..000000000 --- a/keyboards/kc60/keymaps/mechmerlin/keymap.c +++ /dev/null @@ -1,61 +0,0 @@ -// This is the 60% layout preferred by u/merlin36 the host of the MechMerlin YouTube channel. -// The layout is highly influenced by the WKL B.Face and KBP V60 standard layouts. -// Layout designed for use on KC60 with no inswitch or underglow lighting. - -#include "kc60.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Basic QWERTY */ - KC_ESC, 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_LCTL, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(2), KC_RALT, KC_RGUI, KC_RCTL \ - ), - [1] = LAYOUT( /* HHKB-ish Base Layout */ - KC_ESC, 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_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_DEL, \ - 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_NO, KC_ENT, \ - 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_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(3), KC_RALT, KC_RGUI, KC_RCTL \ - ), - [2] = LAYOUT( /* FN Layer 1 - Basic QWERTY */ - 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_DEL, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_NO, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, TG(4), KC_NO, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ - ), - [3] = LAYOUT( /* FN Layer 2 - HHKB-ish Base Layout */ - 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_INS, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [4] = LAYOUT( /* Arrow Layers - Basic QWERTY ONLY */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT \ - ), - [5] = LAYOUT( /* Blank Layer for later usage */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - return MACRO_NONE; -}; diff --git a/keyboards/kc60/keymaps/mechmerlin/readme.md b/keyboards/kc60/keymaps/mechmerlin/readme.md deleted file mode 100644 index 3a67ab17f..000000000 --- a/keyboards/kc60/keymaps/mechmerlin/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -MechMerlin's KC60 Layout -====================== - -This is the 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. -It has 5 layers, base QWERTY, base HHKB, FN 1, FN 2(HHKB), and an arrows only layer. - -Merlin's KC60 was acquired from Massdrop: https://www.massdrop.com/buy/kc60-mechanical-keyboard and is the Co-Star stabilizer version - -If you would like to program your KC60 using the manufacturer recommended approach, please follow the guide on keychatter: https://www.keychatter.com/2015/07/05/programming-the-kc60/. - -## Keymap Notes -- Highly influenced by the KBP V60 and WKL B.Face standard layouts -- Does not support any form of inswitch or underglow lighting as Merlin hates them. -- Arrow toggle switch is FN + Space -- Reset is FN + R -- HHKB keymap is approximate as keyboard is not built like HHKB - - -### Build -To build this keymap, simply run `make KEYMAP=mechmerlin`. diff --git a/keyboards/kc60/keymaps/sgoodwin/keymap.c b/keyboards/kc60/keymaps/sgoodwin/keymap.c index fc7d6c844..25870d0a7 100644 --- a/keyboards/kc60/keymaps/sgoodwin/keymap.c +++ b/keyboards/kc60/keymaps/sgoodwin/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c index 7f7afdf75..887b5da72 100644 --- a/keyboards/kc60/keymaps/stanleylai/keymap.c +++ b/keyboards/kc60/keymaps/stanleylai/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#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. diff --git a/keyboards/kc60/keymaps/wigguno/keymap.c b/keyboards/kc60/keymaps/wigguno/keymap.c index caff9b837..a4a946f0d 100644 --- a/keyboards/kc60/keymaps/wigguno/keymap.c +++ b/keyboards/kc60/keymaps/wigguno/keymap.c @@ -2,7 +2,7 @@ // It also moves the reset key off the base layer, as in the default kc60 layout for this firmware. // I have swapped FN and RGUI as my rainbow keyset has them in the opposite order. -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index abb9785c3..b524b61cf 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -1,4 +1,4 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _WM 0 #define _QW 1 diff --git a/keyboards/kc60/keymaps/ws2812/keymap.c b/keyboards/kc60/keymaps/ws2812/keymap.c index 50b30ac23..d445df337 100644 --- a/keyboards/kc60/keymaps/ws2812/keymap.c +++ b/keyboards/kc60/keymaps/ws2812/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H // Used for SHIFT_ESC #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h index 38d08b20c..02eed310a 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/config.h +++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h @@ -7,6 +7,7 @@ // place overrides here #define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 #endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c index 999e76ca3..b318e1bea 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -5,30 +5,32 @@ extern keymap_config_t keymap_config; enum kinesis_layers { - _CMODDH, // Colemak Mod-DH Matrix (default layer) + _COLEMAK, // Colemak (default layer) _QWERTY, // Qwerty - _COLEMAK, // Colemak _NUMBERS, // Numbers & Symbols _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) _FUNCTION, // Function _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) _NUMPAD, // Numpad - _CMODDHGM, // Colemak Mod-DH Matrix gaming/vanilla (no dual-role keys with layer access) + _COLEMAKGM, // Colemak gaming/vanilla (no dual-role keys with layer access) _QWERTYGM, // QWERTY gaming/vanilla (no dual-role keys with layer access) - _ADJUST // Adjust layer + _ADJUST, // Adjust layer, accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer, accessed outside of tri-layer feature) }; enum kinesis_keycodes { - CMODDH = SAFE_RANGE, + COLEMAK = SAFE_RANGE, QWERTY, - COLEMAK, - CMODDHGM, + COLEMAKGM, QWERTYGM, + NUMPAD = TG(_NUMPAD), + ADJUST = MO(_ADJUST2), SPCFN = LT(_FUNCTION, KC_SPC), BSPCFN = LT(_FUNCTION2, KC_BSPC), ENTNS = LT(_NUMBERS, KC_ENT), DELNS = LT(_NUMBERS2, KC_DEL), CTLESC = CTL_T(KC_ESC), + ALTAPP = ALT_T(KC_APP), NKROTG = MAGIC_TOGGLE_NKRO }; @@ -52,13 +54,13 @@ enum { void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { - layer_on(_ADJUST); - set_oneshot_layer(_ADJUST, ONESHOT_START); + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); } } void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { - layer_off(_ADJUST); + layer_off(_ADJUST2); clear_oneshot_layer_state(ONESHOT_PRESSED); } } @@ -78,132 +80,37 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Colemak Mod-DH Matrix -* (Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) +/* Fundtion Row Keys +/ (Identical across layers, unless otherwise noted; Numpad is a toggle; Adjust is mometary) * ,-----------------------------------------------------------------------------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| * `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | R | S | T | G | | M | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | D | V | | K | H | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' */ -[_CMODDH] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - CTLESC, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, - //Left Thumb - CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), - SPCFN, ENTNS, KC_BSPC, - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - KC_TAB, DELNS, BSPCFN -), - -/* QWERTY -* (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' -*/ -[_QWERTY] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, - //Left Thumb - CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), - SPCFN, ENTNS, KC_BSPC, - - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - KC_TAB, DELNS, BSPCFN -), /* Colemak -* (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' +* (Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl| Hyper | | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | +* | / | / |-------| |-------| / | / | +* | Fn | Number| Bspc | | Enter |Number2| Fn2 | +* `-----------------------' `-----------------------' */ [_COLEMAK] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, @@ -211,10 +118,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_GRV, KC_LBRC, KC_RBRC, //Left Thumb CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), + ALTAPP, SPCFN, ENTNS, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, @@ -223,32 +130,76 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, DELNS, BSPCFN + KC_ENT, DELNS, BSPCFN +), + +/* QWERTY +* (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |Esc/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl| Hyper | | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | +* | / | / |-------| |-------| / | / | +* | Fn | Number| Bspc | | Enter |Number2| Fn2 | +* `-----------------------' `-----------------------' +*/ +[_QWERTY] = KEYMAP( + // Left Hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, + //Left Thumb + CTLESC, ALL_T(KC_NO), + ALTAPP, + SPCFN, ENTNS, KC_BSPC, + + //Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_ENT, DELNS, BSPCFN ), /* Number/symbol layer * (Multiple characters: single-tap for first, double-tap for second) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ( | ) | [ { | ] } | | | | | | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ( | ) | [ { | ] } | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_NUMBERS] = KEYMAP( // Left Hand @@ -301,27 +252,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Function layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | Up | | | | | | Up |Ctrl+Y| | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | |Ctrl+A| Left | Down | Right|C+A+Tb| | PgUp | Right| Down | Left | Home | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | |Ctrl+Z|Ctrl+X|Ctrl+C|Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | Prev | Play | Next | Stop | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | |C+A+Tab| | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | Up | | | | | | Up |Ctrl+Y| | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | |Ctrl+A| Left | Down | Right|C+A+Tb| | PgUp | Right| Down | Left | Home | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | |Ctrl+Z|Ctrl+X|Ctrl+C|Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | Prev | Play | Next | Stop | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_FUNCTION] = KEYMAP( // Left Hand @@ -343,9 +291,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, // Right Thumb - _______, _______, + _______, _______, _______, - LCA(KC_TAB), _______, _______ + _______, _______, _______ ), [_FUNCTION2] = KEYMAP( @@ -368,34 +316,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, // Right Thumb - _______, _______, + _______, _______, _______, - LCA(KC_TAB), _______, _______ + _______, _______, _______ ), /* Numpad layer * (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | | NumLk| | | | | | Tab | NumLk| KP / | kP *| KP - | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | | NumLk| | | | | | Tab | NumLk| KP / | KP * | KP - | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | KP Ent| | | +* `-----------------------' `-----------------------' */ [_NUMPAD] = KEYMAP( // Left Hand @@ -422,82 +367,76 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), -/* Colemak Mod-DH Matrix gaming/vanilla -* (No access to Function or Numbers layers; mainly used for gaming; double-tap the TD(ADJ) above LAlt to access Adjust layer) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Ctrl | A | R | S | T | G | | M | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | D | V | | K | H | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | | | LAlt | | RGUI | | | -* | Space | Enter |-------| |-------| Delete| Bspc | -* | | | Bspc | | Tab | | | -* `-----------------------' `-----------------------' +/* Colemak gaming/vanilla +* (No access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | | | LAlt | | RGUI | | | +* | Space | Enter |-------| |-------| Delete| Bspc | +* | | | Bspc | | Enter | | | +* `-----------------------' `-----------------------' */ -[_CMODDHGM] = KEYMAP( +[_COLEMAKGM] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_INS, KC_GRV, KC_LBRC, KC_RBRC, //Left Thumb CTLESC, TD(ADJ), KC_LALT, KC_SPC, KC_ENT, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, KC_DEL, KC_BSPC + KC_ENT, KC_DEL, KC_BSPC ), /* QWERTY gaming/vanilla -* (No access to Function or Numbers layers; mainly used for gaming; double-tap the TD(ADJ) above LAlt to access Adjust layer) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | | | LAlt | | RGUI | | | -* | Space | Enter |-------| |-------| Delete| Bspc | -* | | | Bspc | | Tab | | | -* `-----------------------' `-----------------------' +* (No access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | | | LAlt | | RGUI | | | +* | Space | Enter |-------| |-------| Delete| Bspc | +* | | | Bspc | | Enter | | | +* `-----------------------' `-----------------------' */ [_QWERTYGM] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, @@ -508,7 +447,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LALT, KC_SPC, KC_ENT, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -517,52 +456,74 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, KC_DEL, KC_BSPC + KC_ENT, KC_DEL, KC_BSPC ), /* Adjust layer -* (Enter/Number + Delete/Number2 under non-gaming/vanilla layers) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | |NKROTG| | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | | | | | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* (Enter/Number + Delete/Number2 under non-gaming/vanilla layers; Numpad is a toggle) +* ,-------------------------------------------. ,-------------------------------------------. +* | |Colmak|Qwerty| |ClmkGM| QWGM | |Numpad| | | | | RESET | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | |NKROTG| | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_ADJUST] = KEYMAP( // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, CMODDH, QWERTY, COLEMAK, CMODDHGM, QWERTYGM, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, // Left Thumb - _______, _______, - _______, - _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - TG(_NUMPAD), _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, - _______, NKROTG, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, + NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, + _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +[_ADJUST2] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, + _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, // Right Thumb _______, _______, _______, @@ -582,58 +543,42 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case CMODDH: + case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL << _CMODDH); + persistent_default_layer_set(1UL << _COLEMAK); layer_off ( _QWERTY); - layer_off ( _COLEMAK); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _QWERTYGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; case QWERTY: if (record->event.pressed) { persistent_default_layer_set(1UL << _QWERTY); - layer_off ( _CMODDH); layer_off ( _COLEMAK); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _QWERTYGM); layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } return false; break; - case COLEMAK: + case COLEMAKGM: if (record->event.pressed) { - persistent_default_layer_set(1UL << _COLEMAK); - layer_off ( _CMODDH); - layer_off ( _QWERTY); - layer_off ( _NUMBERS); - layer_off ( _NUMBERS2); - layer_off ( _FUNCTION); - layer_off ( _FUNCTION2); - layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); - layer_off ( _QWERTYGM); - layer_off ( _ADJUST); - } - return false; - break; - case CMODDHGM: - if (record->event.pressed) { - default_layer_set(1UL << _CMODDHGM); - layer_off ( _CMODDH); + default_layer_set(1UL << _COLEMAKGM); layer_off ( _QWERTY); layer_off ( _COLEMAK); layer_off ( _NUMBERS); @@ -643,13 +588,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off ( _NUMPAD); layer_off ( _QWERTYGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; case QWERTYGM: if (record->event.pressed) { default_layer_set(1UL << _QWERTYGM); - layer_off ( _CMODDH); layer_off ( _QWERTY); layer_off ( _COLEMAK); layer_off ( _NUMBERS); @@ -657,9 +602,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; } diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md index b3c573b62..353fca077 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md +++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md @@ -12,11 +12,11 @@ Changes to the thumb clusters include: I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and, prior to Advantage2, particularly terrible rubber domes were used. They have since updated the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. -I use Colemak Mod-DH Matrix as my default layout. There are QWERTY and regular Colemak layouts as well. +I use Colemak as my default layout. I've included QWERTY here as well. -Additionally, I've added gaming/vanilla version of Colemak Mod-DH Matrix and QWERTY layouts. These layouts have no access to the Function or Numbers layers, thus no dual-role keys with layer access, and are mainly used for gaming. +Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have no access to the Function or Numbers layers, thus no dual-role keys with layer access, and are mainly used for gaming. -Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and Colemak. The gaming/vanilla Colemak Mod-DH Matrix and QWERTY can be set as default layer, but will not be persistent. +Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent. ## Future plans @@ -25,7 +25,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and * Utilize the leftover spots on the key matrix, as well as unused pins on Teensy to run macropad and/or foot pedals. -### Colemak Mod-DH Matrix +### Colemak (Default layer, keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| @@ -33,11 +33,11 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-------------------------------------------. ,-------------------------------------------. | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |Esc/Ctrl| A | R | S | T | G | | M | N | E | I | O | ' | + |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |SC Shift| Z | X | C | D | V | | K | H | , | . | / |SC Shift| + |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' @@ -49,7 +49,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and | Fn | Number| Bspc | | Tab |Number2| Fn2 | `-----------------------' `-----------------------' - + ### QWERTY (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) ,-----------------------------------------------------------------------------------------------------------. @@ -75,31 +75,6 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and `-----------------------' `-----------------------' -### Colemak - (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,-----------------------------------------------------------------------------------------------------------. - | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| - `-----------------------------------------------------------------------------------------------------------' - ,-------------------------------------------. ,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| - `--------+------+------+------+------+------' `------+------+------+------+------+--------' - | Ins | ` | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,---------------. ,---------------. - |Esc/Ctl| Hyper | | RAlt | RCtl | - ,-------|-------|-------| |-------+-------+-------. - | Space | Enter |App/Alt| | RGUI | Delete| Bspc | - | / | / |-------| |-------| / | / | - | Fn | Number| Bspc | | Tab |Number2| Fn2 | - `-----------------------' `-----------------------' - - ### Numbers & Symbols layer (Multiple characters: single-tap for first, double-tap for second) ,-----------------------------------------------------------------------------------------------------------. @@ -155,7 +130,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and | | | | | | | | | | | | | | | | | | | `-----------------------------------------------------------------------------------------------------------' ,-------------------------------------------. ,-------------------------------------------. - | | NumLk| | | | | | Tab | NumLk| KP / | kP *| KP - | | + | | NumLk| | | | | | Tab | NumLk| KP / | KP * | KP - | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| @@ -174,7 +149,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and `-----------------------' `-----------------------' -### Colemak Mod-DH Matrix gaming/vanilla +### Colemak gaming/vanilla (No access to Function or Numbers layers; mainly used for gaming; double-tap TD(ADJ) for one shot access to Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| @@ -182,11 +157,11 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-------------------------------------------. ,-------------------------------------------. | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | R | S | T | G | | M | N | E | I | O | ' | + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Shift | Z | X | C | D | V | | K | H | , | . | / | Shift | + | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' @@ -228,8 +203,8 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-----------------------------------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | `-----------------------------------------------------------------------------------------------------------' - ,-------------------------------------------. ,------------------------------------------ - | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | + ,-------------------------------------------. ,-------------------------------------------. + | |Colmak|Qwerty| |ClmkGM| QWGM | |Numpad| | | | | RESET | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | | | | | | | | | | | | | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index fa181e039..4b4ad95cf 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -1,4 +1,4 @@ -#include "kinesis.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -132,7 +132,7 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DV] = KEYMAP( +[_DV] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, @@ -158,10 +158,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_QW] = KEYMAP( +[_QW] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, @@ -184,10 +184,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_CM] = KEYMAP( +[_CM] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, @@ -210,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_MD] = KEYMAP( +[_MD] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, @@ -236,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), -[_KP] = KEYMAP( +[_KP] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PWR, _______, _______, _______, _______, _______, @@ -300,3 +300,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { }; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<. +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER thesiscamper +#define PRODUCT kira75 +#define DESCRIPTION Custom 75% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * 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 { D0, D1, D2, D3, D5, D4 } +#define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, F5, F4, F1, F0, E6, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/kira75/info.json b/keyboards/kira75/info.json new file mode 100644 index 000000000..9111053ae --- /dev/null +++ b/keyboards/kira75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Kira 75", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/kira75/keymaps/default/config.h b/keyboards/kira75/keymaps/default/config.h new file mode 100644 index 000000000..2c852d181 --- /dev/null +++ b/keyboards/kira75/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/kira75/keymaps/default/keymap.c b/keyboards/kira75/keymaps/default/keymap.c new file mode 100644 index 000000000..cba4ca992 --- /dev/null +++ b/keyboards/kira75/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* 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_PSCR, KC_SLCK, KC_INS, \ + KC_TILD, 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_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_BSLS, KC_PGUP, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kira75/keymaps/default/readme.md b/keyboards/kira75/keymaps/default/readme.md new file mode 100644 index 000000000..fcf6f7111 --- /dev/null +++ b/keyboards/kira75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for kira75 diff --git a/keyboards/kira75/kira75.c b/keyboards/kira75/kira75.c new file mode 100644 index 000000000..4b53290be --- /dev/null +++ b/keyboards/kira75/kira75.c @@ -0,0 +1,43 @@ +/* Copyright 2018 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "kira75.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/kira75/kira75.h b/keyboards/kira75/kira75.h new file mode 100644 index 000000000..8c564f208 --- /dev/null +++ b/keyboards/kira75/kira75.h @@ -0,0 +1,50 @@ +/* Copyright 2018 MechMerlin + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef KIRA75_H +#define KIRA75_H + +#include "quantum.h" + + +// Functions for setting LEDs on toggle keys +inline void caps_led_on(void) { DDRD |= (1<<7); PORTD &= ~(1<<7); } +inline void caps_led_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); } + +inline void num_led_on(void) { DDRD |= (1<<6); PORTD &= ~(1<<6); } +inline void num_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \ + K50, K51, K53, K56, K5A, K5B, K5D, K5E, K5F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ + { K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, KC_NO, K5D, K5E, K5F } \ +} + +#endif diff --git a/keyboards/kira75/readme.md b/keyboards/kira75/readme.md new file mode 100644 index 000000000..f2c0f3228 --- /dev/null +++ b/keyboards/kira75/readme.md @@ -0,0 +1,15 @@ +# Kira 75 + +![kira75](imgur.com image replace me!) + +75% keyboard designed by thesiscamper + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Kira 75 +Hardware Availability: Group Buy + +Make example for this keyboard (after setting up your build environment): + + make kira75:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/kira75/rules.mk b/keyboards/kira75/rules.mk new file mode 100644 index 000000000..45eb6ee37 --- /dev/null +++ b/keyboards/kira75/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h b/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h new file mode 100644 index 000000000..999d8876c --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Pawnerd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c new file mode 100644 index 000000000..e35b8ec08 --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c @@ -0,0 +1,485 @@ +#include QMK_KEYBOARD_H + +/* +* Copy of knopps mini default May 16,2018 +* Added comments in code to more easilly understand it. +* +* Key Layout +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* | 4 | | 5 | | 6 | +* |_____| |_____| |_____| +* +* Each Layout row below keys. 1,2,3,4,5,6 +* +* Hold 3 when powering on for DFU Program Mode +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* +* Layer 0 (Default) +* _____ _____ _____ +* | | | | | | +* Stop VolUp Play +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Prev VolDwn Next +* |_____| |_____| |_____| +* +* Button 1 (stop) is Held to activate Layer 3 only while held, User then selects the keymap to change to +*/ + LAYOUT( + LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT), + +/* +* Layer 1 +* _____ _____ _____ +* | | | | | | +* ESC Macro3 Macro4 +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Macro5 Macro6 Macro7 +* |_____| |_____| |_____| +* +*/ + LAYOUT( + LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)), + +/* +* Layer 2 +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* | 4 | |Macro0 Macro1 +* |_____| |_____| |_____| +* +*/ + LAYOUT( + LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)), + +/* +* Layer 3 Key Layout +* This Layer does the Layer Selection +* _____ _____ _____ +* | | | | | DFU +* |None | |None | | FLash +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Layer Layer Layer +* 0 1 2 +* |_____| |_____| |_____| +* +* Layers 0,1,2 have Button 1 held to activate this layer. Then press the specific layer to switch to it. +* +*/ + LAYOUT( + KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)), + +// More Layers that can be used, but are not by default + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +// Older way of Macros found here: https://docs.qmk.fm/features/macros + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + //keyevent_t event = record->event; + + switch (id) { + case 0: + if (record->event.pressed) { + /* + * This is Macro 0 + * Content: tglhf + */ + return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); + } + break; + case 1: + if (record->event.pressed) { + /* + * This is Macro 1 + * Content: tgg + */ + return MACRO( T(T), T(G), T(G), T(ENT), END ); + } + break; + case 2: + if (record->event.pressed) { + /* + * This is Macro 2 + * Content: Press and hold "no" , type "l", release "no" + * I haven't found what this "NO" key maps to + */ + return MACRO( D(NO), T(L), U(NO), END ); + } + break; + case 3: + if (record->event.pressed) { + /* + * This is Macro 3 + * Content: press/hold LCTRL, type "2", release LCTRL + */ + return MACRO( D(LCTL), T(Z), U(LCTL), END ); + } + break; + case 4: + if (record->event.pressed) { + /* + * This is Macro 4 + * Content: press/hold LCTRL, type "2", release LCTRL + */ + return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); + } + break; + case 5: + if (record->event.pressed) { + /* + * This is Macro 5 + * Content: press/hold LCTRL, type "x", release LCTRL + */ + return MACRO( D(LCTL), T(X), U(LCTL), END ); + } + break; + case 6: + if (record->event.pressed) { + /* + * This is Macro 6 + * Content: press/hold LCTRL, type "c", release LCTRL + */ + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } + break; + case 7: + if (record->event.pressed) { + /* + * This is Macro 7 + * Content: press/hold LCTRL, type "v", release LCTRL + */ + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + break; + } + return MACRO_NONE; +} + + + +void set_switch_led(int ledId, bool state) { + if(state) { + switch(ledId) { + case 1: + PORTD |= (1<<7); + break; + case 2: + if((PINB & (1 << 7)) != 0) { + PORTC |= (1<<6); + } else { + PORTC |= (1<<7); + } + break; + case 3: + PORTD |= (1<<4); + break; + case 4: + PORTE |= (1<<6); + break; + case 5: + PORTB |= (1<<4); + break; + case 6: + PORTD |= (1<<6); + break; + } + } else { + switch(ledId) { + case 1: + PORTD &= ~(1<<7); + break; + case 2: + if((PINB & (1 << 7)) != 0) { + PORTC &= ~(1<<6); + } else { + PORTC &= ~(1<<7); + } + break; + case 3: + PORTD &= ~(1<<4); + break; + case 4: + PORTE &= ~(1<<6); + break; + case 5: + PORTB &= ~(1<<4); + break; + case 6: + PORTD &= ~(1<<6); + break; + } + } +} + + +void set_layer_led(int layerId) { + PORTD |= (1<<5); + PORTB &= ~(1<<6); + PORTB |= (1<<0); + switch(layerId) { + case 0: + PORTD &= ~(1<<5); + break; + case 1: + PORTB |= (1<<6); + break; + case 2: + PORTB &= ~(1<<0); + break; + } +} + +void matrix_init_user(void) { + led_init_ports(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + +void led_init_ports() { + // led voor switch #1 + DDRD |= (1<<7); + PORTD &= ~(1<<7); + + // led voor switch #2 + DDRC |= (1<<6); + DDRC |= (1<<7); + PORTC &= ~(1<<6); + PORTC &= ~(1<<7); + + // led voor switch #3 + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + // led voor switch #4 + DDRE |= (1<<6); + PORTE &= ~(1<<6); + + // led voor switch #5 + DDRB |= (1<<4); + PORTB &= ~(1<<4); + + // led voor switch #6 + DDRD |= (1<<6); + PORTD &= ~(1<<6); + + /* + DDRD |= (1<<7); + PORTD |= (1<<7); + + DDRC |= (1<<6); + PORTC |= (1<<6); + + DDRD |= (1<<4); + PORTD |= (1<<4); + + DDRE |= (1<<6); + PORTE |= (1<<6); + + DDRB |= (1<<4); + PORTB |= (1<<4); + + DDRD |= (1<<6); + PORTD |= (1<<6); + // */ + + DDRD |= (1<<5); + DDRB |= (1<<6); + DDRB |= (1<<0); + //led_set_layer(0); +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} + + +/* +* NOTE: +* +* In case you don't understand this coding stuff, please +* feel free to mail me or post something +* at the /r/knops subreddit and I will configure the code as +* you wish for your needs to make the LEDs do what you want :-). +* +* Contact me at: support@knops.io +* +* +* Knops Mini LED Numbers: +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | <--- +* |_____| |_____| |_____| | These LEDs are called 'Switch LEDs' +* _____ _____ _____ |----- To turn on/off these leds, use: +* | | | | | | | set_switch_led( [1-6], [true/false]); +* | 4 | | 5 | | 6 | <--- +* |_____| |_____| |_____| +* +* < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs' +* To turn one of them on, use: +* set_layer_led( [0-2] ); +* +*/ + +/* +* This function led_set_layer gets called when you switch between layers. +* It allows you to turn on and off leds for each different layer and do +* other cool stuff. Currently the GUI does not have LED support. I am working +* on that, but takes time. +*/ +void led_set_layer(int layer) { + switch(layer) { + + /** + * Here is an example to turn LEDs on and of. By default: + * - the LEDs are turned on in layer 0 + * - the LEDs are turned off in layer 1 + * - the LEDs don't change from state for layer 2 + */ + + case 0: + set_layer_led(0); // Turn on only the first/left layer indicator + set_switch_led(1, true); + set_switch_led(2, true); + set_switch_led(3, true); + set_switch_led(4, true); + set_switch_led(5, true); + set_switch_led(6, true); + break; + + case 1: + set_layer_led(1); // Turn on only the second/middle layer indicator + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + + case 2: + set_layer_led(2); // Turn on only the third/right layer indicator + + // Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE) + + break; + } +} + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case TO(0): + if (record->event.pressed) { + led_set_layer(0); + } + break; + case TO(1): + if (record->event.pressed) { + led_set_layer(1); + } + break; + case TO(2): + if (record->event.pressed) { + led_set_layer(2); + } + break; + } + return true; +} diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md b/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md new file mode 100644 index 000000000..784ef19af --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md @@ -0,0 +1,12 @@ +# Copy of Default Knops Mini Keymap + +*Note:* copy of knops,mini,default keymap on May 16,2018 with comments to help new user to QMK and knops mini create their own keymap + +## Key Layout + + 1 | 2 | 3 + 4 | 5 | 6 + +## Programming Keypad + +Hold 3 when powering on for DFU Program Mode diff --git a/keyboards/laplace/info.json b/keyboards/laplace/info.json new file mode 100644 index 000000000..e783a1f49 --- /dev/null +++ b/keyboards/laplace/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Laplace", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Del", "x":11, "y":0}, + {"label":"Backspace", "x":12, "y":0}, + + {"label":"Esc", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":";", "x":10.25, "y":1}, + {"label":"Enter", "x":11.25, "y":1, "w":1.75}, + + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"label":"Shift", "x":11.75, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Alt", "x":1, "y":3}, + {"label":"Gui", "x":2, "y":3}, + {"label":"Fn1", "x":3, "y":3}, + {"label":"Space", "x":4, "y":3, "w":2.25}, + {"label":"Backspace", "x":6.25, "y":3, "w":2.25}, + {"label":"Gui", "x":8.5, "y":3}, + {"label":"Alt", "x":9.5, "y":3, "w":1.25}, + {"label":"Fn2", "x":10.75, "y":3}, + {"label":"Ctrl", "x":11.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index 3857140b3..d329bea4c 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -1,6 +1,4 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "keymap_german.h" extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index bef896b58..5eccbcf1a 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -1,11 +1,5 @@ -#include "lets_split.h" -#include "bootloader.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif #ifdef SSD1306OLED #include "ssd1306.h" #endif diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c index b1733eaf7..b986ab780 100644 --- a/keyboards/lets_split/keymaps/adam/keymap.c +++ b/keyboards/lets_split/keymaps/adam/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c index 60c864d7d..9c3eb9475 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index fc0fe9c7c..f78278184 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -40,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT( +[_QWERTY] = LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -58,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT( \ +[_COLEMAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -76,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT( \ +[_DVORAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ @@ -94,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT( \ +[_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -112,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT( \ +[_RAISE] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ @@ -130,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT( \ +[_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/lets_split/keymaps/dlaroe/keymap.c b/keyboards/lets_split/keymaps/dlaroe/keymap.c index a51aad73a..b2282e0fe 100644 --- a/keyboards/lets_split/keymaps/dlaroe/keymap.c +++ b/keyboards/lets_split/keymaps/dlaroe/keymap.c @@ -4,12 +4,7 @@ // Also, I like me some numpad -#include "lets_split.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index c56cb7b6d..37053a8e4 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -14,9 +14,8 @@ * along with this program. If not, see . */ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/heartrobotninja/keymap.c b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c index 9fee02786..3a7ef9db3 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/keymap.c +++ b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c @@ -1,8 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "action_util.h" -#include "debug.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/henxing/keymap.c b/keyboards/lets_split/keymaps/henxing/keymap.c index c47180586..aab75dc54 100644 --- a/keyboards/lets_split/keymaps/henxing/keymap.c +++ b/keyboards/lets_split/keymaps/henxing/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 4a18a6e26..53b7a2c7f 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/kris/keymap.c b/keyboards/lets_split/keymaps/kris/keymap.c index 75533bf88..34d2e86da 100644 --- a/keyboards/lets_split/keymaps/kris/keymap.c +++ b/keyboards/lets_split/keymaps/kris/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/krusli/keymap.c b/keyboards/lets_split/keymaps/krusli/keymap.c index 177aa7168..9b49bab3b 100644 --- a/keyboards/lets_split/keymaps/krusli/keymap.c +++ b/keyboards/lets_split/keymaps/krusli/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; @@ -43,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Numpad| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -61,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( \ +[_COLEMAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -79,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( \ +[_DVORAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ @@ -97,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -115,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \ @@ -133,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Qwerty| 0 | . | . |Enter |Enter | | | | | | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = KEYMAP( \ +[_NUMPAD] = LAYOUT_ortho_4x12( \ KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \ KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \ _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \ @@ -151,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/lets_split/keymaps/mbsurfer/keymap.c b/keyboards/lets_split/keymaps/mbsurfer/keymap.c index e9e6d6ef6..5f6589337 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/keymap.c +++ b/keyboards/lets_split/keymaps/mbsurfer/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern rgblight_config_t rgblight_config; extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index 47f2ff2f8..2c61cce3b 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c @@ -1,9 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/mtdjr/config.h b/keyboards/lets_split/keymaps/mtdjr/config.h new file mode 100644 index 000000000..761e9e175 --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL + #define USE_I2C + #define TAPPING_TERM 250 +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define _MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/lets_split/keymaps/mtdjr/keymap.c b/keyboards/lets_split/keymaps/mtdjr/keymap.c new file mode 100644 index 000000000..4846772ed --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/keymap.c @@ -0,0 +1,194 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "action_macro.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + TD_ESC = 0 +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_COPY M(2) +#define UM_INSR M(3) +#define UM_PSEF M(4) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Esc/~ | A | S | D | F | G | | H | J | K | L | ; | '/" | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Up | Down |Right | + * `-----------------------------------------' '-----------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + TD(TD_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | [ | ] | { | } | | | 4 | 5 | 6 | * | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | copy |insert| | | | 1 | 2 | 3 | + | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | 0 | . | = | _ | + * `-----------------------------------------' '-----------------------------------------' + */ +[_LOWER] = LAYOUT( \ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, KC_4, KC_5, KC_6, KC_ASTR, KC_BSLS, \ + _______, XXXXXXX, XXXXXXX, UM_COPY, UM_INSR, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, KC_MINS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_UNDS \ +), + + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | \ | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' '-----------------------------------------' + */ +[_RAISE] = LAYOUT( \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,\ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | ROOT | PPLY | PSEF | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| | | F1 | F2 | F3 | F4 | F5 | F6 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | UNDO | CUT | COPY |PASTE | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home | | | End | + * `-----------------------------------------' '-----------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + _______, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, RESET, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, KC_UNDO, KC_CUT, UM_COPY, UM_INSR, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for nothing, twice for ESC + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_NO, KC_ESC) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 3: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 4: + SEND_STRING("ps -ef | grep "); + return false; break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk new file mode 100644 index 000000000..f0ed9e8dc --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/rules.mk @@ -0,0 +1,4 @@ +TAP_DANCE_ENABLE = yes +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/normacos/keymap.c b/keyboards/lets_split/keymaps/normacos/keymap.c index 63c39f1dd..9868fab6e 100644 --- a/keyboards/lets_split/keymaps/normacos/keymap.c +++ b/keyboards/lets_split/keymaps/normacos/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; @@ -58,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| * `-----------------------------------------' `-----------------------------------------' */ -[_NORMAN] = KEYMAP( \ +[_NORMAN] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -76,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| | * `-----------------------------------------' `-----------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_ortho_4x12( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PEQL, _______, \ _______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_DEL, \ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, \ @@ -94,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right| * `-----------------------------------------' `-----------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_ortho_4x12( \ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ _______, SH_SUDO, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \ _______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \ @@ -112,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | Lower| | | | Raise| | | | | * `-----------------------------------------' `-----------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT_ortho_4x12( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX, NORMAN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c index fca96bf39..d789b7a8b 100644 --- a/keyboards/lets_split/keymaps/piemod/keymap.c +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c index 35b558bcf..0fd4c1384 100644 --- a/keyboards/lets_split/keymaps/pitty/keymap.c +++ b/keyboards/lets_split/keymaps/pitty/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/lets_split/keymaps/poker/keymap.c b/keyboards/lets_split/keymaps/poker/keymap.c index a07143d58..cce0ca474 100644 --- a/keyboards/lets_split/keymaps/poker/keymap.c +++ b/keyboards/lets_split/keymaps/poker/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index f4f44c144..090cf78b7 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/waples/keymap.c b/keyboards/lets_split/keymaps/waples/keymap.c index 79f2d91cd..7b25bc51f 100644 --- a/keyboards/lets_split/keymaps/waples/keymap.c +++ b/keyboards/lets_split/keymaps/waples/keymap.c @@ -1,9 +1,8 @@ // Waples layout for Let's Split (rev2) // Made changes from the default -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c index 07074759a..c032b865a 100755 --- a/keyboards/lets_split/keymaps/xk/keymap.c +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -1,6 +1,5 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H + extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 7896e4467..176585747 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -27,5 +27,6 @@ ) #define KC_LAYOUT_ortho_4x12 LAYOUT_kc +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc #endif diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index c3bfe8042..904850d4d 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -157,7 +157,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/levinson/keymaps/default/keymap.c b/keyboards/levinson/keymaps/default/keymap.c index aa5143d67..dac8068a4 100644 --- a/keyboards/levinson/keymaps/default/keymap.c +++ b/keyboards/levinson/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "levinson.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -41,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT( \ +[_QWERTY] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -59,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT( \ +[_COLEMAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -77,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT( \ +[_DVORAK] = LAYOUT_ortho_4x12( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ @@ -95,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT( \ +[_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -113,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT( \ +[_RAISE] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ @@ -131,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT( \ +[_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/levinson/keymaps/losinggeneration/README.md index b406d5000..44c904508 100644 --- a/keyboards/levinson/keymaps/losinggeneration/README.md +++ b/keyboards/levinson/keymaps/losinggeneration/README.md @@ -17,7 +17,7 @@ See description of the layout in the common folder ``` ,-----------------------------------------..-----------------------------------------. - | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | |------+------+------+------+------+------||------+------+------+------+------+------| | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | |------+------+------+------+------+------||------+------+------+------+------+------| diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/levinson/keymaps/losinggeneration/keymap.c index 3512f59f1..aea6aed78 100644 --- a/keyboards/levinson/keymaps/losinggeneration/keymap.c +++ b/keyboards/levinson/keymaps/losinggeneration/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------..-----------------------------------------. - * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | * |------+------+------+------+------+------||------+------+------+------+------+------| * | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | * |------+------+------+------+------+------||------+------+------+------+------+------| @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------''-----------------------------------------' */ [_ADJUST] = CATMAP( \ - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, _______, \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , BL_TOGG, AU_ON , QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , BL_ON , AU_OFF , _______, _______, _______, KC_UP , _______, \ _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ diff --git a/keyboards/levinson/keymaps/treadwell/keymap.c b/keyboards/levinson/keymaps/treadwell/keymap.c index a0d4f4913..10d7d3035 100644 --- a/keyboards/levinson/keymaps/treadwell/keymap.c +++ b/keyboards/levinson/keymaps/treadwell/keymap.c @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = LAYOUT( \ + [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/levinson/keymaps/valgrahf/keymap.c b/keyboards/levinson/keymaps/valgrahf/keymap.c index 5956ad27b..89c186442 100644 --- a/keyboards/levinson/keymaps/valgrahf/keymap.c +++ b/keyboards/levinson/keymaps/valgrahf/keymap.c @@ -1,6 +1,4 @@ -#include "levinson.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -28,7 +26,7 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = KC_LAYOUT_ortho_4x12( //,----+----+----+----+----+----. ,----+----+----+----+----+----. TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -40,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = KC_LAYOUT_ortho_4x12( //,----+----+----+----+----+----. ,----+----+----+----+----+----. GRV, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = KC_LAYOUT_ortho_4x12( //,----+----+----+----+----+----. ,----+----+----+----+----+----. TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,RHUD,RSAD,RVAD, , , , , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RTOG,RMOD, , , , , , , , , + ,RTOG,RMOD, , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), diff --git a/keyboards/levinson/levinson.h b/keyboards/levinson/levinson.h index 279a65c51..b952ad365 100644 --- a/keyboards/levinson/levinson.h +++ b/keyboards/levinson/levinson.h @@ -24,5 +24,6 @@ ) #define KC_LAYOUT_ortho_4x12 LAYOUT_kc +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc #endif diff --git a/keyboards/levinson/matrix.c b/keyboards/levinson/matrix.c index ed913f34b..217264f26 100644 --- a/keyboards/levinson/matrix.c +++ b/keyboards/levinson/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2017 Danny Nguyen 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 @@ -30,7 +30,11 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#include "backlight.h" + +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef USE_I2C # include "i2c.h" @@ -149,7 +153,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else @@ -199,6 +202,15 @@ int i2c_transaction(void) { err = i2c_master_write(0x00); if (err) goto i2c_error; +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); +#else + // Write zero, so our byte index is the same + err = i2c_master_write(0x00); +#endif + if (err) goto i2c_error; + // Start read err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); if (err) goto i2c_error; @@ -234,7 +246,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; #endif return 0; } @@ -276,8 +288,12 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(i2c_slave_buffer[0]); +#endif for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; + i2c_slave_buffer[i+1] = matrix[offset+i]; } #else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { diff --git a/keyboards/minidox/keymaps/xyverz/config.h b/keyboards/minidox/keymaps/xyverz/config.h new file mode 100644 index 000000000..6d7b6256a --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL + +#define EE_HANDS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD + +#endif diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..3dd9903ca --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -0,0 +1,238 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Adding macros to make the keymaps below much easier to read. +#define SFTSCLN SFT_T(KC_SCLN) +#define SFTSLSH SFT_T(KC_SLSH) +#define SFTZED SFT_T(KC_Z) +//#define ALTENT ALT_T(KC_ENT) +//#define ESCTRL CTL_T(KC_ESC) +//#define TABGUI GUI_T(KC_TAB) +#define CTRLQ CTL_T(KC_Q) +#define CTRLV CTL_T(KC_V) +#define ALTJ ALT_T(KC_J) +#define ALTW ALT_T(KC_W) +#define CTRLX CTL_T(KC_X) +#define CTRLDOT CTL_T(KC_DOT) +#define ALTC ALT_T(KC_C) +#define ALTCOMM ALT_T(KC_COMM) +//#define GUIBSPC GUI_T(KC_BSPC) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * + * ,----------------------------------. ,----------------------------------. + * | ' | , | . | P | Y | | F | G | C | R | L | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | O | E | U | I | | D | H | T | N | S | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ ;|CTL/ Q|ALT/ J| K | X | | B | M |ALT/ W|CTL/ V|SFT/ Z| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_DVORAK] = LAYOUT ( \ + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ + SFTSCLN, CTRLQ, ALTJ, KC_K, KC_X, KC_B, KC_M, ALTW, CTRLV, SFTZED, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ Z|CTL/ X|ALT/ C| V | B | | N | M |ALT/ ,|CTL/ .|SFT/ /| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_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, KC_SCLN, \ + SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_N, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Colemak + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | G | | J | L | U | Y | L | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | R | S | T | D | | H | N | E | I | S | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ Z|CTL/ X|ALT/ C| V | B | | K | M |ALT/ ,|CTL/ .|SFT/ /| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_COLEMAK] = LAYOUT ( \ + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, \ + SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_K, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | CAPS | | UP | | Home | | PgDn | + | { | } | _ | + * |------+------+------+------+------| |------+------+------+------+------| + * | ~ | Left | Down | Right| End | | PgUp | Mute | Vol- | Vol+ | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | Del | | | | | | | + * `-------------| Esc | | Tab |------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = LAYOUT ( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_PLUS, KC_LCBR, KC_RCBR, KC_UNDS, \ + KC_TILD, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLSH, \ + _______, KC_DEL, KC_ESC, KC_TAB, KC_PIPE, _______ \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | CAPS | | UP | | Home | | PgDn | = | [ | ] | - | + * |------+------+------+------+------| |------+------+------+------+------| + * | ` | Left | Down | Right| End | | PgUp | Prev | Play | Next | ? | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | Del | | | | \ | | + * `-------------| Esc | | Tab |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = LAYOUT ( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_EQL, KC_LBRC, KC_RBRC, KC_MINS, \ + KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_QUES, \ + _______, KC_DEL, KC_ESC, KC_TAB, KC_BSLS, _______ \ +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | | | | | | | PrSc | ScLk | Paus | F12 | + * |------+------+------+------+------| |------+------+------+------+------| + * | |QWERTY|COLEMK|DVORAK| | |RESET | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | | | | | | | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = LAYOUT ( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, \ + KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ + _______, QWERTY, COLEMAK, DVORAK, _______, RESET, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/minidox/keymaps/xyverz/rules.mk b/keyboards/minidox/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..d34df5b19 --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. diff --git a/keyboards/minidox/serial.c b/keyboards/minidox/serial.c index 6faed09ce..74bcbb6bf 100644 --- a/keyboards/minidox/serial.c +++ b/keyboards/minidox/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index 6c82b2c74..cf3326d7b 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -35,17 +35,12 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -#define RGB_DI_PIN C0 -#define RGBLED_NUM 12 -#define RGBLIGHT_ANIMATIONS - -#define RGBLIGHT_HUE_STEP 12 -#define RGBLIGHT_SAT_STEP 15 -#define RGBLIGHT_VAL_STEP 18 #define NO_UART 1 -#define TAPPING_TERM 200 +#define RGB_DI_PIN C0 +#define RGBLED_NUM 12 +#define RGBLIGHT_ANIMATIONS /* * Keyboard Matrix Assignments diff --git a/keyboards/mt40/keymaps/default/config.h b/keyboards/mt40/keymaps/default/config.h new file mode 100644 index 000000000..9f9a9fc10 --- /dev/null +++ b/keyboards/mt40/keymaps/default/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define TAPPING_TERM 200 + + +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 15 +#define RGBLIGHT_VAL_STEP 18 + +#endif diff --git a/keyboards/mt40/keymaps/default/keymap.c b/keyboards/mt40/keymaps/default/keymap.c index 2da5dd645..193e548f9 100644 --- a/keyboards/mt40/keymaps/default/keymap.c +++ b/keyboards/mt40/keymaps/default/keymap.c @@ -13,9 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "mt40.h" -#include "action_layer.h" -#include "rgblight.h" +#include QMK_KEYBOARD_H + #define _______ KC_TRNS #define OOOOOOO KC_TRNS @@ -30,7 +29,7 @@ #define C_ENT MT(MOD_RCTL, KC_ENT) -/* +/* * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -42,31 +41,31 @@ * `-----------------------------------------------------------------------------------' */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT_ortho_4x12( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ C_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, C_ENT, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ C_LCTL, C_LGUI, MOD_LALT, MO(3), MO(1), KC_SPC, KC_SPC, MO(2), MO(4), MOD_RALT, C_RGUI, C_RCTL), - [1] = KEYMAP( + [1] = LAYOUT_ortho_4x12( _______, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, \ _______, KC_F5, KC_F6, KC_F7, KC_F8, RGB_VAD, RGB_VAI, KC_P4, KC_P5, KC_P6, KC_PAST, _______, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, BL_TOGG, BL_INC, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP, \ _______, _______, _______, _______, OOOOOOO, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN), - [2] = KEYMAP( + [2] = LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS, \ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, OOOOOOO, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END), - [3] = KEYMAP( + [3] = LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL, \ _______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \ _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______), - [4] = KEYMAP( + [4] = LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, \ KC_PSCR, KC_INS, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, \ KC_CAPS, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, \ @@ -75,10 +74,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_MOMENTARY(2), - [2] = ACTION_LAYER_MOMENTARY(3), - [3] = ACTION_LAYER_MOMENTARY(4), -}; + diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c index 140026013..d75fcc221 100644 --- a/keyboards/mt40/matrix.c +++ b/keyboards/mt40/matrix.c @@ -19,6 +19,7 @@ along with this program. If not, see . #include #include "matrix.h" +#include "config.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -29,6 +30,26 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + + + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,6 +68,7 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } + matrix_init_kb(); } void matrix_set_row_status(uint8_t row) { @@ -93,7 +115,7 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_kb(); return 1; } diff --git a/keyboards/mt40/mt40.c b/keyboards/mt40/mt40.c index 0e7a30d99..555689f87 100644 --- a/keyboards/mt40/mt40.c +++ b/keyboards/mt40/mt40.c @@ -38,6 +38,7 @@ void rgblight_set(void) { } __attribute__ ((weak)) -void matrix_scan_user(void) { +void matrix_scan_kb(void) { rgblight_task(); + matrix_init_user(); } diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h index 18cefd827..23a3d3c2b 100644 --- a/keyboards/mt40/mt40.h +++ b/keyboards/mt40/mt40.h @@ -16,9 +16,8 @@ #ifndef MT40_H #define MT40_H -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" +#include "quantum.h" + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout @@ -40,48 +39,24 @@ { KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \ } -/* #define KC_KEYMAP( \ */ -/* k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ */ -/* k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ */ -/* k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ */ -/* k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ */ -/* ) \ */ -/* { \ */ -/* { KC_##k31, KC_##k32, KC_##k33, KC_NO, KC_##k34, KC_##k35, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k37, KC_NO, KC_NO, KC_NO, KC_NO }, \ */ -/* { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k2a, KC_NO, KC_NO, KC_NO }, \ */ -/* { KC_##k30, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k1b, KC_##k1a, KC_NO, KC_NO, KC_NO }, \ */ -/* { KC_##k10, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0a, KC_NO, KC_NO, KC_NO }, \ */ -/* { KC_##k00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0b }, \ */ -/* { KC_NO, KC_NO, KC_##k06, KC_##k16, KC_##k26, KC_##k36, KC_##k38, KC_##k3a, KC_##k17, KC_##k07, KC_NO, KC_NO, KC_##k3b, KC_##k39, KC_##k27 } \ */ -/* { KC_NO, KC_NO, KC_##k09, KC_##k19, KC_##k29, KC_NO, KC_NO, KC_##k2b, KC_##k18, KC_##k08, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k28 } \ */ -/* } */ +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + KEYMAP( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + +#define LAYOUT KEYMAP +#define LAYOUT_ortho_4x12 KEYMAP +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP -/* #define FR_A KC_A */ -/* #define FR_B KC_B */ -/* #define FR_C KC_C */ -/* #define FR_D KC_D */ -/* #define FR_E KC_E */ -/* #define FR_F KC_F */ -/* #define FR_G KC_G */ -/* #define FR_H KC_H */ -/* #define FR_I KC_I */ -/* #define FR_J KC_J */ -/* #define FR_K KC_K */ -/* #define FR_L KC_L */ -/* #define FR_M KC_M */ -/* #define FR_N KC_N */ -/* #define FR_O KC_O */ -/* #define FR_P KC_P */ -/* #define FR_Q KC_Q */ -/* #define FR_R KC_R */ -/* #define FR_S KC_S */ -/* #define FR_T KC_T */ -/* #define FR_U KC_U */ -/* #define FR_V KC_V */ -/* #define FR_W KC_W */ -/* #define FR_X KC_X */ -/* #define FR_Y KC_Y */ -/* #define FR_Z KC_Z */ #endif diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 9d230d238..e7dc061ec 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -11,7 +11,7 @@ F_CPU = 12000000 # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = bootloadHID @@ -39,3 +39,6 @@ SRC = matrix.c i2c.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS_HAS_RGB = no diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index 39aa01090..778a2b9a6 100644 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -2,40 +2,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT}, - {KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} - }, + [0] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), - [1] = { - {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} - }, + [1] = LAYOUT_ortho_4x12( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), - [2] = { - {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS}, - {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} - } + [2] = LAYOUT_ortho_4x12( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - - switch (id) { - case 1: - // do nothing for now - if (event.pressed) { - ; - } - } - return MACRO_NONE; -} void matrix_init_user(void) { } diff --git a/keyboards/niu_mini/keymaps/mason/keymap.c b/keyboards/niu_mini/keymaps/mason/keymap.c index c6185f7ec..25f28752f 100644 --- a/keyboards/niu_mini/keymaps/mason/keymap.c +++ b/keyboards/niu_mini/keymaps/mason/keymap.c @@ -25,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Caps | Esc | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, + [_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -43,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} - }, + [_LOWER] = LAYOUT_ortho_4x12( + _______, 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -61,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {_______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, - {_______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} - }, + [_RAISE] = LAYOUT_ortho_4x12( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -79,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER}, - {_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} - } + [_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/niu_mini/keymaps/planck/keymap.c b/keyboards/niu_mini/keymaps/planck/keymap.c index b4661bfd2..2ada7a673 100644 --- a/keyboards/niu_mini/keymaps/planck/keymap.c +++ b/keyboards/niu_mini/keymaps/planck/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -#include "action_layer.h" extern keymap_config_t keymap_config; @@ -53,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -71,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -89,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -107,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -125,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. @@ -144,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} -}, +[_PLOVER] = LAYOUT_ortho_4x12( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -162,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/niu_mini/keymaps/readme.md b/keyboards/niu_mini/keymaps/readme.md index d4c2bbc80..8a263ed0b 100644 --- a/keyboards/niu_mini/keymaps/readme.md +++ b/keyboards/niu_mini/keymaps/readme.md @@ -21,3 +21,4 @@ When adding your keymap to this list, keep it organised alphabetically (select l - **default** default layout from KBDFans - **mason** - **planck** Planck default layout +- **xtonhasvim** A Planck-like layout with a few tweaks and a vim emulation layer. diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/config.h b/keyboards/niu_mini/keymaps/xtonhasvim/config.h new file mode 100644 index 000000000..a22bcab0f --- /dev/null +++ b/keyboards/niu_mini/keymaps/xtonhasvim/config.h @@ -0,0 +1,49 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// help for fast typist+dual function keys? +#define PERMISSIVE_HOLD + +/* disable debug print */ +#define NO_DEBUG + +/* disable print */ +#define NO_PRINT + +/* speed up mousekeys a bit */ +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 8 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#endif diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c new file mode 100644 index 000000000..6a23c0a2c --- /dev/null +++ b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c @@ -0,0 +1,200 @@ + /* Copyright 2015-2017 Christon DeWan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "xtonhasvim.h" + +/************************************ + * states + ************************************/ + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _MOVE, + _MOUSE +}; + +/************************************ + * keymaps! + ************************************/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl*| A* | S | D | F | G | H | J | K | L | ;* | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Mouse| | Alt | GUI |Lower*| Space |Raise*| GUI | Alt | | Vim | + * `-----------------------------------------------------------------------------------' + * + * - Ctrl acts as Esc when tapped. + * - Holding A or ; switches to movement layer. + * - Raise and Lower are one-shot layers. + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {LCTL_T(KC_ESC), LT(_MOVE,KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) }, + {TG(_MOUSE), X_____X, KC_LALT, KC_LGUI, OSL(_LOWER), KC_SPC, KC_SPC, OSL(_RAISE), KC_LGUI, KC_LALT, X_____X, VIM_START } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Bail | | | | | | | | Bail | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC}, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}, + {X_____X, TO(_QWERTY), _______, _______, _______, KC_BSPC, KC_BSPC, OSL(_ADJUST), _______, _______, TO(_QWERTY), X_____X} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Bail | | | | | | | | Bail | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC}, + {KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}, + {X_____X, TO(_QWERTY), _______, _______, OSL(_ADJUST), X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X} +}, + + +/* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------. + * |RGBPlain| Reset| | | | | | | | | | Del | + * |--------+------+------+------+------+-------------+------+------+------+------+------| + * |RGBMode-| | |Aud on|Audoff|AGnorm|AGswap| | | | |Lite+ | + * |--------+------+------+------+------+------|------+------+------+------+------+------| + * |RGBMode+|Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | |Lite- | + * |--------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB | Bail | | | | | | | | Bail | | + * `-------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {RGB_MODE_PLAIN, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {RGB_MODE_REVERSE, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, RGB_VAI}, + {RGB_MODE_FORWARD, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, RGB_VAD}, + {RGB_TOG, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X} +}, + + +/* movement layer (hold semicolon) + */ +[_MOVE] = { + {TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X}, + {_______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X}, + {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______}, + {X_____X, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X} +}, + +/* mouse layer + */ +[_MOUSE] = { + {TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X }, + {_______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X}, + {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______}, + {_______, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X} +}, + +/* vim edit mode. just has an escape -> _CMD key */ +[_EDIT] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {VIM_START, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), _______} +}, + +/* vim command layer. + */ +[_CMD] = { + {X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X}, + {VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X}, + {VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT}, + {X_____X, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X} +} + +}; + +/** Set just 4 LEDs closest to the user. Slightly less annoying to bystanders.*/ +void rgbflag(uint8_t r, uint8_t g, uint8_t b) { + for(int i = 0; i < RGBLED_NUM; i++){ + switch(i) { + case 9 ... 12: + // rgblight_setrgb_at(r,g,b,i); + led[i].r = r; + led[i].g = g; + led[i].b = b; + break; + default: + // rgblight_setrgb_at(0,0,0,i); + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + break; + } + } + rgblight_set(); +} + +uint32_t layer_state_set_user(uint32_t state) { + if(rgblight_get_mode() == 1) { + switch (biton32(state)) { + case _RAISE: + case _LOWER: + case _ADJUST: + rgbflag(0x00, 0x00, 0xFF); + break; + case _MOVE: + case _MOUSE: + rgbflag(0xFF, 0x00, 0x00); + break; + case _CMD: + rgbflag(0x00, 0xFF, 0x00); + break; + case _EDIT: + rgbflag(0x7A, 0x00, 0xFF); + break; + default: // for any other layers, or the default layer + rgbflag(0x00, 0xFF, 0xFF); + break; + } + } + return state; +} diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/readme.md b/keyboards/niu_mini/keymaps/xtonhasvim/readme.md new file mode 100644 index 000000000..9ff4ce1f1 --- /dev/null +++ b/keyboards/niu_mini/keymaps/xtonhasvim/readme.md @@ -0,0 +1,9 @@ +# Xton has a tiny keyboard! With Vim! + +Based on the standard Planck layout with a few changes: + +* Escape moved to dual-function with control. +* Dedicated movement and mouse layers. +* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys. +* Vim layers! See `users/xtonhasvim`. + diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk new file mode 100644 index 000000000..3a93f9fd8 --- /dev/null +++ b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk @@ -0,0 +1,6 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = no diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h index 2dd707ede..a92c4db9e 100644 --- a/keyboards/niu_mini/niu_mini.h +++ b/keyboards/niu_mini/niu_mini.h @@ -29,7 +29,23 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + LAYOUT_grid( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + #define LAYOUT LAYOUT_grid #define LAYOUT_ortho_4x12 LAYOUT_grid +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP #endif diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 64ef5f303..c2efc3266 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -66,3 +66,7 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS_HAS_RGB = no + diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/nyquist/keymaps/hexwire/keymap.c index 699cc3de5..40df4bcab 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/nyquist/keymaps/hexwire/keymap.c @@ -36,6 +36,7 @@ enum custom_keycodes { #define KC_X2 RAISE #define KC_X3 LT(_FN3, KC_GRV) #define KC_X4 MT(MOD_LSFT, KC_ENT) +#define KC_BL_S BL_STEP const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -91,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , , P0 ,PDOT, , + BL_S, , , , , , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), diff --git a/keyboards/nyquist/keymaps/losinggeneration/README.md b/keyboards/nyquist/keymaps/losinggeneration/README.md index be55af2e0..a51b94e40 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/README.md +++ b/keyboards/nyquist/keymaps/losinggeneration/README.md @@ -18,7 +18,7 @@ See description of the layout in the common folder ,-----------------------------------------..-----------------------------------------. | RESET|DEBUG | | | | || | | | | | | |------+------+------+------+------+------||------+------+------+------+------+------| - | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | | + | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| |Sleep | |------+------+------+------+------+------||------+------+------+------+------+------| | | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| | |------+------+------+------+------+------||------+------+------+------+------+------| diff --git a/keyboards/nyquist/keymaps/losinggeneration/keymap.c b/keyboards/nyquist/keymaps/losinggeneration/keymap.c index 65fbb9cdd..3e2c6edb7 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/keymap.c +++ b/keyboards/nyquist/keymaps/losinggeneration/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------..-----------------------------------------. * | RESET|DEBUG | | | | || | | | | | | * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | | + * | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| |Sleep | * |------+------+------+------+------+------||------+------+------+------+------+------| * | | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| | * |------+------+------+------+------+------||------+------+------+------+------+------| @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = CATMAP( \ RESET , DEBUG , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, TO_GAME, TO_NUM , TO_MS , _______, _______, \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \ _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index 5fbae1150..3cdad4adb 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2017 Danny Nguyen 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 @@ -31,6 +31,11 @@ along with this program. If not, see . #include "config.h" #include "timer.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif + #ifdef USE_I2C # include "i2c.h" #else // USE_SERIAL @@ -58,6 +63,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; #define ERROR_DISCONNECT_COUNT 5 +#define SERIAL_LED_ADDR 0x00 + #define ROWS_PER_HAND (MATRIX_ROWS/2) static uint8_t error_count = 0; @@ -115,12 +122,23 @@ uint8_t matrix_cols(void) void matrix_init(void) { +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) if (debouncing) return false; +#endif return true; } diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index 840628e1c..e8f184041 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -58,13 +58,13 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. USE_I2C = yes +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -72,4 +72,4 @@ CUSTOM_MATRIX = yes LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = nyquist/rev1 \ No newline at end of file +DEFAULT_FOLDER = nyquist/rev2 diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h index 9e685054b..3df957b84 100644 --- a/keyboards/orthodox/keymaps/default/config.h +++ b/keyboards/orthodox/keymaps/default/config.h @@ -35,4 +35,15 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + + #endif diff --git a/keyboards/orthodox/keymaps/default/keymap.c b/keyboards/orthodox/keymaps/default/keymap.c index 79077cdfb..c7a48d82d 100644 --- a/keyboards/orthodox/keymaps/default/keymap.c +++ b/keyboards/orthodox/keymaps/default/keymap.c @@ -19,11 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "orthodox.h" -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; +#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. @@ -39,10 +35,7 @@ extern keymap_config_t keymap_config; enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, + DVORAK }; // Fillers to make layering more clear @@ -50,113 +43,71 @@ enum custom_keycodes { #define XXXXXXX KC_NO #define LS__SPC MT(MOD_LSFT, KC_SPC) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_ENT, KC_RALT, LS__SPC, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI \ ), - [_COLEMAK] = KEYMAP(\ + [_COLEMAK] = LAYOUT(\ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_LGUI \ ), - [_DVORAK] = KEYMAP(\ + [_DVORAK] = LAYOUT(\ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LGUI \ ), - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCTL, _______, _______, KC_RCTL, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ ), - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \ ), - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \ ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); -#endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); -#endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); -#endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); + set_single_persistent_default_layer(_DVORAK); } return false; break; diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index fd10faa5e..bcc59268c 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -22,6 +22,14 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef INDICATOR_LIGHTS +extern userspace_config_t userspace_config; + +uint8_t last_mod; +uint8_t last_led; +uint8_t last_osm; +bool has_mods_changed = false; +#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. @@ -33,6 +41,7 @@ along with this program. If not, see . #define XXXXXXX KC_NO + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper(\ @@ -57,35 +66,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI ), -[_MODS] = LAYOUT(\ +[_MODS] = LAYOUT_wrapper(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_LOWER] = LAYOUT(\ +[_LOWER] = LAYOUT_wrapper(\ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ ), -[_RAISE] = LAYOUT(\ +[_RAISE] = LAYOUT_wrapper(\ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______ ), -[_ADJUST] = LAYOUT(\ - KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), - KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY +[_ADJUST] = LAYOUT_wrapper(\ + KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET, + VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM, + TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) }; -#ifdef RGBLIGHT_ENABLE +void matrix_init_keymap(void) { +#ifdef INDICATOR_LIGHTS + last_mod = get_mods(); + last_led = host_keyboard_leds(); + last_osm =get_oneshot_mods(); +#endif +} + uint32_t layer_state_set_keymap (uint32_t state) { +#ifdef INDICATOR_LIGHTS uint8_t modifiders = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -103,41 +120,49 @@ uint32_t layer_state_set_keymap (uint32_t state) { rgblight_sethsv_at(120, 255, 255, 7); rgblight_sethsv_at(120, 255, 255, 8); } +#endif return state; } void matrix_scan_keymap (void) { - static uint8_t current_mods; - static uint8_t current_host_leds; - static uint8_t current_oneshot_mods; - static bool has_status_changed = true; - if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) { - has_status_changed = true; - current_mods = get_mods(); - current_host_leds = host_keyboard_leds(); - current_oneshot_mods = get_oneshot_mods(); +#ifdef INDICATOR_LIGHTS + uint8_t current_mod = get_mods(); + uint8_t current_led = host_keyboard_leds(); + uint8_t current_osm =get_oneshot_mods(); + + if (last_mod == current_mod) { + last_mod = current_mod; + has_mods_changed = true; + } + if (last_led == current_led) { + last_led = current_led; + has_mods_changed = true; + } + if (last_osm == current_osm) { + last_osm = current_osm; + has_mods_changed = true; } - if (has_status_changed) { - has_status_changed = false; - if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<. */ -#include "orthodox.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; // 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. @@ -53,25 +50,25 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, TT(_RAISE), TT(_LOWER), TT(_LOWER), TT(_RAISE), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_TAP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT \ ), - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ 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_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU \ ), - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, _______, _______, \ _______, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \ CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_DOT, KC_BSLS, KC_PIPE \ ), - [_NAV] = KEYMAP( \ + [_NAV] = LAYOUT( \ _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, \ _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ diff --git a/keyboards/orthodox/keymaps/rfvizarra/config.h b/keyboards/orthodox/keymaps/rfvizarra/config.h new file mode 100644 index 000000000..7ac207f0d --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/config.h @@ -0,0 +1,45 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ +} +#endif + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c new file mode 100644 index 000000000..55f0fa016 --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -0,0 +1,138 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _NAV 5 +#define _NAV2 6 +#define _MEDIA 7 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LGUI, KC_LALT, MO(_MEDIA) , KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + MO(_NAV),KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_LSFT, CTL_T(KC_ENT), KC_RALT, KC_SPC, MO(_RAISE), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI \ + ), + + [_COLEMAK] = LAYOUT(\ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_LGUI \ + ), + + [_DVORAK] = LAYOUT(\ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LGUI \ + ), + + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCTL, _______, _______, KC_RCTL, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ + ), + + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \ + ), + + [_NAV] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_NAV2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_MEDIA] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _LOWER, _NAV, _NAV2); + 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 COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/orthodox/keymaps/rfvizarra/readme.md b/keyboards/orthodox/keymaps/rfvizarra/readme.md new file mode 100644 index 000000000..922832c17 --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/readme.md @@ -0,0 +1,19 @@ +# A personal Orthodox Layout + +![Orthodox](https://i.imgur.com/RQ5SKj4.jpg) + +This is the layout for my daily driver orthodox. It's based on a custom handwire keyboard that I've been using for quite some time. It's based on Plank's/Let's split layouts for the lower/raise layers. I added the shift, control/enter, alt/altgr and del to the thumb cluster. + +To build the firmware run from qmk's project folder + + make orthodox/rev3:rfvizarra:avrdude + +And to flash it, run + + make orthodox/rev3:rfvizarra:avrdude + +reset your keyboard pro micro while connected to the PC with a micro usb cable. + +Repeat on both halves. + +See [install build tools](https://docs.qmk.fm/install-build-tools) then the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) for more information. diff --git a/keyboards/orthodox/keymaps/rfvizarra/rules.mk b/keyboards/orthodox/keymaps/rfvizarra/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/lets_split/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h similarity index 85% rename from keyboards/lets_split/keymaps/xyverz/config.h rename to keyboards/orthodox/keymaps/xyverz/config.h index e37cfe88a..fc6d5d23b 100644 --- a/keyboards/lets_split/keymaps/xyverz/config.h +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -3,6 +3,7 @@ This is the c configuration file for the keymap Copyright 2012 Jun Wako Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger 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 @@ -31,15 +32,7 @@ along with this program. If not, see . /* Select hand configuration */ #define MASTER_LEFT -// #define MASTER_RIGHT +// #define _MASTER_RIGHT // #define EE_HANDS - -#ifdef SUBPROJECT_rev2 - /* RGB Underglow */ - #undef RGBLED_NUM - #define RGBLIGHT_ANIMATIONS - #define RGBLED_NUM 8 -#endif - #endif diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..2b6551e19 --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -0,0 +1,157 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = LAYOUT ( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT \ +), + +[_QWERTY] = LAYOUT ( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_COLEMAK] = LAYOUT ( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_LOWER] = LAYOUT ( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_RAISE] = LAYOUT ( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_ADJUST] = LAYOUT ( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/orthodox/keymaps/xyverz/readme.md b/keyboards/orthodox/keymaps/xyverz/readme.md new file mode 100644 index 000000000..43229cd0a --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/readme.md @@ -0,0 +1,101 @@ +# Xyverz's Orthodox Keymap + +## About this keymap: + +This is my OrthoDox keymap, and the first iteration of my readme. I've based this keymap on both my Planck and ErgoDox/Kinesis Advantage keymaps. + +## Still to do: + + * Re-evaluate the placement of the arrow keys after some time using this keyboard. + +### Layer 0: Dvorak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | ' | , | . | P | Y || F | G | C | R | L | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | O | E | U | I || D | H | T | N | S | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | X || B | M | W | V | Z | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Layer 1: Qwerty layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | E | R | T || Y | U | I | O | P | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Keymap 2: Colemak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | F | P | G || J | L | U | Y | ; | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | R | S | T | D || H | N | E | I | O | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || K | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### layer 3 : Lower layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Mute | Vol- | Vol+ | || | _ | + | { | } | | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 4: Raise layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Prev | Play | Next | || | - | = | [ | ] | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 5: Adjust Layer + + ,-------------------------------------------.,-------------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | |Reset | | | | || |Qwerty|Colemk|Dvorak| | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | | | | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | || | | + ,------|------|------||------+------+------. + | | | || | | | + `--------------------'`--------------------' + + diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h index 932f8fd12..51c524552 100644 --- a/keyboards/orthodox/orthodox.h +++ b/keyboards/orthodox/orthodox.h @@ -12,7 +12,7 @@ #endif // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json index be9738f2e..0a8442cf4 100644 --- a/keyboards/orthodox/rev1/info.json +++ b/keyboards/orthodox/rev1/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.1", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "KEYMAP": { - "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":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - } + "keyboard_name": "Monkeebs Orthodox Rev.1", + "maintainer": "drashna", + "width": 17, + "height": 17.24, + "layouts": { + "LAYOUT": { + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } diff --git a/keyboards/orthodox/rev1/rev1.c b/keyboards/orthodox/rev1/rev1.c index ae45e34b1..ecb908b3a 100644 --- a/keyboards/orthodox/rev1/rev1.c +++ b/keyboards/orthodox/rev1/rev1.c @@ -33,3 +33,18 @@ void matrix_init_kb(void) { matrix_init_user(); }; + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}}, +}; +#endif diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h index 8211234a5..e73263fb6 100644 --- a/keyboards/orthodox/rev1/rev1.h +++ b/keyboards/orthodox/rev1/rev1.h @@ -29,7 +29,7 @@ along with this program. If not, see . //void promicro_bootloader_jmp(bool program); -#define KEYMAP( \ +#define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json index 579167f6d..289169d72 100644 --- a/keyboards/orthodox/rev3/info.json +++ b/keyboards/orthodox/rev3/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.3", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "KEYMAP": { - "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":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - } + "keyboard_name": "Monkeebs Orthodox Rev.3", + "maintainer": "drashna", + "width": 17, + "height": 17.24, + "layouts": { + "LAYOUT": { + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } diff --git a/keyboards/orthodox/rev3/rev3.c b/keyboards/orthodox/rev3/rev3.c index ae45e34b1..ecb908b3a 100644 --- a/keyboards/orthodox/rev3/rev3.c +++ b/keyboards/orthodox/rev3/rev3.c @@ -33,3 +33,18 @@ void matrix_init_kb(void) { matrix_init_user(); }; + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}}, +}; +#endif diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h index 8aff9e39f..2be9b9605 100644 --- a/keyboards/orthodox/rev3/rev3.h +++ b/keyboards/orthodox/rev3/rev3.h @@ -29,7 +29,7 @@ along with this program. If not, see . //void promicro_bootloader_jmp(bool program); -#define KEYMAP( \ +#define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json index 579167f6d..d578a4134 100644 --- a/keyboards/orthodox/rev3_teensy/info.json +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.3", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "KEYMAP": { - "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":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] - } + "keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)", + "maintainer": "drashna", + "width": 17, + "height": 17.24, + "layouts": { + "LAYOUT": { + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.c b/keyboards/orthodox/rev3_teensy/rev3_teensy.c index ae45e34b1..ecb908b3a 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.c +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.c @@ -33,3 +33,18 @@ void matrix_init_kb(void) { matrix_init_user(); }; + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}}, + /* Right hand, matrix positions */ + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}}, +}; +#endif diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h index 18b47671c..0081a0df0 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h @@ -29,7 +29,7 @@ along with this program. If not, see . //void promicro_bootloader_jmp(bool program); -#define KEYMAP( \ +#define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ diff --git a/keyboards/orthodox/serial.c b/keyboards/orthodox/serial.c index 4936e4249..fea57b651 100644 --- a/keyboards/orthodox/serial.c +++ b/keyboards/orthodox/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/pk60/config.h b/keyboards/pk60/config.h new file mode 100644 index 000000000..06101349c --- /dev/null +++ b/keyboards/pk60/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Play Keyboard +#define PRODUCT pk60 +#define DESCRIPTION A 60% keyboard PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/pk60/info.json b/keyboards/pk60/info.json new file mode 100644 index 000000000..20b772895 --- /dev/null +++ b/keyboards/pk60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "pk60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0}, {"label":"Bs", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_iso": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"@", "x":11.75, "y":2.25}, {"label":"~", "x":12.75, "y":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":1.25}, {"label":"|", "x":1.25, "y":3.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"?", "x":11.25, "y":3.25}, {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25, "w":1.25}, {"label":"Win", "x":11.25, "y":4.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4.25, "w":1.25}] + }, + + "LAYOUT_225u_arrow": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"Shift", "x":11.25, "y":3.25, "w":1.75}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_2u_arrow": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_minila": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"label":"Alt", "x":8.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":9.75, "y":4.25, "w":1.25}, {"x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"x":8.5, "y":4.25, "w":1.25}, {"label":"Alt", "x":9.75, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/pk60/keymaps/default/keymap.c b/keyboards/pk60/keymaps/default/keymap.c new file mode 100644 index 000000000..c96499b0e --- /dev/null +++ b/keyboards/pk60/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, 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_CAPS, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + + LAYOUT_all( + 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_DEL, + RESET, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PSCR, KC_CALC, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_SLCK, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRF |= (1 << 4); PORTF &= ~(1 << 4); + } else { + DDRF &= ~(1 << 4); PORTF &= ~(1 << 4); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} \ No newline at end of file diff --git a/keyboards/pk60/keymaps/default/readme.md b/keyboards/pk60/keymaps/default/readme.md new file mode 100644 index 000000000..911cb37c5 --- /dev/null +++ b/keyboards/pk60/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default Play Keyboard60 Layout + +This is the default layout that comes flashed on every Play Keyboard60. All key pins are shown in the file. \ No newline at end of file diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c new file mode 100644 index 000000000..a9da0ff22 --- /dev/null +++ b/keyboards/pk60/pk60.c @@ -0,0 +1,35 @@ +#include "pk60.h" +#include "led.h" + +void matrix_init_kb (void) { + + matrix_init_user(); + led_init_ports(); + +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); + +}; + +void led_init_ports(void) { + // Set capslock LED pin as pinout + DDRF |= (1 << 4); + PORTF |= (1 << 4); + +} + +void led_set_kb(uint8_t usb_led) { + + if (usb_led & (1<. + */ + +#include "planck.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _MOVEMENT, + _NUMPAD, + _CODE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + MOVEMENT, + NUMPAD, + CODE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Move |Numpad| Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + // {KC_ESC, LT(MOVEMENT, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + // {KC_ESC, MEH_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, + {MOVEMENT, NUMPAD, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Movement + * ,-----------------------------------------------------------------------------------. + * | | | | | | | Home | PgUp | Up | PgDn | End | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down | Right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOVEMENT] = { + {_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_UP, KC_PGDN, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | * | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | 0 | = | + | + * `-----------------------------------------------------------------------------------' +[_NUMPAD] = { + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_EQUAL, KC_KP_PLUS} +}, + */ + +/* Numpad + */ +[_NUMPAD] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_DOT} +}, + +/* Code + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_CODE] = { + {_______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, } + +} + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case MOVEMENT: + if (record->event.pressed) { + layer_on(_MOVEMENT); + } else { + layer_off(_MOVEMENT); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) { + layer_on(_NUMPAD); + } else { + layer_off(_NUMPAD); + } + return false; + break; + case CODE: + if (record->event.pressed) { + layer_on(_CODE); + } else { + layer_off(_CODE); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/guidoism/readme.md b/keyboards/planck/keymaps/guidoism/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/guidoism/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/guidoism/rules.mk b/keyboards/planck/keymaps/guidoism/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index 0ec7c01b5..922c4c81d 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -4,34 +4,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { /* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ - * │ Esc │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bksp │ + * │ Esc │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Bksp │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; : │ Entr │ + * │ Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; : │ Entr │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , < │ . > │ / ? │ ' " │ + * │ Shft │ Y │ X │ C │ V │ B │ N │ M │ , < │ . > │ / ? │ ' " │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Alt │ GUI │ \ | │ - _ │ = + │ Spce │ Spce │ ( │ ) │ [ { │ ] } │ Lr 1 │ + * │ Ctrl │ Alt │ GUI │ - _ │ = + │ Spce │ \ | │ ( │ ) │ [ { │ ] } │ Lr 1 │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ - { KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , 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_ENT } , - { KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT } , - { KC_LALT , KC_LGUI , KC_BSLS , KC_MINS , KC_EQL , KC_SPC , KC_SPC , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , MO(1) } + { KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Z , KC_U , KC_I , KC_O , KC_P , KC_BSPC } , + { KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_ENT } , + { KC_LSFT , KC_Y , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT } , + { KC_LCTL , KC_LALT , KC_LGUI , KC_MINS , KC_EQL , KC_SPC , KC_BSLS , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , MO(1) } }, [1] = { /* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ * │ ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ ` │ ! │ @ │ # │ $ │ % │ * │ & │ BL+ │ BL- │ BLTg │ BLBr │ + * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ü │ ö │ ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Caps │ Home │ End │ PgUp │ PgDn │ F1 │ F2 │ F3 │ Left │ Down │ Up │ Rght │ + * │ SINS │ ♥ │ ≈ │ ✓ │ ✗ │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Powr │ Rset │ VoUp │ VoDn │ Play │ Stop │ Prev │ Next │ Alt │ Ctrl │ GUI │ │ + * │ Powr │ Rset │ BLSt │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ - { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } , - { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , BL_INC , BL_DEC , BL_TOGG , BL_BRTG } , - { KC_CAPS , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_F1 , KC_F2 , KC_F3 , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT } , - { KC_PWR , RESET , KC_VOLU , KC_VOLD , KC_MPLY , KC_MSTP , KC_MPRV , KC_MNXT , KC_RALT , KC_RCTL , KC_RGUI , KC_TRNS } + { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } , + { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä') } , + { S(KC_INS) , UC(L'♥') , UC(L'≈') , UC(L'✓') , UC(L'✗') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä') } , + { KC_PWR , RESET , BL_STEP , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS } } }; + +void matrix_init_user(void) { + set_unicode_input_mode(UC_LNX); +}; diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk index e69de29bb..d3918164d 100644 --- a/keyboards/planck/keymaps/sascha/rules.mk +++ b/keyboards/planck/keymaps/sascha/rules.mk @@ -0,0 +1,5 @@ +AUTO_SHIFT_ENABLE = yes +AUTO_SHIFT_MODIFIERS = yes +BACKLIGHT_ENABLE = yes +UNICODE_ENABLE = yes +DEFAULT_FOLDER = planck/rev5 diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c deleted file mode 100644 index 5ce52f36d..000000000 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ - -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// 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. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = { - {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, - {_______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} - - -}; - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif diff --git a/keyboards/preonic/keymaps/xyverz/config.h b/keyboards/preonic/keymaps/seph/config.h similarity index 100% rename from keyboards/preonic/keymaps/xyverz/config.h rename to keyboards/preonic/keymaps/seph/config.h diff --git a/keyboards/preonic/keymaps/seph/keymap.c b/keyboards/preonic/keymaps/seph/keymap.c new file mode 100644 index 000000000..a80199c09 --- /dev/null +++ b/keyboards/preonic/keymaps/seph/keymap.c @@ -0,0 +1,79 @@ +#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. +#define _QW 0 +#define _LO 1 +#define _RA 2 + +// Fillers to make layering more clear +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | - | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { + {KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL }, + {KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_UP, KC_DOWN, KC_RGUI, KC_ENT } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | Mute | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_LO] = { + {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, + {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {BL_STEP, _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | | | | | | | | | | | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | - | = | [ | ] | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | Prev | Play | Next | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_RA] = { + {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, + {KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, + {BL_STEP, _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +} + +}; diff --git a/keyboards/preonic/keymaps/xyverz/rules.mk b/keyboards/preonic/keymaps/seph/rules.mk similarity index 95% rename from keyboards/preonic/keymaps/xyverz/rules.mk rename to keyboards/preonic/keymaps/seph/rules.mk index ea5f6c164..5ccd4377a 100644 --- a/keyboards/preonic/keymaps/xyverz/rules.mk +++ b/keyboards/preonic/keymaps/seph/rules.mk @@ -17,7 +17,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h index ef1b4d944..22e26c004 100644 --- a/keyboards/redox/keymaps/default/config.h +++ b/keyboards/redox/keymaps/default/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2018 Mattia Dal Ben 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 diff --git a/keyboards/redox/keymaps/default/keymap.c b/keyboards/redox/keymaps/default/keymap.c index d8fd76d02..bbaf756c4 100644 --- a/keyboards/redox/keymaps/default/keymap.c +++ b/keyboards/redox/keymaps/default/keymap.c @@ -28,28 +28,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY * ,------------------------------------------------. ,------------------------------------------------. - * |\-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |'-Lyr2| + * |`-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |--Lyr2| * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | è | + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | = | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ò | à | + * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | ù |-(Sft)| + * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | \ |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |<(Gui)| + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space |ì(AlG)| Left | Down | Up | Right| + * | Gui | + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space | Alt | Left | Down | Up | Right| * `------------------------------------------------' `------------------------------------------------' */ [_QWERTY] = LAYOUT( //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. LT(_NAV, KC_GRV) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,MO(_SYMB), MO(_SYMB), KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,LT(_NAV, KC_MINS), //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,RALT(KC_LBRC), RALT(KC_RBRC) , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_LBRC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,KC_LBRC, KC_RBRC , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_EQL, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH,RSFT_T(KC_SLSH), + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH, KC_RSFT, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LGUI_T(KC_NONUS_BSLASH),KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, RALT_T(KC_EQL),KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT + KC_LGUI,KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, KC_RALT,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ), @@ -68,11 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYMB] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, - _______, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX, - _______, RALT(KC_QUOT), KC_DLR , RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_EQL), _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX, - _______, KC_PERC, LSFT(KC_EQL) , LSFT(KC_8), LSFT(KC_9), RALT(KC_MINS), _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + _______, KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX, + _______, KC_HASH, KC_DLR , KC_LBRC, KC_RBRC, KC_GRV, _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX, + _______, KC_PERC, KC_CIRC, KC_LPRN, KC_RPRN, KC_TILD, _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX ), /* Navigation diff --git a/keyboards/redox/keymaps/default/readme.md b/keyboards/redox/keymaps/default/readme.md index 7f086f6e1..8fa8ddf5c 100644 --- a/keyboards/redox/keymaps/default/readme.md +++ b/keyboards/redox/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for redox \ No newline at end of file +# The default keymap for Redox diff --git a/keyboards/redox/keymaps/italian/config.h b/keyboards/redox/keymaps/italian/config.h new file mode 100644 index 000000000..22e26c004 --- /dev/null +++ b/keyboards/redox/keymaps/italian/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2018 Mattia Dal Ben + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/redox/keymaps/italian/keymap.c b/keyboards/redox/keymaps/italian/keymap.c new file mode 100644 index 000000000..d8fd76d02 --- /dev/null +++ b/keyboards/redox/keymaps/italian/keymap.c @@ -0,0 +1,117 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; +extern rgblight_config_t rgblight_config; + +// 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. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Fillers to make layering more clear +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,------------------------------------------------. ,------------------------------------------------. + * |\-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |'-Lyr2| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | è | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ò | à | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | ù |-(Sft)| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |<(Gui)| + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space |ì(AlG)| Left | Down | Up | Right| + * `------------------------------------------------' `------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + LT(_NAV, KC_GRV) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,MO(_SYMB), MO(_SYMB), KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,LT(_NAV, KC_MINS), + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,RALT(KC_LBRC), RALT(KC_RBRC) , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_LBRC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH,RSFT_T(KC_SLSH), + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LGUI_T(KC_NONUS_BSLASH),KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, RALT_T(KC_EQL),KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + +/* Symbols + * ,------------------------------------------------. ,------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | # | $ | [ | ] | ~ | | | | | 4 | 5 | 6 | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | % | ^ | ( | ) | ` | | | | | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | 0 | 0 | . | | | + * `------------------------------------------------' `------------------------------------------------' + */ + + [_SYMB] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + _______, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX, + _______, RALT(KC_QUOT), KC_DLR , RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_EQL), _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX, + _______, KC_PERC, LSFT(KC_EQL) , LSFT(KC_8), LSFT(KC_9), RALT(KC_MINS), _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX + ), + +/* Navigation + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | |MOUS_U| |WHEL_U| | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | |MOUS_L|MOUS_D|MOUS_R|WHEL_D| | | | | LEFT | DOWN | UP |RIGHT | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | |MOUS_1|MOUS_2| | | | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, KC_WH_U, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT,XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_ADJUST] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, + XXXXXXX, RESET , RGB_M_P, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, KC_DEL, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + diff --git a/keyboards/redox/keymaps/italian/readme.md b/keyboards/redox/keymaps/italian/readme.md new file mode 100644 index 000000000..85b48fdb6 --- /dev/null +++ b/keyboards/redox/keymaps/italian/readme.md @@ -0,0 +1 @@ +# The italian keymap for Redox diff --git a/keyboards/redox/keymaps/italian/rules.mk b/keyboards/redox/keymaps/italian/rules.mk new file mode 100644 index 000000000..1e5761278 --- /dev/null +++ b/keyboards/redox/keymaps/italian/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/redox/matrix.c b/keyboards/redox/matrix.c index 20c0f1d34..1607775bd 100644 --- a/keyboards/redox/matrix.c +++ b/keyboards/redox/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/tada68/keymaps/mtdjr/keymap.c b/keyboards/tada68/keymaps/mtdjr/keymap.c new file mode 100644 index 000000000..1b1f6ad4f --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/keymap.c @@ -0,0 +1,87 @@ +#include "tada68.h" +#include "action_macro.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. +#define _BL 0 +#define _FL 1 + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_PSEF M(2) +#define UM_XCPY M(3) +#define UM_XINS M(4) +#define UM_CAD M(5) + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, 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_INS, \ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_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_LALT,KC_LGUI, KC_SPC, KC_RALT,MO(_FL), KC_RCTRL, KC_LEFT,KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Grv | + * |----------------------------------------------------------------| + * | | RT | PPLY| PS | | | | | | | | | | |Hme | + * |----------------------------------------------------------------| + * | | BL- |BL | BL+|BLG| | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |CP|PST | | PLY| NXT|MUT|VD |VU | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11, KC_F12, KC_DEL, KC_GRV, \ + _______,UM_ROOT,UM_PPLY,UM_PSEF,_______,_______,_______,_______,_______,_______,KC_PSCR,_______,_______,_______, KC_HOME, \ + _______,BL_DEC ,BL_TOGG,BL_INC,BL_BRTG,_______,_______,_______,_______,_______,_______,_______, _______, KC_END, \ + _______,_______ ,_______,UM_XCPY,UM_XINS,_______,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,KC_BTN1,KC_MS_U,KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_R), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + case 3: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 4: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 5: + return MACRO(D(LCTL), D(RALT), T(DEL), END); + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/tada68/keymaps/mtdjr/readme.md b/keyboards/tada68/keymaps/mtdjr/readme.md new file mode 100644 index 000000000..53412d7c2 --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/readme.md @@ -0,0 +1,3 @@ +# default TADA68 layout + +This layout replicates the default factory layout of the TADA68. diff --git a/keyboards/tada68/keymaps/mtdjr/rules.mk b/keyboards/tada68/keymaps/mtdjr/rules.mk new file mode 100644 index 000000000..2a7ff2779 --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # 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 controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c index e3028019a..08bea5bc1 100644 --- a/keyboards/tv44/keymaps/xyverz/keymap.c +++ b/keyboards/tv44/keymaps/xyverz/keymap.c @@ -26,25 +26,30 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases for some other things I want to try out +#define RAI_ESC LT(_RAISE, KC_ESC) +#define LOW_QUQ LT(_LOWER, KC_QUOT) +#define LOW_MIN LT(_LOWER, KC_MINS) // Same as above, but for Dvorak layer +#define GUIBSPC GUI_T(KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = KEYMAP( /* 0: Dvorak */ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + RAI_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, LOW_MIN, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT + KC_LCTL, KC_LALT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), [_QWERTY] = KEYMAP( /* 1: Qwerty */ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + RAI_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LOW_QUQ, 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_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), [_COLEMAK] = KEYMAP( /* 2: Colemak */ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + RAI_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, LOW_QUQ, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 3ba77c658..4f9b7f9b2 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -17,7 +17,7 @@ /* This is the default ANSI layout provided by the KBP V60 Type R * as depicted in their manual and on the stock keycaps. */ -#include "v60_type_r.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 1e3775ab6..fba711148 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "v60_type_r.h" +#include QMK_KEYBOARD_H #define _____ KC_TRNS #define XXXXX KC_NO diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index b970f2722..afd65cd1a 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -67,3 +67,5 @@ UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c index 7079a8da9..cf4c1064f 100644 --- a/keyboards/vitamins_included/matrix.c +++ b/keyboards/vitamins_included/matrix.c @@ -198,7 +198,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index 09e8bc599..11ffe6ebd 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -17,7 +17,6 @@ extern keymap_config_t keymap_config; #define DIABLO TG(_DIABLO) #define GAMEPAD TG(_GAMEPAD) #define MEDIA TT(_MEDIA) -#define COVECUBE TG(_COVECUBE) //enum more_custom_keycodes { @@ -28,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = LAYOUT_ortho_5x7( LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, - MEDIA, KC_CALC, COVECUBE,KC_P7, KC_P8, KC_P9, KC_PAST, + MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT @@ -58,13 +57,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT ), - [_COVECUBE] = LAYOUT_ortho_5x7( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, COVECUBE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ), [_MEDIA] = LAYOUT_ortho_5x7( KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, @@ -77,13 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); -} bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/viterbi/keymaps/mike808/config.h b/keyboards/viterbi/keymaps/mike808/config.h new file mode 100644 index 000000000..bfca915f2 --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2018 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/viterbi/keymaps/mike808/keymap.c b/keyboards/viterbi/keymaps/mike808/keymap.c new file mode 100644 index 000000000..c7e48b135 --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/keymap.c @@ -0,0 +1,158 @@ +#include QMK_KEYBOARD_H + +#define _DVORAK 0 +#define _QWERTY 1 +#define _FN1 2 +#define _MOUSE 3 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_DVOR DVORAK +#define KC_QWER QWERTY +#define KC_FN1 MO(_FN1) + +// Tap-Hold keys (QWERTY) +#define KC_S_C MT(MOD_LCTL, KC_S) +#define KC_D_A MT(MOD_LALT, KC_D) +#define KC_F_G MT(MOD_LGUI, KC_F) +#define KC_J_G MT(MOD_RGUI, KC_J) +#define KC_K_A MT(MOD_RALT, KC_K) +#define KC_L_C MT(MOD_RCTL, KC_L) + +// Tap-Hold keys (Dvorak) +#define KC_O_C MT(MOD_LCTL, KC_O) +#define KC_E_A MT(MOD_LALT, KC_E) +#define KC_U_G MT(MOD_LGUI, KC_U) +#define KC_H_G MT(MOD_RGUI, KC_H) +#define KC_T_A MT(MOD_RALT, KC_T) +#define KC_N_C MT(MOD_RCTL, KC_N) + +#define KC_G_A LGUI(KC_A) +#define KC_G_C LGUI(KC_C) +#define KC_G_V LGUI(KC_V) +#define KC_G_X LGUI(KC_X) +#define KC_G_Z LGUI(KC_Z) +#define KC_G_BL LGUI(KC_BSLS) +#define KC_G_TB LGUI(KC_TAB) +#define KC_G_SP LGUI(KC_SPC) + +#define KC_ENTM LT(_MOUSE, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + DVOR,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,S_C ,D_A ,F_G , G , H ,J_G ,K_A ,L_C ,SCLN,QUOT, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,EQL ,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + QWER,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,EQL ,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,O_C ,E_A ,U_G , I , D ,H_G ,T_A ,N_C , S ,MINS, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,BSLS,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,EXLM, AT ,LCBR,RCBR,PIPE, , P7 , P8 , P9 ,ASTR,F12 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,HASH,DLR ,LPRN,RPRN,GRV , , P4 , P5 , P6 ,PLUS,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , ,PDOT, P0 ,EQL , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_MOUSE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,MS_U, , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,MS_L,MS_D,MS_R, , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,BTN1,BTN2, , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +#endif + +void update_rgblight(uint16_t layer) { + if (layer & (1UL << _DVORAK)) { + rgblight_sethsv_green(); + } else if (layer & (1UL << _QWERTY)) { + rgblight_sethsv_goldenrod(); + } +} + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); + #ifdef RGBLIGHT_ENABLE + update_rgblight(default_layer); + #endif // RGBLIGHT_ENABLE +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL << _QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL << _DVORAK); + } + return false; + break; + } + return true; +} + + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + uint8_t default_layer = eeconfig_read_default_layer(); + update_rgblight(default_layer); + #endif +} diff --git a/keyboards/viterbi/keymaps/mike808/rules.mk b/keyboards/viterbi/keymaps/mike808/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/matrix.c b/keyboards/viterbi/matrix.c index 5fbae1150..c56b49c5f 100644 --- a/keyboards/viterbi/matrix.c +++ b/keyboards/viterbi/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/viterbi/serial.c b/keyboards/viterbi/serial.c index 6faed09ce..74bcbb6bf 100644 --- a/keyboards/viterbi/serial.c +++ b/keyboards/viterbi/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c index b9f1b5c8a..028fc270d 100644 --- a/keyboards/xd75/keymaps/default/keymap.c +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -36,33 +36,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QW] = { /* QWERTY */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL }, + { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT }, + { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, + { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL }, }, /* FUNCTION * .--------------------------------------------------------------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | SELECT | CALC | MYCOMP | MAIL | | | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PR SCR | + * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | PREV | PLAY | NEXT | STOP | | | P4 | P5 | P6 | + | | | | | | + * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | VOL- | MUTE | VOL+ | | | | P1 | P2 | P3 | PENT | | | | | | + * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | RESET | | | FN | | | P0 | | P. | PENT | PENT | FN | | | | + * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_FN] = { /* FUNCTION */ - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, - { KC_MSEL, KC_CALC, KC_TRNS, KC_MAIL, KC_SPC, KC_SPC, KC_P7, KC_P8, KC_P9, KC_MINS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, KC_SPC, KC_SPC, KC_P6, KC_P5, KC_P4, KC_PLUS, KC_SPC, KC_TRNS, KC_SPC, KC_SPC, KC_SPC }, - { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, KC_SPC, KC_SPC, KC_P3, KC_P2, KC_P1, KC_TRNS, KC_SPC, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS }, - { RESET, KC_TRNS, KC_TRNS, MO(_FN), KC_SPC, KC_SPC, KC_KP_0, KC_TRNS, KC_PDOT, KC_PENT, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS }, + { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, + { KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS }, + { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ }, + { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ }, + { _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ }, } }; diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xd75/keymaps/default/readme.md index d53c0f34a..b29295c74 100644 --- a/keyboards/xd75/keymaps/default/readme.md +++ b/keyboards/xd75/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for xd75 +# The default keymap for xd75, with led controls diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h new file mode 100644 index 000000000..aadcaa387 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -0,0 +1,28 @@ +/* Copyright 2017 Benjamin Kesselring + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define RGBLIGHT_SLEEP +#define MANUFACTURER mtdjr +#define PRODUCT XD75 +#define DESCRIPTION XD75Re + +#endif diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c new file mode 100644 index 000000000..696c82ae4 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -0,0 +1,135 @@ +/* Copyright 2017 Wunder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd75.h" +#include "action_layer.h" + + +enum custom_keycodes { + // TD_ESC = 0, + TD_LOCK = 0, +}; + +// Layers +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + + + +// Shortcuts +#define KC_____ KC_NO +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_RASE MO(_RAISE) +#define KC_LOWR MO(_LOWER) + +// RGB and Backlighting +#define KC_RGB RGB_TOG +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD +#define KC_BLT BL_TOGG +#define KC_BLS BL_STEP +#define KC_BLI BL_INC +#define KC_BLD BL_DEC + +// Tapdance +//#define KC_EXC TD(TD_ESC) +#define KC_LOCK TD(TD_LOCK) + +// Macros +#define KC_ROOT M(0) +#define KC_PPLY M(1) +#define KC_PSEF M(2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LCTL, A , S , D , F , G ,HOME,PLUS,LOCK, H , J , K , L ,SCLN, ENT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + + [_LOWER] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + +[_RAISE] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +) +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for left ctrl, twice for ESC + //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC), + [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)) +}; +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/mtdjr/readme.md b/keyboards/xd75/keymaps/mtdjr/readme.md new file mode 100644 index 000000000..d53c0f34a --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xd75/keymaps/mtdjr/rules.mk new file mode 100644 index 000000000..28462ff16 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/rules.mk @@ -0,0 +1,22 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md new file mode 100644 index 000000000..6b1bce6a5 --- /dev/null +++ b/keyboards/ymd75/README.md @@ -0,0 +1,83 @@ +YMD75 / MT84 +========================== + +This is a port of the QMK firmware for boards that are based on the +ps2avrGB firmware, like the [ps2avrGB keyboard] (https://www.keyclack.com/product/gb-ps2avrgb/), for use on the YMD75, from YMDK. YMDK sell the board and name it "YMD75", however the PCB has "MT84" printed on both sides. + +Most of the code was taken and amended from YMD96 and my port JJ50, which in itself was taken from ps2avrGB and amended by Andrew Novak. + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +Hardware Supported: YMD75/MT84 with the ATmega32a chip. +Hardware Availability: The YMD75/MT84 PCB is available from YMDK on AliExpress and suchlike. + +This version by Wayne K Jones (github.com/WarmCatUK) + +## Installing and Building + +Make example for this keyboard (after setting up your build environment): + +``` +$ make ymd75:default:program +``` +It should detect the keyboard and set it to bootloader mode automatically, prior to flashing firmware. +I've found that I need to remove the previous build/file before making a new one as it doesn't overwrite it; but this might just be my personal experience. + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. +In addition you may need the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +If you prefer, you can just build it and flash the firmware directly with +`bootloadHID` if you boot the board while holding down `Left Control` to keep it +in the bootloader: + +``` +$ make ymd75 +$ bootloadHID -r ymd75_default.hex +``` +I dont use windows personally, but the following is from ymd96 regarding flashing the atmega32a: + +Since the YMD75/MT84 uses an ATmega32a chip instead of the 32u4, you need to download [HIDBootFlash v.1.0](http://vusb.wikidot.com/project:hidbootflash) for Windows. If anyone knows of a Linux/Mac bootflasher that works, edit this readme! +On Windows, I use [MINGw](http://www.mingw.org/) to compile the keymaps. On Linux or OSX you can simply use the terminal. + +Once you have those two pieces of software: +Build the keyboard with +``` +$ make ymd75:default +``` +If you make your own layout, change the `default` word to whatever your layout is. + +And flash the compiled hex file with `HIDBootFlash`. Simply put the board in flashing mode by plugging it in while holding the key below the top right key, and click `find device`. Then you can specify the .hex file and flash it to the device. + + +## Troubleshooting + +1. Try plugging the board in while pressing `Backspace` (`Key below the top right key`). This will force it to boot only the bootloader without loading the firmware. Once this is done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly to your computer or plugging/unplugging the USB hub. +3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info. +4. I was occasionally finding that I wasn't flashing changes that I was making to my keymap. If that happens, remove the previous build and simply force rebuild by making with: +``` +$ rm ymd75_default.hex +$ make -B ymd75:default +$ make -B ymd75:default:program +``` + + + diff --git a/keyboards/ymd75/backlight.c b/keyboards/ymd75/backlight.c new file mode 100644 index 000000000..1f5e19638 --- /dev/null +++ b/keyboards/ymd75/backlight.c @@ -0,0 +1,215 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + Modified by Wayne K Jones (github.com/WarmCatUK) 2018 + */ + +#include "backlight.h" +#include "quantum.h" + +#include +#include + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include +#include + +// Port D: digital pins of the AVR chipset +//#define NUMLOCK_PORT (1 << 2) // 2nd pin of Port D (digital) +#define CAPSLOCK_PORT (1 << 1) // 1st pin +#define BACKLIGHT_PORT (1 << 4) // 4th pin +//#define SCROLLLOCK_PORT (1 << 6) // 6th pin + +#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 +#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default + +#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask + +#define PWM_MAX 0xFF +#define TIMER_TOP 255 // 8 bit PWM + +extern backlight_config_t backlight_config; + +/** + * References + * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation + * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b + * Timers: http://www.avrbeginners.net/architecture/timers/timers.html + * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ + * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware + */ + +// @Override +// turn LEDs on and off depending on USB caps/num/scroll lock states. +void led_set_user(uint8_t usb_led) { + /* + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // turn on + DDRD |= NUMLOCK_PORT; + PORTD |= NUMLOCK_PORT; + } else { + // turn off + DDRD &= ~NUMLOCK_PORT; + PORTD &= ~NUMLOCK_PORT; + } + */ + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= CAPSLOCK_PORT; + PORTD |= CAPSLOCK_PORT; + } else { + DDRD &= ~CAPSLOCK_PORT; + PORTD &= ~CAPSLOCK_PORT; + } + /* + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRD |= SCROLLLOCK_PORT; + PORTD |= SCROLLLOCK_PORT; + } else { + DDRD &= ~SCROLLLOCK_PORT; + PORTD &= ~SCROLLLOCK_PORT; + } + */ +} + +#ifdef BACKLIGHT_ENABLE + +// sets up Timer 1 for 8-bit PWM +void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE + // default 8 bit mode + TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH + TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW + + // clear output compare value A + // outb(OCR1AH, 0); + // outb(OCR1AL, 0); + + // clear output comparator registers for B + OCR1BH = 0; // outb(OCR1BH, 0); + OCR1BL = 0; // outb(OCR1BL, 0); +} + +bool is_init = false; +void timer1Init(void) { + // timer1SetPrescaler(TIMER1PRESCALE) + // set to DIV/64 + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; + + // reset TCNT1 + TCNT1H = 0; // outb(TCNT1H, 0); + TCNT1L = 0; // outb(TCNT1L, 0); + + // TOIE1: Timer Overflow Interrupt Enable (Timer 1); + TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); + + is_init = true; +} + +void timer1UnInit(void) { + // set prescaler back to NONE + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP + + // disable timer overflow interrupt + TIMSK &= ~_BV(TOIE1); // overflow bit? + + setPWM(0); + + is_init = false; +} + + +// handle TCNT1 overflow +//! Interrupt handler for tcnt1 overflow interrupt +ISR(TIMER1_OVF_vect, ISR_NOBLOCK) +{ + // sei(); + // handle breathing here + #ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + custom_breathing_handler(); + } + #endif + + // TODO call user defined function +} + +// enable timer 1 PWM +// timer1PWMBOn() +void timer1PWMBEnable(void) { + // turn on channel B (OC1B) PWM output + // set OC1B as non-inverted PWM + TCCR1A |= _BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +// disable timer 1 PWM +// timer1PWMBOff() +void timer1PWMBDisable(void) { + TCCR1A &= ~_BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +void enableBacklight(void) { + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high +} + +void disableBacklight(void) { + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low +} + +void startPWM(void) { + timer1Init(); + timer1PWMBEnable(); + enableBacklight(); +} + +void stopPWM(void) { + timer1UnInit(); + disableBacklight(); + timer1PWMBDisable(); +} + +void b_led_init_ports(void) { + /* turn backlight on/off depending on user preference */ + #if BACKLIGHT_ON_STATE == 0 + // DDRx register: sets the direction of Port D + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low + #else + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high + #endif + + timer1PWMSetup(); + startPWM(); + + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +} + +void b_led_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); +} + +// called every matrix scan +void b_led_task(void) { + // do nothing for now +} + +void setPWM(uint16_t xValue) { + if (xValue > TIMER_TOP) { + xValue = TIMER_TOP; + } + OCR1B = xValue; // timer1PWMBSet(xValue); +} + +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd75/backlight_custom.h b/keyboards/ymd75/backlight_custom.h new file mode 100644 index 000000000..7210be840 --- /dev/null +++ b/keyboards/ymd75/backlight_custom.h @@ -0,0 +1,15 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifndef BACKLIGHT_CUSTOM_H +#define BACKLIGHT_CUSTOM_H + +#include +void b_led_init_ports(void); +void b_led_set(uint8_t level); +void b_led_task(void); +void setPWM(uint16_t xValue); + +#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/ymd75/breathing_custom.h b/keyboards/ymd75/breathing_custom.h new file mode 100644 index 000000000..71416b1b4 --- /dev/null +++ b/keyboards/ymd75/breathing_custom.h @@ -0,0 +1,140 @@ +/** + * Breathing effect code for PS2AVRGB boards (ATMEGA32A) + * Works in conjunction with `backlight.c`. + * + * Code adapted from `quantum.c` to register with the existing TIMER1 overflow + * handler in `backlight.c` instead of setting up its own timer. + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_BREATHING + +#include "backlight_custom.h" + +#ifndef BREATHING_PERIOD +#define BREATHING_PERIOD 6 +#endif + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) + +// TODO make this share code with quantum.c + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + +void breathing_enable(void) { + breathing = true; + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + // interrupt already registered +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + // breathing_interrupt_enable(); + breathing = true; +} + +void breathing_disable(void) { + breathing = false; + // backlight_set(get_backlight_level()); + b_led_set(get_backlight_level()); // custom implementation of backlight_set() +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +void custom_breathing_handler(void) { + uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + // breathing_interrupt_disable(); + } + + setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +#endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h new file mode 100644 index 000000000..748f43f26 --- /dev/null +++ b/keyboards/ymd75/config.h @@ -0,0 +1,54 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D + +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER YMDK +#define PRODUCT ymd75 / mt84 +#define DESCRIPTION 75% Keyboard + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_LEVELS 12 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 16 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 15 +#define RGBLIGHT_VAL_STEP 18 + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/ymd75/i2c.c b/keyboards/ymd75/i2c.c new file mode 100644 index 000000000..c27f3e3d1 --- /dev/null +++ b/keyboards/ymd75/i2c.c @@ -0,0 +1,104 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/ymd75/info.json b/keyboards/ymd75/info.json new file mode 100644 index 000000000..a0610afa3 --- /dev/null +++ b/keyboards/ymd75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ymd75", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} diff --git a/keyboards/ymd75/keymaps/default/keymap.c b/keyboards/ymd75/keymaps/default/keymap.c new file mode 100644 index 000000000..17c5244bd --- /dev/null +++ b/keyboards/ymd75/keymaps/default/keymap.c @@ -0,0 +1,94 @@ +/* +Copyright 2017 Luiz Ribeiro +Modified 2018 Wayne K Jones + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _FN 1 + +enum custom_keycodes { + P_MACRO = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: Main Layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│ DEL │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BACKSPACE │HOME │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ END │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ RETURN │PG_UP│ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ LSHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHIFT │ UP │PG_DN│ + * ├──────┬─────┴┬────┴─┬───┴─────┴─────┴─────┴─────┴─────┴────┬┴─────┴─┬───┴────┬─────┼─────┼─────┤ + * │LCTRL │L_GUI │L_ALT │ SPACE │ R_ALT │ R_CTRL │LEFT │DOWN │RIGHT│ + * └──────┴──────┴──────┴──────────────────────────────────────┴────────┴────────┴─────┴─────┴─────┘ + */ + [_MAIN] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, MO(_FN), + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,KC_QUOT, KC_ENT, KC_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_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: Function Layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │R_TOG│R_MOD│R_HUI│R_SAI│R_VAI│R_HUD│R_SAD│R_VAD│ │ │ │VOL- │VOL+ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │BLTOG│BLINC│BLDEC│ £ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┬─────┴┬────┴─┬───┴─────┴─────┴─────┴─────┴─────┴────┬┴─────┴─┬───┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ + * └──────┴──────┴──────┴──────────────────────────────────────┴────────┴────────┴─────┴─────┴─────┘ + */ + [_FN] = LAYOUT( + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_INC, BL_DEC, P_MACRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS ,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +// GBP £ Macro (sends alt 156 - windows users only) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case P_MACRO: + SEND_STRING(SS_DOWN(X_LALT)); + SEND_STRING(SS_TAP(X_KP_1)); + SEND_STRING(SS_TAP(X_KP_5)); + SEND_STRING(SS_TAP(X_KP_6)); + SEND_STRING(SS_UP(X_LALT)); + return false; break; + } + } + return true; +}; diff --git a/keyboards/ymd75/matrix.c b/keyboards/ymd75/matrix.c new file mode 100644 index 000000000..a726ee889 --- /dev/null +++ b/keyboards/ymd75/matrix.c @@ -0,0 +1,108 @@ +/* +Copyright 2017 Luiz Ribeiro +Modified 2018 by Wayne K Jones + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + matrix_scan_quantum(); // also missing in original PS2AVRGB implementation + //matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/ymd75/program b/keyboards/ymd75/program new file mode 100644 index 000000000..a88d9cd9b --- /dev/null +++ b/keyboards/ymd75/program @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +from __future__ import print_function + +import os +import sys +import time +import usb + +if len(sys.argv) < 2: + print('Usage: %s ' % sys.argv[0]) + sys.exit(1) + +print('Searching for ps2avrGB... ', end='') + +dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) +if dev is None: + raise ValueError('Device not found') + +print('Found', end='\n\n') + +print('Device Information:') +print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) +print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) +print('Manufacturer: %s' % (dev.iManufacturer)) +print('Serial: %s' % (dev.iSerialNumber)) +print('Product: %s' % (dev.iProduct), end='\n\n') + +print('Transferring control to bootloader... ', end='') + +dev.set_configuration() + +request_type = usb.util.build_request_type( + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) + +USBRQ_HID_SET_REPORT = 0x09 +HID_REPORT_OPTION = 0x0301 + + +try: + dev.ctrl_transfer( + request_type, + USBRQ_HID_SET_REPORT, + HID_REPORT_OPTION, + 0, + [0, 0, 0xFF] + [0] * 5 + ) +except usb.core.USBError: + # for some reason I keep getting USBError, but it works! + pass + +# wait a bit until bootloader starts up +time.sleep(2) + +print('OK') +print('Programming...') +if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: + print('\nDone!') diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk new file mode 100644 index 000000000..c9baf1316 --- /dev/null +++ b/keyboards/ymd75/rules.mk @@ -0,0 +1,66 @@ +# Copyright 2017 Luiz Ribeiro +# Modified 2018 Wayne Jones (WarmCatUK) + +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +NKRO_ENABLE = no +# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + + +DISABLE_WS2812 = no + +KEY_LOCK_ENABLE = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +#OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c backlight.c + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + + +# programming options +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/ymd75/usbconfig.h b/keyboards/ymd75/usbconfig.h new file mode 100644 index 000000000..73afb18e6 --- /dev/null +++ b/keyboards/ymd75/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'Y', 'M', 'D', 'K' +#define USB_CFG_VENDOR_NAME_LEN 4 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'Y','M','D','7','5',' ','K','e','y','b','o','a','r','d' +#define USB_CFG_DEVICE_NAME_LEN 14 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c new file mode 100644 index 000000000..2259dfa5f --- /dev/null +++ b/keyboards/ymd75/ymd75.c @@ -0,0 +1,95 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "ymd75.h" +//#include "rgblight.h" + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include "quantum.h" +#include "quantum_keycodes.h" +#include "keycode.h" +#include "action.h" + +void matrix_init_user(void); + +#define LAYOUT( \ +K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ +K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ +K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ +K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ +K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ +K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ +){ \ +{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ +{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ +{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ +{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ +{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ +{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ +{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ +{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ +} + +#endif + + + + + + + + + diff --git a/keyboards/zen/keymaps/xyverz/config.h b/keyboards/zen/keymaps/xyverz/config.h new file mode 100644 index 000000000..818f89989 --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/zen/keymaps/xyverz/keymap.c b/keyboards/zen/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..2180a7459 --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/keymap.c @@ -0,0 +1,178 @@ +/* This is the Zen keyboard layout by Xyverz aka u/Zrevyx on r/mk. + This is pretty much a direct port of my Atreus62 keymap. + + The bottom row is fairly Kinesis-ish since the Contour and Advantage + keyboards have been my daily drivers for the last 17 years. I hope + You can get some enjoyment out of this layout should you chose it! + +CHANGELOG: + + 0.1 - Initial commit. Based off of Profet's default keymap. + +TODO: + + * Figure out how to make the bottom row work best for me. + * Add legends in comments for each layer. Maybe. + +*/ + +#include "zen.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _WOW 3 +#define _LOWER 4 +#define _RAISE 5 +#define _ADJUST 16 + +enum atreus52_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + WOW, + LOWER, + RAISE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Aliases to make the keymap clearer. +#define CTLBSPC CTL_T(KC_BSPC) // CTRL when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = KEYMAP( \ + KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_SLSH, KC_EQL, RAISE \ +), + +[_QWERTY] = KEYMAP( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL , \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, RAISE \ +), + +[_COLEMAK] = KEYMAP( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, RAISE \ +), + +[_WOW] = KEYMAP( \ + KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, CTLBSPC, KC_LALT, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_SLSH, KC_EQL, RAISE \ +), + +[_LOWER] = KEYMAP( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, _______, _______, KC_HOME, KC_END, KC_DEL, _______, _______, KC_INS, KC_PGUP, KC_PGDN, _______, _______, _______ \ +), + +[_RAISE] = KEYMAP( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, _______, _______, KC_HOME, KC_END, KC_DEL, _______, _______, KC_INS, KC_PGUP, KC_PGDN, _______, _______, _______ \ +), + +[_ADJUST] = KEYMAP( \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_SNK, _______, QWERTY, COLEMAK, DVORAK, WOW, _______, \ + RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +}; + + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case WOW: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_WOW); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/zen/keymaps/xyverz/rules.mk b/keyboards/zen/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..22b6ec476 --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/zen/matrix.c b/keyboards/zen/matrix.c index 12f22214e..6e274d3ba 100644 --- a/keyboards/zen/matrix.c +++ b/keyboards/zen/matrix.c @@ -148,7 +148,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h new file mode 100755 index 000000000..456d225aa --- /dev/null +++ b/keyboards/zlant/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matthew Cordier +#define PRODUCT Zlant +#define DESCRIPTION keyboard firmware for Zlant + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, D4, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B7, D1, D2, D3, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN D6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/zlant/keymaps/default/keymap.c b/keyboards/zlant/keymaps/default/keymap.c new file mode 100755 index 000000000..d586c841d --- /dev/null +++ b/keyboards/zlant/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + RGB_HUI, RGB_HUD, KC_LGUI, KC_LALT, KC_LSFT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + [FN] = LAYOUT( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_HOME, KC_TRNS, KC_TRNS, + RGB_VAI, RGB_VAD, RESET, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_TRNS, KC_DEL) + +}; diff --git a/keyboards/zlant/keymaps/default/readme.md b/keyboards/zlant/keymaps/default/readme.md new file mode 100644 index 000000000..968702a16 --- /dev/null +++ b/keyboards/zlant/keymaps/default/readme.md @@ -0,0 +1,5 @@ +![Zlant Layout Image](https://i.imgur.com/Siz8qsL.jpg) + +# Default Zlant Layout + +This is the default layout that comes flashed on the Zlant prototype. diff --git a/keyboards/zlant/readme.md b/keyboards/zlant/readme.md new file mode 100644 index 000000000..0780cedeb --- /dev/null +++ b/keyboards/zlant/readme.md @@ -0,0 +1,17 @@ +# Zlant + +![Zlant](https://i.imgur.com/Siz8qsL.jpg) + +A compact 40% inspired by the Plank with a staggered layout instead. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) + +Hardware Supported: Zlant Prototype PCB + +Hardware Availability: Group buy soon + +Make example for this keyboard (after setting up your build environment): + + make zlant:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk new file mode 100755 index 000000000..482f99b22 --- /dev/null +++ b/keyboards/zlant/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/zlant/zlant.c b/keyboards/zlant/zlant.c new file mode 100755 index 000000000..b60e9425c --- /dev/null +++ b/keyboards/zlant/zlant.c @@ -0,0 +1 @@ +#include "zlant.h" diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h new file mode 100755 index 000000000..48c7b3f40 --- /dev/null +++ b/keyboards/zlant/zlant.h @@ -0,0 +1,18 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} + +#endif diff --git a/layouts/community/60_ansi/mechmerlin-ansi/readme.md b/layouts/community/60_ansi/mechmerlin-ansi/readme.md index b845334f5..e641c058d 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/readme.md +++ b/layouts/community/60_ansi/mechmerlin-ansi/readme.md @@ -11,7 +11,6 @@ It is used on his ## Keymap Notes - Highly influenced by the KBP V60 and WKL B.Face standard layouts -- Does not support any form of inswitch or underglow lighting as Merlin hates them. - Arrow toggle switch is FN + Space ### Build diff --git a/layouts/community/60_ansi/readme.md b/layouts/community/60_ansi/readme.md index 15f51d3fa..9e81c9615 100644 --- a/layouts/community/60_ansi/readme.md +++ b/layouts/community/60_ansi/readme.md @@ -1,3 +1,68 @@ # 60_ansi - LAYOUT_60_ansi \ No newline at end of file +This is the standard 60% ANSI keyboard layout. + +## Requirements + +### 1. Layout defined + +A keyboard's `.h` file needs to have `LAYOUT_60_ansi` defined + +```c +#define LAYOUT_60_ansi( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K10, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} +) +``` + +This layout needs to match the layout defined in + + qmk_firmware/layouts/community/layout.json + +### 2. Configuring rules.mk + +`rules.mk` needs to have the following line: + + LAYOUTS = 60_ansi + +### 3. Defining a keymap + +A keymap must be defined at + + qmk_firmware/layouts/community/60_ansi/yourfoldername/keymap.c + +This keymap must have a `LAYOUT_60_ansi` layout defined. + +```c +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT_60_ansi( + 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_BSLASH, \ + 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, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL), + }; +``` + +## Usage + +To make generate a hex file, type + + make yourkeyboard:yourfoldername + +This hex file will contain a keymap with layout `LAYOUT_60_ansi` derived from + + qmk_firmware/layouts/community/60_ansi/yourfoldername/keymap.c diff --git a/layouts/community/60_ansi/talljoe-ansi/config.h b/layouts/community/60_ansi/talljoe-ansi/config.h index 9e27b1b0a..1990b0ee3 100644 --- a/layouts/community/60_ansi/talljoe-ansi/config.h +++ b/layouts/community/60_ansi/talljoe-ansi/config.h @@ -3,9 +3,10 @@ #include QMK_KEYBOARD_CONFIG_H +#define PREVENT_STUCK_MODIFIERS #define ENABLE_GAME_LAYER -#define LAYOUT( \ +#define TEMPLATE( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ 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, \ diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h index 0eacbde33..81ab5cf89 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h @@ -3,9 +3,10 @@ #include QMK_KEYBOARD_CONFIG_H +#define PREVENT_STUCK_MODIFIERS #define ENABLE_GAME_LAYER -#define LAYOUT( \ +#define TEMPLATE( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ 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, \ diff --git a/layouts/community/60_hhkb/talljoe-hhkb/config.h b/layouts/community/60_hhkb/talljoe-hhkb/config.h new file mode 100644 index 000000000..938ea6cd6 --- /dev/null +++ b/layouts/community/60_hhkb/talljoe-hhkb/config.h @@ -0,0 +1,23 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS +#define ENABLE_GAME_LAYER + +#define TEMPLATE( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ +) LAYOUT_60_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K41, K42, K45, K48, K4C \ +) + +#endif //CONFIG_USER_H diff --git a/layouts/community/60_hhkb/talljoe-hhkb/keymap.c b/layouts/community/60_hhkb/talljoe-hhkb/keymap.c new file mode 100644 index 000000000..7812add81 --- /dev/null +++ b/layouts/community/60_hhkb/talljoe-hhkb/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/layouts/community/60_hhkb/talljoe-hhkb/rules.mk b/layouts/community/60_hhkb/talljoe-hhkb/rules.mk new file mode 100644 index 000000000..92007fe8a --- /dev/null +++ b/layouts/community/60_hhkb/talljoe-hhkb/rules.mk @@ -0,0 +1 @@ +USER_NAME := talljoe diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 03fa67a7d..92c790957 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -57,11 +57,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_ergodox_pretty_wrapper( // left hand // right hand - KC_EQL, ________________NUMBER_LEFT________________, OSL(_MOUS), OSL(_MOUS), ________________NUMBER_RIGHT_______________, KC_MINS, + KC_EQL, ________________NUMBER_LEFT________________, _______, _______, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: COLEMAK layer @@ -89,11 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [_COLEMAK] = LAYOUT_ergodox_pretty_wrapper( // left hand // right hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: DVORAK Layout @@ -121,11 +121,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [_DVORAK] = LAYOUT_ergodox_pretty_wrapper( // left hand // right hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS, KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: WORKMAN layer @@ -153,16 +153,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [_WORKMAN] = LAYOUT_ergodox_pretty_wrapper( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, KC_CCCV, __________________ERGODOX_THUMB_CLUSTER_____________________ ), // Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) - [_MODS] = LAYOUT_ergodox_pretty( + [_MODS] = LAYOUT_ergodox_pretty_wrapper( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -173,37 +173,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______ ), - /* Keymap 3: Symbol Layer -* -* ,--------------------------------------------------. ,--------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| -* | RESET | ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 | -* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| -* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc | -* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| -* | VRSN | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE | -* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' -* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT | -* `----------------------------------' `----------------------------------' -* ,-------------. ,-------------. -* | RGBM | RED | | OFF | SOLID| -* ,------|------|------| |------+------+------. -* | | | GREEN| | | | | -* | RGB | RGB |------| |------| NUM0 | NUME | -* | DARK |BRITE | BLUE | | | | | -* `--------------------' `--------------------' -*/ - [_SYMB] = LAYOUT_ergodox_pretty( - EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_QWERTY, KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_RST, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_COLEMAK, KC_WORKMAN, KC_PPLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, KC_F12, - KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, KC_PSCREEN, - VRSN, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_DVORAK, TG(_MODS), KC_NLCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, KC_PAUSE, - KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCLN, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_TRNS, - RGB_SMOD, KC_RGB_T, KC_TRNS, KC_TRNS, - RGB_HUI, KC_TRNS, - RGB_M_R, RGB_M_SW, RGB_HUD, KC_PDOT, KC_KP_0, KC_PENT - ), /* Keymap 4: Customized Overwatch Layout * @@ -226,7 +195,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | H | | | | | * `--------------------' `--------------------' */ - [_GAMEPAD] = LAYOUT_ergodox_pretty( + [_GAMEPAD] = LAYOUT_ergodox_pretty_wrapper( KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, @@ -258,7 +227,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | SHIFT| ALT | 0MAC | | | | | * `--------------------' `--------------------' */ - [_DIABLO] = LAYOUT_ergodox_pretty( + [_DIABLO] = LAYOUT_ergodox_pretty_wrapper( KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -269,36 +238,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT ), -/* Keymap 4: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | MsUp | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | Play | Stop | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | MWUp | | | | | - * | Lclk | Rclk |------| |------| MBn4 | MBn5 | - * | | | MWDn | | Mclk | | | - * `--------------------' `--------------------' - */ - [_MOUS] = LAYOUT_ergodox_pretty( - KC_NO, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, - KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, - KC_WH_U, KC_NO, - KC_BTN1, KC_BTN2, KC_WH_D, KC_BTN3, KC_BTN4, KC_BTN5 + [_LOWER] = LAYOUT_ergodox_pretty_wrapper( + _______, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ergodox_pretty_wrapper( + _______, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST, + VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, EPRM, + RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), + TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index a3b23979a..5c3c1ff81 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -76,7 +76,7 @@ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, \ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, \ k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, \ - k70, k71, k72, k73, k76, k77, k78, k79) + k70, k71, k72, k73, k74, k77, k78, k79) # define K80(a) KC_TRNS #endif @@ -241,7 +241,7 @@ static char cfq_word_lut_title_caps[ ]; #define LAYER_BASE 0 /* default layer */ -#define LAYER_SYMB 1 /* symbols */ +#define LAYER_KPAD 1 /* keypad */ #define LAYER_MDIA 2 /* media keys */ #define LAYER_FKEY 3 /* F-Keys & Words */ @@ -382,8 +382,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * '--------------------' '--------------------' */ -/* SYMBOLS */ -[LAYER_SYMB] = LAYOUT_ergodox_76_or_80( +/* KEYPAD & MACRO */ +[LAYER_KPAD] = LAYOUT_ergodox_76_or_80( /* left hand */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_CBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_REQL, M_BRACKET_IN_PRN, @@ -403,47 +403,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, K80(L1K2), K80(L1K3), KC_TRNS, KC_TRNS, KC_TRNS ), -/* Keymap 2: F-Keys, media and mouse keys +/* Keymap 2: Numbers, media and mouse keys * * .--------------------------------------------------. .--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | 1 | 2 | 3 | 4 | 5 | | | Mute | 6 | 7 | 8 | 9 | 0 | | * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | |MWhlUp| | | | | | | | | + * | | | | MsUp | | |MWhlUp| |VolUp | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | | - * |--------+------+------+------+------+------|MWhlDn| | |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|MWhlDn| |VolDn |------+------+------+------+------+--------| * | | | Rclk | Mclk | Lclk | | | | | | | | | | | * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' * | | | | | | | | | | | | * '----------------------------------' '----------------------------------' * .-------------. .-------------. - * | MRwd | MFwd | | MPrv | MNxt | + * | | | | MRwd | MFwd | * .------+------+------| |------+------+------. - * | | | | |VolUp | | | - * | Mute | |------| |------| | Play | - * | | | | |VolDn | | | + * | | | | | MPrv | | | + * | | |------| |------| | Play | + * | | | | | MNxt | | | * '--------------------' '--------------------' */ -/* MEDIA AND MOUSE */ +/* MEDIA, MOUSE & NUMBERS */ [LAYER_MDIA] = LAYOUT_ergodox_76_or_80( /* left hand */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN3, KC_BTN1, KC_TRNS, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_MRWD, KC_MFFD, + KC_TRNS, KC_TRNS, K80(L2K0), K80(L2K1), KC_TRNS, - KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, /* right hand */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MUTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_MPRV, KC_MNXT, - KC_VOLU, K80(L2K2), K80(L1K3), - KC_VOLD, KC_TRNS, KC_MPLY + KC_MRWD, KC_MFFD, + KC_MPRV, K80(L2K2), K80(L2K3), + KC_MNXT, KC_TRNS, KC_MPLY ), /* Keymap 3: Entire Words (one for each key) * @@ -491,8 +491,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(LAYER_SYMB), /* FN1 - Momentary Layer 1 (Symbols) */ - [2] = ACTION_LAYER_TAP_TOGGLE(LAYER_MDIA), /* FN2 - Momentary Layer 2 (Media) */ + [1] = ACTION_LAYER_TAP_TOGGLE(LAYER_KPAD), /* FN1 - Momentary Layer 1 (KeyPad) */ + [2] = ACTION_LAYER_TAP_TOGGLE(LAYER_MDIA), /* FN2 - Momentary Layer 2 (Media, Mouse) */ [3] = ACTION_LAYER_TAP_TOGGLE(LAYER_FKEY), /* FN3 - Momentary Layer 3 (FKey's & Words) */ }; diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index d800a0a02..8bc15dd31 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -20,7 +20,7 @@ if using keys from both sides is inconvenient - the symbol layer has macros at the same key locations to type matching pairs. -- The extra space-bar on the lower-left looks like it's in an obscure location, +- The space-bar on the lower-left looks like it's in an obscure location, however using the larger thumb cluster ended up being more of a reach while typing. @@ -122,30 +122,35 @@ Notes: '--------------------' '--------------------' ``` -## Keymap 2: Keymap 2: Media and mouse keys +## Keymap 2: Media, Mouse Keys and Numbers + +Notes: + +- Numbers are included on this layer since some applications differentiate + between numbers top row and keypad. ``` .--------------------------------------------------. .--------------------------------------------------. -| | | | | | | | | | | | | | | | +| | 1 | 2 | 3 | 4 | 5 | | | Mute | 6 | 7 | 8 | 9 | 0 | | |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| -| | | | MsUp | | |MWhlUp| | | | | | | | | +| | | | MsUp | | |MWhlUp| |VolUp | | | | | | | |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | | -|--------+------+------+------+------+------|MWhlDn| | |------+------+------+------+------+--------| +|--------+------+------+------+------+------|MWhlDn| |VolDn |------+------+------+------+------+--------| | | | Rclk | Mclk | Lclk | | | | | | | | | | | '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' | | | | | | | | | | | | '----------------------------------' '----------------------------------' .-------------. .-------------. - | MRwd | MFwd | | MPrv | MNxt | + | | | | MRwd | MFwd | .------+------+------| |------+------+------. - | | | | |VolUp | | | - | Mute | |------| |------| | Play | - | | | | |VolDn | | | + | | | | | MPrv | | | + | | |------| |------| | Play | + | | | | | MNxt | | | '--------------------' '--------------------' ``` -## Keymap 3: K-Keys & User defined words +## Keymap 3: F-Keys & User Defined Words This is for assigning whole words to single keys. You can define the arguments (which must be quoted) using: `CFQ_WORD_[A-Z]` @@ -174,6 +179,13 @@ eg: `-DCFQ_WORD_E=\"my@email.com\"` ## Changelog +- 2018/05/29 + Add number keys for cases when keypad numbers are handled differently. + +- 2018/05/19 + Move all media keys to right thumb cluster + (matching page up/down, home/end locations). + - 2018/04/14 Add `CFQ_USE_80_KEYS` to optionally support an 80 key layout. diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index 05ad92fd2..a05f741a7 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -34,6 +34,7 @@ enum custom_keycodes { #define KC_GRVF LT(_FKEYS, KC_GRV) #define KC_ENTS MT(MOD_LSFT, KC_ENT) #define KC_BL_S BL_STEP +#define KC_BL_T BL_TOGG const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -81,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - BL_S, , , , ,DEL , DEL , , P0 ,PDOT, , + BL_S,BL_T, , , ,DEL , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), diff --git a/layouts/community/ortho_4x12/talljoe/config.h b/layouts/community/ortho_4x12/talljoe/config.h index c2a9567bb..61229e7f6 100644 --- a/layouts/community/ortho_4x12/talljoe/config.h +++ b/layouts/community/ortho_4x12/talljoe/config.h @@ -4,7 +4,7 @@ #include QMK_KEYBOARD_CONFIG_H #define SPACE_COUNT 3 -#define LAYOUT( \ +#define TEMPLATE( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ 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, \ diff --git a/layouts/community/ortho_4x12/xyverz/config.h b/layouts/community/ortho_4x12/xyverz/config.h new file mode 100644 index 000000000..a5ddc2e73 --- /dev/null +++ b/layouts/community/ortho_4x12/xyverz/config.h @@ -0,0 +1,30 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define MIDI_BASIC + +#define USE_SERIAL + +#define EE_HANDS + +#undef RGBLED_NUM +#ifdef KEYBOARD_planck_rev5 + #define RGBLED_NUM 10 + #define RGB_DI_PIN D1 +#endif +#ifdef KEYBOARD_levinson_rev2 + #define RGBLED_NUM 1 +#endif +#ifdef KEYBOARD_lets_split_rev2 + #define RGBLED_NUM 1 +#endif + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 8 + +#endif diff --git a/keyboards/lets_split/keymaps/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c similarity index 74% rename from keyboards/lets_split/keymaps/xyverz/keymap.c rename to layouts/community/ortho_4x12/xyverz/keymap.c index 9ed58b55f..72ddbacf8 100644 --- a/keyboards/lets_split/keymaps/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -1,4 +1,4 @@ -#include "lets_split.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -15,7 +15,7 @@ extern keymap_config_t keymap_config; #define _RAISE 4 #define _ADJUST 16 -enum planck_keycodes { +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, @@ -28,6 +28,11 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases to keep the keymap tidy +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -36,16 +41,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT ( \ +[_QWERTY] = LAYOUT_ortho_4x12 ( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Colemak @@ -54,16 +59,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT ( \ +[_COLEMAK] = LAYOUT_ortho_4x12 ( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Dvorak @@ -77,64 +82,64 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT ( \ +[_DVORAK] = LAYOUT_ortho_4x12 ( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | Caps | | Mute | Vol- | Vol+ | | | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT ( \ +[_LOWER] = LAYOUT_ortho_4x12 ( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ - _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ + BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Caps | | Mute | Vol- | Vol+ | | | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT ( \ +[_RAISE] = LAYOUT_ortho_4x12 ( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, \ - _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, \ + BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | Reset|RGB PL|RGB BR|RGB RB|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | | + * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT ( \ +[_ADJUST] = LAYOUT_ortho_4x12 ( \ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ - _______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ + _______, RESET, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) @@ -146,6 +151,16 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +void matrix_init_user(void) { +#ifdef BOOTLOADER_CATERINA + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +#endif +}; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: @@ -186,6 +201,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; +/* case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; */ } return true; } diff --git a/layouts/community/ortho_4x12/xyverz/readme.md b/layouts/community/ortho_4x12/xyverz/readme.md new file mode 100644 index 000000000..1ec10a0da --- /dev/null +++ b/layouts/community/ortho_4x12/xyverz/readme.md @@ -0,0 +1,95 @@ +# Xyverz's 4x12 Ortho Keymap + +## About this keymap: + +I'm moving all my 4x12s to the same keymap since I pretty much use it across all of them anyway, regardless of whether they're split or not. Gotta get the `LAYOUT` lovin', yo. + +This revision includes this documentation and introduction of the individual RGB mode keys in the `ADJUST` layer. + +## Still to do: + + * Enjoy this revision; figure out new things later. + +### Qwerty layer + +``` + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | S | D | F | G | H | J | K | L | ; | " | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI | Enter| + `-----------------------------------------------------------------------------------' + ``` + +### Colemak layer + +``` + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | R | S | T | D | H | N | E | I | O | " | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI | Enter| + `-----------------------------------------------------------------------------------' + ``` + +### Dvorak layer + +``` + ,-----------------------------------------------------------------------------------. + | Tab | " | , | . | P | Y | F | G | C | R | L | / | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | O | E | U | I | D | H | T | N | S | - | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI | Enter| + `-----------------------------------------------------------------------------------' + ``` + +### LOWER layer + +``` + ,-----------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | _ | + | { | } | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | Prev | Play | Next | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | | | + `-----------------------------------------------------------------------------------' + ``` + +### RAISE layer + +``` + ,-----------------------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | - | = | [ | ] | \ | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | Prev | Play | Next | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | | | + `-----------------------------------------------------------------------------------' + ``` + +### ADJUST layer + +``` + ,-----------------------------------------------------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | Reset|RGB PL|RGB BR|RGB RB|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + |------+------+------+------+------+------|------+------+------+------+------+------| + |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' + ``` diff --git a/keyboards/planck/keymaps/xyverz/rules.mk b/layouts/community/ortho_4x12/xyverz/rules.mk similarity index 73% rename from keyboards/planck/keymaps/xyverz/rules.mk rename to layouts/community/ortho_4x12/xyverz/rules.mk index 55bf853a0..3ab674a2a 100644 --- a/keyboards/planck/keymaps/xyverz/rules.mk +++ b/layouts/community/ortho_4x12/xyverz/rules.mk @@ -1,4 +1,5 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable RGB Underglow functionality AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR diff --git a/layouts/community/ortho_5x12/xyverz/config.h b/layouts/community/ortho_5x12/xyverz/config.h new file mode 100644 index 000000000..0481aa814 --- /dev/null +++ b/layouts/community/ortho_5x12/xyverz/config.h @@ -0,0 +1,25 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +// Number of backlight levels +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 8 + +/* ws2812 RGB LED */ +#undef RGB_DI_PIN +#define RGB_DI_PIN B3 +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 11 // Number of LEDs +#undef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 8 +#undef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 8 +#undef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 8 + +// for the split boards // +#define USE_SERIAL +#define EE_HANDS + +#endif diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c similarity index 57% rename from keyboards/preonic/keymaps/xyverz/keymap.c rename to layouts/community/ortho_5x12/xyverz/keymap.c index 53e378e40..a0f1274d0 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -1,4 +1,8 @@ #include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; // 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. @@ -11,19 +15,24 @@ #define _RAISE 4 #define _ADJUST 16 -enum preonic_keycodes { +enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, - BACKLIT + ADJUST, }; // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases to keep the keymap tidy +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -39,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_preonic_grid( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, \ - KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ +[_QWERTY] = LAYOUT_ortho_5x12 ( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL , \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Colemak @@ -60,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_preonic_grid( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ +[_COLEMAK] = LAYOUT_ortho_5x12 ( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Dvorak @@ -81,95 +90,84 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_preonic_grid( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ +[_DVORAK] = LAYOUT_ortho_5x12 ( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Lower * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | + * | | | | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | + * | Caps | | Mute | Vol- | Vol+ | | | | + | { | } | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * | | | Prev | Play | Next | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ - BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ +[_LOWER] = LAYOUT_ortho_5x12 ( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), /* Raise * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | \ | + * | | | | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | + * | Caps | | Mute | Vol- | Vol+ | | | | = | [ | ] | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * | | | Prev | Play | Next | | | | PrSc | Slck | Paus | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS, \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, \ - BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ +[_RAISE] = LAYOUT_ortho_5x12 ( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + BL_STEP, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Reset| | | | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | |RGB PL|RGB BR|RGB RB|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | | + * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_preonic_grid( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ +[_ADJUST] = LAYOUT_ortho_5x12 ( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; #ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); #endif void persistent_default_layer_set(uint16_t default_layer) { @@ -179,97 +177,64 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); } - return true; -}; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; +/* case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; */ + } + return true; } - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif diff --git a/layouts/community/ortho_5x12/xyverz/rules.mk b/layouts/community/ortho_5x12/xyverz/rules.mk new file mode 100644 index 000000000..a8f3432a0 --- /dev/null +++ b/layouts/community/ortho_5x12/xyverz/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/layouts/community/tkl_ansi/talljoe-tkl/config.h b/layouts/community/tkl_ansi/talljoe-tkl/config.h new file mode 100644 index 000000000..8b27d4136 --- /dev/null +++ b/layouts/community/tkl_ansi/talljoe-tkl/config.h @@ -0,0 +1,25 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS +#define ENABLE_GAME_LAYER + +#define TEMPLATE_TKL(\ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) LAYOUT_tkl_ansi( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) + +#endif //CONFIG_USER_H diff --git a/layouts/community/tkl_ansi/talljoe-tkl/keymap.c b/layouts/community/tkl_ansi/talljoe-tkl/keymap.c new file mode 100644 index 000000000..b5dc54492 --- /dev/null +++ b/layouts/community/tkl_ansi/talljoe-tkl/keymap.c @@ -0,0 +1,89 @@ +#ifdef KEYBOARD_zeal60 +#include "config.h" +#include "zeal60.h" +#include "zeal_backlight.h" +#include "action_layer.h" +#include "solarized.h" +#include "talljoe.h" + +// from zeal_backlight.c +// we want to be able to set indicators for the spacebar stabs +// but they are not represented by a row/index. +extern zeal_backlight_config g_config; +void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ); + +void set_backlight_defaults(void) { + uint8_t space; + uint8_t caps_lock; + map_row_column_to_led(3, 12, &caps_lock); + map_row_column_to_led(4, 7, &space); + zeal_backlight_config default_values = { + .use_split_backspace = USE_SPLIT_BACKSPACE, + .use_split_left_shift = USE_SPLIT_LEFT_SHIFT, + .use_split_right_shift = USE_SPLIT_RIGHT_SHIFT, + .use_7u_spacebar = USE_7U_SPACEBAR, + .use_iso_enter = USE_ISO_ENTER, + .disable_when_usb_suspended = 1, + .disable_after_timeout = 0, + .brightness = 255, + .effect = 10, + .color_1 = solarized.base2, + .color_2 = solarized.base02, + .caps_lock_indicator = { .index = caps_lock, .color = solarized.red }, + .layer_1_indicator = { .index = space, .color = solarized.blue }, + .layer_2_indicator = { .index = space, .color = solarized.yellow }, + .layer_3_indicator = { .index = 254, .color = solarized.red }, + .alphas_mods = { + BACKLIGHT_ALPHAS_MODS_ROW_0, + BACKLIGHT_ALPHAS_MODS_ROW_1, + BACKLIGHT_ALPHAS_MODS_ROW_2, + BACKLIGHT_ALPHAS_MODS_ROW_3, + BACKLIGHT_ALPHAS_MODS_ROW_4 } + }; + memcpy(&g_config, &default_values, sizeof(zeal_backlight_config)); + backlight_config_save(); + + solarized_t* S = &solarized; + HSV alphas = S->base2; + HSV custom_color_map[MATRIX_ROWS][MATRIX_COLS] = CM( + S->red, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->red, + S->orange, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->orange, + S->green, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->green, + S->blue, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, alphas, S->blue, S->blue, + S->violet, S->magenta, S->yellow, alphas, S->yellow, S->magenta, S->violet, S->green + ); + for (uint8_t row = 0; row < MATRIX_ROWS; ++row) { + for (uint8_t col = 0; col < MATRIX_COLS; ++col) { + backlight_set_key_color(row, col, custom_color_map[row][col]); + } + } +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + static uint8_t last_effect; + switch (keycode) { + case DFAULTS: + if (IS_PRESSED(record->event)) set_backlight_defaults(); + return false; + case BL_TOGG: + if (IS_PRESSED(record->event)) { + if (g_config.effect) { + last_effect = g_config.effect; + g_config.effect = 0; + } else { + g_config.effect = last_effect; + } + } + return false; + case EFFECT...EFFECT_END: + if (IS_PRESSED(record->event)) { + uint8_t effect = keycode - EFFECT; + g_config.effect = effect; + backlight_config_save(); + } + return false; + } + + return true; +} +#endif diff --git a/layouts/community/tkl_ansi/talljoe-tkl/rules.mk b/layouts/community/tkl_ansi/talljoe-tkl/rules.mk new file mode 100644 index 000000000..92007fe8a --- /dev/null +++ b/layouts/community/tkl_ansi/talljoe-tkl/rules.mk @@ -0,0 +1 @@ +USER_NAME := talljoe diff --git a/layouts/default/60_hhkb/default_60_hhkb/keymap.c b/layouts/default/60_hhkb/default_60_hhkb/keymap.c new file mode 100644 index 000000000..60d628f12 --- /dev/null +++ b/layouts/default/60_hhkb/default_60_hhkb/keymap.c @@ -0,0 +1,65 @@ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | + |------+------+-----------------------+------+------| + */ + + [BASE] = LAYOUT_60_hhkb( // default layer + KC_ESC, 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_GRV, \ + 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(HHKB), \ + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), + + + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | | | | | | + | - | End | PgD | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [HHKB] = LAYOUT_60_hhkb( + KC_PWR, 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_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/layouts/default/60_hhkb/layout.json b/layouts/default/60_hhkb/layout.json new file mode 100644 index 000000000..9dce76a2e --- /dev/null +++ b/layouts/default/60_hhkb/layout.json @@ -0,0 +1,5 @@ +["Esc","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=","|\n\\","~\n`"], +[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"Delete"], +[{w:1.75},"Control","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], +[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:1.75},"Shift","Fn"], +[{x:1.5},"Os",{w:1.5},"Alt",{a:7,w:7},"",{a:4,w:1.5},"Alt","Os"] diff --git a/layouts/default/60_hhkb/readme.md b/layouts/default/60_hhkb/readme.md new file mode 100644 index 000000000..f02d13e4d --- /dev/null +++ b/layouts/default/60_hhkb/readme.md @@ -0,0 +1,3 @@ +# 60_hhkb + + LAYOUT_60_hhkb \ No newline at end of file diff --git a/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c b/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c new file mode 100644 index 000000000..3901595b7 --- /dev/null +++ b/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT \ + ), + + [1] = LAYOUT_numpad_6x4( + RESET, KC_TAB, KC_TRNS, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_HOME, KC_UP, KC_PGUP, \ + KC_LEFT, KC_NO, KC_RGHT, KC_PPLS, \ + KC_END, KC_DOWN, KC_PGDN, \ + KC_INS, KC_DEL, KC_PENT \ + ), +}; diff --git a/layouts/default/numpad_6x4/layout.json b/layouts/default/numpad_6x4/layout.json new file mode 100644 index 000000000..7264cd5a6 --- /dev/null +++ b/layouts/default/numpad_6x4/layout.json @@ -0,0 +1,6 @@ +["","","",""], +[{y:0.5},"","","",""], +["","","",{h:2},""], +["","",""], +["","","",{h:2},""], +[{w:2},"",""] diff --git a/layouts/default/numpad_6x4/readme.md b/layouts/default/numpad_6x4/readme.md new file mode 100644 index 000000000..c539baef7 --- /dev/null +++ b/layouts/default/numpad_6x4/readme.md @@ -0,0 +1,3 @@ +# numpad_6x4 + + LAYOUT_numpad_6x4 \ No newline at end of file diff --git a/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c b/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c new file mode 100644 index 000000000..39c1ed481 --- /dev/null +++ b/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( + 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_F14, KC_F15, KC_F16, \ + KC_F17, KC_F18, KC_F19, KC_F20, \ + KC_F21, KC_F22, KC_F23, KC_F24 \ + ), +}; diff --git a/layouts/default/ortho_6x4/layout.json b/layouts/default/ortho_6x4/layout.json new file mode 100644 index 000000000..4db1bb0fd --- /dev/null +++ b/layouts/default/ortho_6x4/layout.json @@ -0,0 +1,6 @@ +["","","",""], +["","","",""], +["","","",""], +["","","",""], +["","","",""], +["","","",""], diff --git a/layouts/default/ortho_6x4/readme.md b/layouts/default/ortho_6x4/readme.md new file mode 100644 index 000000000..6014d4b19 --- /dev/null +++ b/layouts/default/ortho_6x4/readme.md @@ -0,0 +1,3 @@ +# ortho_6x4 + + LAYOUT_ortho_6x4 \ No newline at end of file diff --git a/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c b/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c new file mode 100644 index 000000000..1db717c8d --- /dev/null +++ b/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, \ + 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_END ,KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, \ + KC_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_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) \ +}; diff --git a/layouts/default/tkl_ansi/layout.json b/layouts/default/tkl_ansi/layout.json new file mode 100644 index 000000000..54492b98f --- /dev/null +++ b/layouts/default/tkl_ansi/layout.json @@ -0,0 +1,6 @@ +["Esc",{x:1},"F1","F2","F3","F4",{x:0.5},"F5","F6","F7","F8",{x:0.5},"F9","F10","F11","F12",{x:0.25},"PrtSc","Scroll Lock","Pause\nBreak"], +[{y:0.5},"~\n`","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","_\n-","+\n=",{w:2},"Backspace",{x:0.25},"Insert","Home","PgUp"], +[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]",{w:1.5},"|\n\\",{x:0.25},"Delete","End","PgDn"], +[{w:1.75},"Caps Lock","A","S","D","F","G","H","J","K","L",":\n;","\"\n'",{w:2.25},"Enter"], +[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.75},"Shift",{x:1.25},"↑"], +[{w:1.25},"Ctrl",{w:1.25},"Win",{w:1.25},"Alt",{a:7,w:6.25},"",{a:4,w:1.25},"Alt",{w:1.25},"Win",{w:1.25},"Menu",{w:1.25},"Ctrl",{x:0.25},"←","↓","→"] diff --git a/layouts/default/tkl_ansi/readme.md b/layouts/default/tkl_ansi/readme.md new file mode 100644 index 000000000..94d5df122 --- /dev/null +++ b/layouts/default/tkl_ansi/readme.md @@ -0,0 +1,3 @@ +# tkl_ansi + + LAYOUT_tkl_ansi \ No newline at end of file diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index e0fe47654..c87ef115a 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -18,6 +18,10 @@ #include "process_leader.h" +#ifndef LEADER_TIMEOUT + #define LEADER_TIMEOUT 300 +#endif + __attribute__ ((weak)) void leader_start(void) {} diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h index da7a3d2ef..59c3eed1b 100644 --- a/quantum/process_keycode/process_leader.h +++ b/quantum/process_keycode/process_leader.h @@ -19,14 +19,13 @@ #include "quantum.h" + bool process_leader(uint16_t keycode, keyrecord_t *record); void leader_start(void); void leader_end(void); -#ifndef LEADER_TIMEOUT - #define LEADER_TIMEOUT 200 -#endif + #define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) #define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) #define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0) diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c index bc365dddf..6998639f2 100644 --- a/quantum/process_keycode/process_terminal.c +++ b/quantum/process_keycode/process_terminal.c @@ -158,7 +158,7 @@ void terminal_keymap(void) { for (int c = 0; c < MATRIX_COLS; c++) { uint16_t keycode = pgm_read_word(&keymaps[layer][r][c]); char keycode_s[8]; - sprintf(keycode_s, "0x%04x, ", keycode); + sprintf(keycode_s, "0x%04x,", keycode); send_string(keycode_s); } send_string(newline); diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index f3d012bc3..992ce99de 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -18,7 +18,7 @@ #include "rgb_matrix.h" #include -#include "TWIlib.h" +#include "i2c_master.h" #include #include #include "progmem.h" @@ -722,10 +722,8 @@ void rgb_matrix_indicators_user(void) {} // } void rgb_matrix_init_drivers(void) { - //sei(); - // Initialize TWI - TWIInit(); + i2c_init(); IS31FL3731_init( DRIVER_ADDR_1 ); IS31FL3731_init( DRIVER_ADDR_2 ); diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 5cfbf307c..bb4b1e62d 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -46,7 +46,6 @@ __attribute__ ((weak)) const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; rgblight_config_t rgblight_config; -rgblight_config_t inmem_config; LED_TYPE led[RGBLED_NUM]; uint8_t rgblight_inited = 0; @@ -169,7 +168,7 @@ void rgblight_init(void) { #endif if (rgblight_config.enable) { - rgblight_mode(rgblight_config.mode); + rgblight_mode_noeeprom(rgblight_config.mode); } } @@ -226,7 +225,7 @@ uint32_t rgblight_get_mode(void) { return rgblight_config.mode; } -void rgblight_mode(uint8_t mode) { +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { if (!rgblight_config.enable) { return; } @@ -237,8 +236,12 @@ void rgblight_mode(uint8_t mode) { } else { rgblight_config.mode = mode; } - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight mode: %u\n", rgblight_config.mode); + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); + } else { + xprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); + } if (rgblight_config.mode == 1) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); @@ -262,11 +265,20 @@ void rgblight_mode(uint8_t mode) { rgblight_timer_disable(); #endif } - rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } +void rgblight_mode(uint8_t mode) { + rgblight_mode_eeprom_helper(mode, true); +} + +void rgblight_mode_noeeprom(uint8_t mode) { + rgblight_mode_eeprom_helper(mode, false); +} + + void rgblight_toggle(void) { - xprintf("rgblight toggle: rgblight_config.enable = %u\n", !rgblight_config.enable); + xprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); if (rgblight_config.enable) { rgblight_disable(); } @@ -275,17 +287,34 @@ void rgblight_toggle(void) { } } +void rgblight_toggle_noeeprom(void) { + xprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable_noeeprom(); + } + else { + rgblight_enable_noeeprom(); + } +} + void rgblight_enable(void) { rgblight_config.enable = 1; - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight enable: rgblight_config.enable = %u\n", rgblight_config.enable); + // No need to update EEPROM here. rgblight_mode() will do that, actually + //eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); rgblight_mode(rgblight_config.mode); } +void rgblight_enable_noeeprom(void) { + rgblight_config.enable = 1; + xprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode_noeeprom(rgblight_config.mode); +} + void rgblight_disable(void) { rgblight_config.enable = 0; eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight disable: rgblight_config.enable = %u\n", rgblight_config.enable); + xprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif @@ -293,6 +322,17 @@ void rgblight_disable(void) { rgblight_set(); } +void rgblight_disable_noeeprom(void) { + rgblight_config.enable = 0; + xprintf("rgblight disable [noEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + _delay_ms(50); + rgblight_set(); +} + + // Deals with the messy details of incrementing an integer uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { int16_t new_value = value; @@ -366,23 +406,22 @@ void rgblight_decrease_speed(void) { eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this } -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { - inmem_config.raw = rgblight_config.raw; +void rgblight_sethsv_noeeprom_old(uint16_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { LED_TYPE tmp_led; sethsv(hue, sat, val, &tmp_led); - inmem_config.hue = hue; - inmem_config.sat = sat; - inmem_config.val = val; // dprintf("rgblight set hue [MEMORY]: %u,%u,%u\n", inmem_config.hue, inmem_config.sat, inmem_config.val); rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); } } -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { if (rgblight_config.enable) { if (rgblight_config.mode == 1) { // same static color - rgblight_sethsv_noeeprom(hue, sat, val); + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); } else { // all LEDs in same color if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { @@ -407,11 +446,23 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgblight_config.hue = hue; rgblight_config.sat = sat; rgblight_config.val = val; - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } else { + xprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } } } +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_eeprom_helper(hue, sat, val, true); +} + +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_eeprom_helper(hue, sat, val, false); +} + uint16_t rgblight_get_hue(void) { return rgblight_config.hue; } @@ -554,7 +605,7 @@ void rgblight_effect_breathing(uint8_t interval) { // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); - rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, val); + rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); pos = (pos + 1) % 256; } void rgblight_effect_rainbow_mood(uint8_t interval) { @@ -565,7 +616,7 @@ void rgblight_effect_rainbow_mood(uint8_t interval) { return; } last_timer = timer_read(); - rgblight_sethsv_noeeprom(current_hue, rgblight_config.sat, rgblight_config.val); + rgblight_sethsv_noeeprom_old(current_hue, rgblight_config.sat, rgblight_config.val); current_hue = (current_hue + 1) % 360; } void rgblight_effect_rainbow_swirl(uint8_t interval) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index a6593af98..569424506 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -134,7 +134,16 @@ 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_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) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h index 5dd480b61..407fd8e9d 100644 --- a/quantum/rgblight_list.h +++ b/quantum/rgblight_list.h @@ -36,6 +36,26 @@ #define rgblight_setrgb_magenta() rgblight_setrgb (0xFF, 0x00, 0xFF) #define rgblight_setrgb_pink() rgblight_setrgb (0xFF, 0x80, 0xBF) +/* SET RGB List */ +#define rgblight_setrgb_white_at(at) rgblight_setrgb_at (0xFF, 0xFF, 0xFF, at) +#define rgblight_setrgb_red_at(at) rgblight_setrgb_at (0xFF, 0x00, 0x00, at) +#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at (0xFF, 0x7C, 0x4D, at) +#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at (0xFF, 0x80, 0x00, at) +#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at (0xD9, 0xA5, 0x21, at) +#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at (0xFF, 0xD9, 0x00, at) +#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at (0xFF, 0xFF, 0x00, at) +#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at (0x80, 0xFF, 0x00, at) +#define rgblight_setrgb_green_at(at) rgblight_setrgb_at (0x00, 0xFF, 0x00, at) +#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at (0x00, 0xFF, 0x80, at) +#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at (0x47, 0x6E, 0x6A, at) +#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at (0x00, 0x80, 0x80, at) +#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at (0x00, 0xFF, 0xFF, at) +#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at (0x99, 0xf5, 0xFF, at) +#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at (0x00, 0x00, 0xFF, at) +#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at (0x7A, 0x00, 0xFF, at) +#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at (0xFF, 0x00, 0xFF, at) +#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at (0xFF, 0x80, 0xBF, at) + /* SET HSV List */ #define rgblight_sethsv_white() rgblight_sethsv ( 0, 0, 255) #define rgblight_sethsv_red() rgblight_sethsv ( 0, 255, 255) @@ -56,4 +76,48 @@ #define rgblight_sethsv_magenta() rgblight_sethsv (300, 255, 255) #define rgblight_sethsv_pink() rgblight_sethsv (330, 128, 255) +/* SET HSV List */ +/* If you're doing layer indication, this is best, as it won't */ +/* write to the eeprom, since it's limited (very high value). */ +/* If you want to use modes with this (since you can), then you */ +/* want to use rgblight_mode_noeeprom(x) instead. */ +#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom ( 0, 0, 255) +#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom ( 0, 255, 255) +#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom ( 16, 176, 255) +#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom ( 39, 255, 255) +#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom ( 43, 218, 218) +#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom ( 51, 255, 255) +#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom ( 60, 255, 255) +#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom ( 90, 255, 255) +#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom (120, 255, 255) +#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom (150, 255, 255) +#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom (174, 90, 112) +#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom (180, 255, 128) +#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom (180, 255, 255) +#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom (186, 102, 255) +#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom (240, 255, 255) +#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom (270, 255, 255) +#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom (300, 255, 255) +#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom (330, 128, 255) + +/* SET HSV List */ +#define rgblight_sethsv_white_at(at) rgblight_sethsv_at ( 0, 0, 255, at) +#define rgblight_sethsv_red_at(at) rgblight_sethsv_at ( 0, 255, 255, at) +#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at ( 16, 176, 255, at) +#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at ( 39, 255, 255, at) +#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at ( 43, 218, 218, at) +#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at ( 51, 255, 255, at) +#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at ( 60, 255, 255, at) +#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at ( 90, 255, 255, at) +#define rgblight_sethsv_green_at(at) rgblight_sethsv_at (120, 255, 255, at) +#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at (150, 255, 255, at) +#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at (174, 90, 112, at) +#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at (180, 255, 128, at) +#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at (180, 255, 255, at) +#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at (186, 102, 255, at) +#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at (240, 255, 255, at) +#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at (270, 255, 255, at) +#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at (300, 255, 255, at) +#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at (330, 128, 255, at) + #endif diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 6d0b3c4d5..e739c93c9 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 REPLACE_WITH_YOUR_NAME +Copyright 2018 REPLACE_WITH_YOUR_NAME 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 @@ -48,7 +48,7 @@ along with this program. If not, see . /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index 97f788654..b6366fd9a 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/quantum/template/avr/template.h b/quantum/template/avr/template.h index c24bb1650..c3924ee71 100644 --- a/quantum/template/avr/template.h +++ b/quantum/template/avr/template.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h index 0aa9e9e81..0f7563505 100644 --- a/quantum/template/base/keymaps/default/config.h +++ b/quantum/template/base/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index d4bda895c..14a8bc0f2 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index d0990c372..8bbf9ebda 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/quantum/template/ps2avrgb/template.h b/quantum/template/ps2avrgb/template.h index c24bb1650..c3924ee71 100644 --- a/quantum/template/ps2avrgb/template.h +++ b/quantum/template/ps2avrgb/template.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 REPLACE_WITH_YOUR_NAME * * 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 diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index fff834791..f7c039f45 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -258,10 +258,10 @@ void process_action(keyrecord_t *record, action_t action) if (event.pressed) { if (tap_count == 0) { dprint("MODS_TAP: Oneshot: 0\n"); - register_mods(mods); + register_mods(mods | get_oneshot_mods()); } else if (tap_count == 1) { dprint("MODS_TAP: Oneshot: start\n"); - set_oneshot_mods(mods); + set_oneshot_mods(mods | get_oneshot_mods()); #if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 } else if (tap_count == ONESHOT_TAP_TOGGLE) { dprint("MODS_TAP: Toggling oneshot"); @@ -270,7 +270,7 @@ void process_action(keyrecord_t *record, action_t action) register_mods(mods); #endif } else { - register_mods(mods); + register_mods(mods | get_oneshot_mods()); } } else { if (tap_count == 0) { diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index d89c8d768..c4b913280 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -72,7 +72,7 @@ #define BOOTLOADER_RESET_KEY 0xB007B007 uint32_t reset_key __attribute__ ((section (".noinit"))); -/** \brief initialize MCU status by watchdog reset +/** \brief initialize MCU status by watchdog reset * * FIXME: needs doc */ @@ -81,7 +81,7 @@ void bootloader_jump(void) { #if !defined(BOOTLOADER_SIZE) uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS); - if (high_fuse & BOOT_SIZE_256) { + if (high_fuse & BOOT_SIZE_256) { bootloader_start = (FLASH_SIZE - 512) >> 1; } else if (high_fuse & BOOT_SIZE_512) { bootloader_start = (FLASH_SIZE - 1024) >> 1; @@ -130,7 +130,7 @@ void bootloader_jump(void) { DDRA = 0; DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; PORTA = 0; PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0; asm volatile("jmp 0x1FC00"); - #endif + #endif #elif defined(BOOTLOADER_CATERINA) // this block may be optional @@ -151,7 +151,7 @@ void bootloader_jump(void) { #else // Assume remaining boards are DFU, even if the flag isn't set - #ifndef __AVR_ATmega32A__ // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? + #if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? UDCON = 1; USBCON = (1<. /* * Keycodes based on HID Usage Keyboard/Keypad Page(0x07) plus special codes - * http://www.usb.org/developers/devclass_docs/Hut1_12.pdf + * https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf + * or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older) */ #ifndef KEYCODE_H #define KEYCODE_H diff --git a/users/drashna/config.h b/users/drashna/config.h index 0a59ad026..ef1860778 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -4,7 +4,6 @@ #ifdef AUDIO_ENABLE #define AUDIO_CLICKY -#define AUDIO_CLICKY_ON #define STARTUP_SONG SONG(E1M1_DOOM) #define GOODBYE_SONG SONG(SONIC_RING) #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ @@ -43,6 +42,8 @@ #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD #undef PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +//#define RETRO_TAPPING #define FORCE_NKRO @@ -53,7 +54,7 @@ #ifdef TAPPING_TERM #undef TAPPING_TERM #endif // TAPPING_TERM -#define TAPPING_TERM 176 +#define TAPPING_TERM 200 // Disable action_get_macro and fn_actions, since we don't use these @@ -61,7 +62,7 @@ #ifndef NO_DEBUG #define NO_DEBUG #endif // !NO_DEBUG -#ifndef NO_PRINT +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) #define NO_PRINT #endif // !NO_PRINT #define NO_ACTION_MACRO diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 86c16b826..6ce541bfb 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -38,10 +38,6 @@ float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND); static uint16_t copy_paste_timer; -#ifdef RGBLIGHT_ENABLE -bool rgb_layer_change = true; -#endif - userspace_config_t userspace_config; // Helper Functions @@ -164,31 +160,42 @@ void led_set_keymap(uint8_t usb_led) {} // call the keymap's init function void matrix_init_user(void) { uint8_t default_layer = eeconfig_read_default_layer(); + userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE); -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); -#endif // RGBLIGHT_ENABLE +#ifdef BOOTLOADER_CATERINA + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); - if (default_layer & (1UL << _COLEMAK)) { + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +#endif + + if (userspace_config.rgb_layer_change) { #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_magenta(); -#endif // RGBLIGHT_ENABLE - } else if (default_layer & (1UL << _DVORAK)) { -#ifdef RGBLIGHT_ENABLE - rgblight_sethsv_green(); -#endif // RGBLIGHT_ENABLE - } else if (default_layer & (1UL << _WORKMAN)) { -#ifdef RGBLIGHT_ENABLE - rgblight_sethsv_goldenrod(); -#endif // RGBLIGHT_ENABLE - } else { -#ifdef RGBLIGHT_ENABLE - rgblight_sethsv_teal(); + rgblight_enable(); #endif // RGBLIGHT_ENABLE + if (default_layer & (1UL << _COLEMAK)) { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_magenta(); + #endif // RGBLIGHT_ENABLE + } else if (default_layer & (1UL << _DVORAK)) { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_green(); + #endif // RGBLIGHT_ENABLE + } else if (default_layer & (1UL << _WORKMAN)) { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_goldenrod(); + #endif // RGBLIGHT_ENABLE + } else { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_teal(); + #endif // RGBLIGHT_ENABLE + } } - userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE); +#ifdef AUDIO_CLICKY clicky_enable = userspace_config.clicky_enable; +#endif #if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) ) set_unicode_input_mode(UC_WINC); @@ -364,8 +371,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { - rgb_layer_change = !rgb_layer_change; - if (rgb_layer_change) { + userspace_config.rgb_layer_change ^= 1; + eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); + if (userspace_config.rgb_layer_change) { layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) } } @@ -374,7 +382,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef RGBLIGHT_ENABLE case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - rgb_layer_change = false; + userspace_config.rgb_layer_change = false; + eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); } return true; break; #endif // RGBLIGHT_ENABLE @@ -403,8 +412,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case CLICKY_TOGGLE: +#ifdef AUDIO_CLICKY userspace_config.clicky_enable = clicky_enable; eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); +#endif break; #ifdef UNICODE_ENABLE case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻ @@ -445,123 +456,104 @@ uint32_t layer_state_set_user(uint32_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); switch (biton32(state)) { - case _NAV: -#ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { - rgblight_sethsv_blue(); - rgblight_mode(1); - } -#endif // RGBLIGHT_ENABLE - break; - case _SYMB: -#ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { - rgblight_sethsv_blue(); - rgblight_mode(2); - } -#endif // RGBLIGHT_ENABLE - break; - case _MOUS: -#ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { - rgblight_sethsv_yellow(); - rgblight_mode(1); - } -#endif // RGBLIGHT_ENABLE - break; case _MACROS: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_orange(); userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18); } #endif // RGBLIGHT_ENABLE + break; case _MEDIA: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_chartreuse(); rgblight_mode(22); } #endif // RGBLIGHT_ENABLE + break; case _GAMEPAD: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_orange(); rgblight_mode(17); } #endif // RGBLIGHT_ENABLE + break; case _DIABLO: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_red(); rgblight_mode(5); } #endif // RGBLIGHT_ENABLE + break; case _RAISE: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_yellow(); rgblight_mode(5); } #endif // RGBLIGHT_ENABLE + break; case _LOWER: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_orange(); rgblight_mode(5); } #endif // RGBLIGHT_ENABLE + break; case _ADJUST: #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { + if (userspace_config.rgb_layer_change) { rgblight_sethsv_red(); rgblight_mode(23); } #endif // RGBLIGHT_ENABLE - break; - case _COVECUBE: -#ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { - rgblight_sethsv_green(); - rgblight_mode(2); - } -#endif // RGBLIGHT_ENABLE + break; default: // for any other layers, or the default layer if (default_layer & (1UL << _COLEMAK)) { #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_sethsv_magenta(); } + if (userspace_config.rgb_layer_change) { rgblight_sethsv_magenta(); } #endif // RGBLIGHT_ENABLE + } else if (default_layer & (1UL << _DVORAK)) { #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_sethsv_green(); } + if (userspace_config.rgb_layer_change) { rgblight_sethsv_green(); } #endif // RGBLIGHT_ENABLE + } else if (default_layer & (1UL << _WORKMAN)) { #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_sethsv_goldenrod(); } + if (userspace_config.rgb_layer_change) { rgblight_sethsv_goldenrod(); } #endif // RGBLIGHT_ENABLE + } else { #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_sethsv_teal(); } + if (userspace_config.rgb_layer_change) { rgblight_sethsv_teal(); } #endif // RGBLIGHT_ENABLE + } if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_mode(2); } + if (userspace_config.rgb_layer_change) { rgblight_mode(2); } #endif // RGBLIGHT_ENABLE + } else { // otherwise, stay solid #ifdef RGBLIGHT_ENABLE - if (rgb_layer_change) { rgblight_mode(1); } + if (userspace_config.rgb_layer_change) { rgblight_mode(1); } #endif // RGBLIGHT_ENABLE + } break; } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 5ef25333b..87a72f528 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -27,12 +27,8 @@ enum userspace_layers { _DVORAK, _WORKMAN, _MODS, - _NAV, - _COVECUBE, - _SYMB, _GAMEPAD, _DIABLO, - _MOUS, _MACROS, _MEDIA, _LOWER, @@ -49,7 +45,6 @@ enum userspace_layers { // RGB color codes are no longer located here anymore. Instead, you will want to // head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h -extern bool rgb_layer_change; extern bool clicky_enable; #ifdef RGBLIGHT_ENABLE @@ -59,10 +54,11 @@ void rgblight_sethsv_default_helper(uint8_t index); #define EECONFIG_USERSPACE (uint8_t *)20 typedef union { - uint32_t raw; + uint8_t raw; struct { - bool clicky_enable :1; - bool is_overwatch :1; + bool clicky_enable :1; + bool rgb_layer_change :1; + bool is_overwatch :1; }; } userspace_config_t; @@ -166,10 +162,10 @@ enum { #define LAYOUT KEYMAP #endif -#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) #define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) // Blocks for each of the four major keyboard layouts @@ -236,6 +232,8 @@ enum { #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 // Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN), // this allows us to quickly modify the bottom row for all of the layouts @@ -245,9 +243,9 @@ enum { #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \ +#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \ KC_HOME, KC_PGUP, \ - KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER + LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) #endif // !USERSPACE diff --git a/users/drashna/readme.md b/users/drashna/readme.md index 79758e7e5..ddf24b24f 100644 --- a/users/drashna/readme.md +++ b/users/drashna/readme.md @@ -162,7 +162,7 @@ This tells us where in the EEPROM that the data structure is located, and this s ```c typedef union { - uint32_t raw; + uint8_t raw; struct { bool clicky_enable :1; bool is_overwatch :1; @@ -174,3 +174,23 @@ Then, in your C file, you want to add: `userspace_config_t userspace_config;`, a From there, you'd want to use the data structure (such as `userspace_config.is_overwatch`) when you want to check this value. And if you want to update it, update directly and then use `eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);` to write the value back to the EEPROM. + + +Pro Micro Hacking +----------------- + +Well, you can get the QMK DFU bootloader working on the ProMicro. But you need to change fuses. + +What worked to get into the firmware properly was: + +``` +Low: 0x5E High: 0x99 Extended: 0xF3 Lock: 0xFF +``` + +But some of the columns and rows didn't work, like the pin mapping was wrong. Even when setting the bootloader settings. + + This is here for future reference. And the default fuse settings I believe were: + +``` +Low: 0xFF High: 0xD8 Extended: 0xC3 Lock: 0x3F +``` diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 123c0cc70..e2c5a2995 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -5,3 +5,7 @@ EXTRAFLAGS += -flto ifeq ($(strip $(NO_SECRETS)), yes) OPT_DEFS += -DNO_SECRETS endif + +ifeq ($(strip $(INDICATOR_LIGHTS)), yes) + OPT_DEFS += -DINDICATOR_LIGHTS +endif diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c new file mode 100644 index 000000000..cff1a123e --- /dev/null +++ b/users/edvorakjp/edvorakjp.c @@ -0,0 +1,246 @@ +#include "eeprom.h" +#include "edvorakjp.h" + +bool japanese_mode; +uint16_t time_on_pressed; + +edvorakjp_config_t edvorakjp_config; + +uint8_t eeconfig_read_edvorakjp(void) { + return eeprom_read_byte(EECONFIG_EDVORAK); +} + +void eeconfig_update_edvorakjp(uint8_t val) { + eeprom_update_byte(EECONFIG_EDVORAK, val); +} + +void dvorakj_layer_off(void) { + layer_off(_EDVORAKJ1); + layer_off(_EDVORAKJ2); +} + +void update_japanese_mode(bool new_state) { + japanese_mode = new_state; + if (japanese_mode) { + if (edvorakjp_config.enable_kc_lang) { + SEND_STRING(SS_TAP(X_LANG1)); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + dvorakj_layer_off(); + if (edvorakjp_config.enable_kc_lang) { + SEND_STRING(SS_TAP(X_LANG2)); + } else { + SEND_STRING(SS_LALT("`")); + } + } +} + +void matrix_init_user(void) { + japanese_mode = false; + time_on_pressed = 0; + edvorakjp_config.raw = eeconfig_read_edvorakjp(); + + matrix_init_keymap(); +} + +__attribute__ ((weak)) +void matrix_init_keymap() {} + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + return layer_state_set_keymap(state); +} + +__attribute__ ((weak)) +uint32_t layer_state_set_keymap(uint32_t state) { + return state; +} + +/* + * Each process_record_* methods defined here are + * return false if handle edvorak_keycodes, or return true others. + */ +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record) { + if (!(edvorakjp_config.enable_jp_extra_layer &&\ + (default_layer_state == 1UL<<_EDVORAK) &&\ + japanese_mode &&\ + record->event.pressed)) { + return true; + } + + // consonant keys + // layer_on(J1) or layer_on(J2) are defined based on key positions. + switch (keycode) { + // right hand's left side w/o N + case KC_F: + case KC_G: + case KC_R: + case KC_D: + case KC_T: + case KC_B: + case KC_H: + case KC_J: + layer_on(_EDVORAKJ1); + register_code(keycode); + unregister_code(keycode); + return false; + + // N: toggle layer + case KC_N: + biton32(layer_state) == _EDVORAK ? layer_on(_EDVORAKJ1) : dvorakj_layer_off(); + register_code(keycode); + unregister_code(keycode); + return false; + + // left hand and right hand's right side + case KC_X: + case KC_C: + case KC_V: + case KC_Z: + case KC_P: + case KC_Y: + case KC_W: + case KC_Q: + case KC_S: + case KC_M: + case KC_K: + case KC_L: + layer_on(_EDVORAKJ2); + register_code(keycode); + unregister_code(keycode); + return false; + } + + // vowel keys, symbol keys and modifier keys + dvorakj_layer_off(); + switch (keycode) { + // combination vowel keys + case KC_AI: + SEND_STRING("ai"); + return false; + case KC_OU: + SEND_STRING("ou"); + return false; + case KC_EI: + SEND_STRING("ei"); + return false; + case KC_ANN: + SEND_STRING("ann"); + return false; + case KC_ONN: + SEND_STRING("onn"); + return false; + case KC_ENN: + SEND_STRING("enn"); + return false; + case KC_INN: + SEND_STRING("inn"); + return false; + case KC_UNN: + SEND_STRING("unn"); + return false; + + // AOEIU and other (symbol, modifier) keys + default: + return true; + } +} + +bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MAC: + edvorakjp_config.enable_kc_lang = true; + eeconfig_update_edvorakjp(edvorakjp_config.raw); + return false; + case KC_WIN: + edvorakjp_config.enable_kc_lang = false; + eeconfig_update_edvorakjp(edvorakjp_config.raw); + return false; + case KC_EXTON: + edvorakjp_config.enable_jp_extra_layer = true; + eeconfig_update_edvorakjp(edvorakjp_config.raw); + return false; + case KC_EXTOFF: + edvorakjp_config.enable_jp_extra_layer = false; + eeconfig_update_edvorakjp(edvorakjp_config.raw); + return false; + } + return true; +} + +bool process_record_layer(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EDVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_EDVORAK); + } + return false; + case QWERTY: + if (record->event.pressed) { + dvorakj_layer_off(); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + time_on_pressed = record->event.time; + } else { + layer_off(_LOWER); + + if (TIMER_DIFF_16(record->event.time, time_on_pressed) < TAPPING_TERM) { + update_japanese_mode(false); + } + time_on_pressed = 0; + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + time_on_pressed = record->event.time; + } else { + layer_off(_RAISE); + + if (TIMER_DIFF_16(record->event.time, time_on_pressed) < TAPPING_TERM) { + update_japanese_mode(true); + } + time_on_pressed = 0; + } + return false; + default: + return true; + } +} + +bool process_record_ime(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_JPN: + if (record->event.pressed) { + update_japanese_mode(true); + } + return false; + case KC_ENG: + if (record->event.pressed) { + update_japanese_mode(false); + } + return false; + default: + return true; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + return process_record_keymap(keycode, record) &&\ + process_record_edvorakjp_ext(keycode, record) &&\ + process_record_edvorakjp_config(keycode, record) &&\ + process_record_layer(keycode, record) &&\ + process_record_ime(keycode, record); +} diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h new file mode 100644 index 000000000..c38a9d1fa --- /dev/null +++ b/users/edvorakjp/edvorakjp.h @@ -0,0 +1,74 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" +#include "action_layer.h" + +#define EECONFIG_EDVORAK (uint8_t *)20 + +extern keymap_config_t keymap_config; + +typedef union { + uint8_t raw; + struct { + bool enable_jp_extra_layer : 1; + bool enable_kc_lang : 1; // for macOS + }; +} edvorakjp_config_t; + +enum edvorakjp_layers { + _EDVORAK = 0, + _EDVORAKJ1, + _EDVORAKJ2, + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _EXTRA, +}; + +enum edvorakjp_keycodes { + EDVORAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + KC_MAC, + KC_WIN, + KC_EXTON, + KC_EXTOFF, + KC_JPN, + KC_ENG, + KC_AI, + KC_OU, + KC_EI, + KC_ANN, + KC_ONN, + KC_ENN, + KC_INN, + KC_UNN, + NEW_SAFE_RANGE +}; + +uint8_t eeconfig_read_edvorakjp(void); +void eeconfig_update_edvorakjp(uint8_t val); + +void dvorakj_layer_off(void); +void update_japanese_mode(bool new_state); +void matrix_init_user(void); +void matrix_init_keymap(void); +uint32_t layer_state_set_user(uint32_t state); +uint32_t layer_state_set_keymap(uint32_t state); + +/* + * Each process_record_* methods defined here are + * return false if processed, or return true if not processed. + * You can add your original macros in process_record_keymap() in keymap.c. + */ +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record); +bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record); +bool process_record_layer(uint16_t keycode, keyrecord_t *record); +bool process_record_ime(uint16_t keycode, keyrecord_t *record); +bool process_record_user(uint16_t keycode, keyrecord_t *record); + +#endif diff --git a/users/edvorakjp/readme.md b/users/edvorakjp/readme.md new file mode 100644 index 000000000..d7ec74285 --- /dev/null +++ b/users/edvorakjp/readme.md @@ -0,0 +1,103 @@ +# edvorakjp + +epaew's Enhanced Dvorak layout for Japanese Programmer + +## Layout overview +This is a sample. You can swap any symbol keys and modifier keys. + +- Base layer (for ansi layout) +``` + //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ + ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , + //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ + TAB , ' , , , . , P , Y , F , G , R , W , Q , / , = , \ , + //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ + CAPS , A , O , E , I , U , D , T , N , S , M , - , ENT , + //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ + LSFT , ; , X , C , V , Z , B , H , J , K , L , RSFT , + //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ + LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL + //+------+------+------+-------------------------+------+------+------+------+ +``` +- Base layer (for iso layout) + - Two C keys are placed, it's on purpose. +``` + //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ + ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , + //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ + TAB , ' , , , . , P , Y , F , G , R , W , C , / , = , + //+------++---++---++---++---++---++---++---++---++---++---++---++---++ + CAPS , A , O , E , I , U , D , T , N , S , M , ; , - , ENT , + //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+------+ + LSFT , Q , X , C , V , Z , B , H , J , K , L , \ , RSFT , + //+------+--+---++----++---+----+----+----+----+-+--+---++----++---+--+------+ + LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL + //+------+------+------+-------------------------+------+------+------+------+ +``` +- Additional layer (common, blanks are transparent) +``` + //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ + , , , , , , , , , , , , , , + //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ + , AI , OU , EI , , , , , , , , , , , + //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ + , A , O , E , I , U , , Y1 , N , Y2 , , , , + //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ + ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , + //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ + , , , , , , , + //+------+------+------+-------------------------+------+------+------+------+ +``` + + And you can see [my iris keyboard layout](../../keyboards/iris/keymaps/edvorakjp/keymap.c) for sample implementation, too. + +## for Japanese + +- 日本語入力用のキーを追加 + - IME 切り替えキー + - 長押しでレイヤー切り替え、短押しでIME切り替え + - macOS(かな/英数)、Windows(Alt+\`)の両方に対応 + - DvorakJP()を参考にした日本語入力用キーの導入 + - 拗音入力用のYキーを追加配置 + - 二重母音入力用のキー(AI, OU, EI) + - 撥音入力用のキー(ANN, ONN, ENN, INN, UNN) + - いずれかの子音を押下することで Additional layer が出現し、いずれかの母音を押下することで Base layer に戻ります(※1※2) + - ※1促音の入力に使うため、また連続で同じ指での打鍵を減らすために、 + FGRDTNBHJ を押下した場合はy1が、それ以外の子音を押下した場合はy2が出現しません + - ※2撥音の入力のため、nを2連打すると、Base layerに戻ります +- Define some custom keys for typing Japanese + - IME switching + - act as LOWER/RAISE when hold, act as IME switching when tapped + - for macOS(かな/英数), for Windows(Alt+\`) + - oneshot combination keys, inspired from DvorakJP () + - additional Y key to enter a contracted sound + - diphthong keys (AI, OU, EI) + - syllabic nasal (ANN, ONN, ENN, INN, UNN) + - Additional layer is appeared when you taps any consonant keys, and disappeared when you taps any diphthong keys. + +## for Programmer + +- Dvorak 配列をベースに、ショートカットでよく利用される XCV は QWERTY 配列の位置を維持 +- Vimユーザのために、HJKL キーを横並びで配置 +- デフォルトレイヤーには、数字キーの代わりに記号 `!@#$%^&*()` を配置 + +- mainly based on Dvorak layout, but XCV is available in the same position of QWERTY layout +- HJKL is lining side by side, for Vim users +- we can type `!@#$%^&*()` keys without shift keys in base layer + +## License + +Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew + +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 . diff --git a/users/edvorakjp/rules.mk b/users/edvorakjp/rules.mk new file mode 100644 index 000000000..4fb739186 --- /dev/null +++ b/users/edvorakjp/rules.mk @@ -0,0 +1 @@ +SRC += edvorakjp.c diff --git a/users/gordon/gordon.c b/users/gordon/gordon.c index 056012a21..3115e1c32 100644 --- a/users/gordon/gordon.c +++ b/users/gordon/gordon.c @@ -15,20 +15,17 @@ const char secret[][64] = { }; #endif - - - void register_hyper (void) { //Helper function to invoke Hyper register_code (KC_LSFT); - register_code (KC_LCTL); - register_code (KC_LALT); - register_code (KC_LGUI); + register_code (KC_LCTL); + register_code (KC_LALT); + register_code (KC_LGUI); } void unregister_hyper (void) { //Helper function to invoke Hyper unregister_code (KC_LSFT); - unregister_code (KC_LCTL); - unregister_code (KC_LALT); - unregister_code (KC_LGUI); + unregister_code (KC_LCTL); + unregister_code (KC_LALT); + unregister_code (KC_LGUI); } void register_ctrl_a (void) { @@ -41,55 +38,55 @@ void unregister_ctrl_a (void) { unregister_code(KC_A); } -void register_alt_f7 (void) { - register_code (KC_LALT); +void register_alt_f7 (void) { + register_code (KC_LALT); register_code (KC_F7); } -void unregister_alt_f7 (void) { - unregister_code (KC_LALT); +void unregister_alt_f7 (void) { + unregister_code (KC_LALT); unregister_code (KC_F7); } -void register_shift_f6 (void) { - register_code (KC_LSFT); +void register_shift_f6 (void) { + register_code (KC_LSFT); register_code (KC_F6); } -void unregister_shift_f6 (void) { - unregister_code (KC_LSFT); +void unregister_shift_f6 (void) { + unregister_code (KC_LSFT); unregister_code (KC_F6); } -void register_ctrl_shift (void) { - register_code (KC_LSFT); +void register_ctrl_shift (void) { + register_code (KC_LSFT); register_code (KC_LCTRL); } -void unregister_ctrl_shift (void) { - unregister_code (KC_LSFT); +void unregister_ctrl_shift (void) { + unregister_code (KC_LSFT); unregister_code (KC_LCTRL); } -void register_alt_shift (void) { - register_code (KC_LSFT); +void register_alt_shift (void) { + register_code (KC_LSFT); register_code (KC_LALT); } -void unregister_alt_shift (void) { - unregister_code (KC_LSFT); +void unregister_alt_shift (void) { + unregister_code (KC_LSFT); unregister_code (KC_LALT); } -// To activate SINGLE_HOLD, you will need to hold for 200ms first. +// To activate SINGLE_HOLD, you will need to hold for 200ms first. // This tap dance favors keys that are used frequently in typing like 'f' int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP if (state->interrupted) { - // if (!state->pressed) return SINGLE_TAP; + // if (!state->pressed) return SINGLE_TAP; //need "permissive hold" here. - // else return SINsGLE_HOLD; + // else return SINsGLE_HOLD; //If the interrupting key is released before the tap-dance key, then it is a single HOLD //However, if the tap-dance key is released first, then it is a single TAP //But how to get access to the state of the interrupting key???? @@ -105,8 +102,8 @@ int cur_dance (qk_tap_dance_state_t *state) { else if (state->count == 2) { if (state->interrupted) return DOUBLE_SINGLE_TAP; else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } + else return DOUBLE_TAP; + } else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; else if (state->count == 3) return TRIPLE_HOLD; else return 8; //magic number. At some point this method will expand to work for more presses @@ -116,8 +113,8 @@ int cur_dance (qk_tap_dance_state_t *state) { int hold_cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { if (state->interrupted) { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; } else { if (!state->pressed) return SINGLE_TAP; @@ -128,8 +125,8 @@ int hold_cur_dance (qk_tap_dance_state_t *state) { //with single tap. else if (state->count == 2) { if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } + else return DOUBLE_TAP; + } else if (state->count == 3) { if (!state->pressed) return TRIPLE_TAP; else return TRIPLE_HOLD; @@ -138,7 +135,7 @@ int hold_cur_dance (qk_tap_dance_state_t *state) { } -static xtap htap_state = { +static xtap htap_state = { .is_press_action = true, .state = 0 }; @@ -168,7 +165,7 @@ void h_reset (qk_tap_dance_state_t *state, void *user_data) { /**************** QUAD FUNCTION FOR TAB ****************/ // TAB, ALT + SHIFT, TAB TAB, CTRL + SHIFT -static xtap tab_state = { +static xtap tab_state = { .is_press_action = true, .state = 0 }; @@ -183,7 +180,7 @@ void tab_finished (qk_tap_dance_state_t *state, void *user_data) { case TRIPLE_TAP: register_code(KC_LSHIFT) ;register_code(KC_ESC); break; case TRIPLE_HOLD: register_code(KC_LSHIFT); register_code(KC_LGUI); break; } -} +} void tab_reset (qk_tap_dance_state_t *state, void *user_data) { switch (tab_state.state) { @@ -201,7 +198,7 @@ void tab_reset (qk_tap_dance_state_t *state, void *user_data) { //*************** SUPER COMMA *******************// // Assumption: we don't care about trying to hit ,, quickly //*************** SUPER COMMA *******************// -static xtap comma_state = { +static xtap comma_state = { .is_press_action = true, .state = 0 }; @@ -209,19 +206,19 @@ static xtap comma_state = { void comma_finished (qk_tap_dance_state_t *state, void *user_data) { comma_state.state = hold_cur_dance(state); //Use the dance that favors being held switch (comma_state.state) { - case SINGLE_TAP: register_code(KC_COMMA); break; + case SINGLE_TAP: register_code(KC_COMMA); break; case SINGLE_HOLD: layer_on(1); break; //turn on symbols layer case DOUBLE_TAP: layer_invert(4); break; //toggle numbers layer case DOUBLE_HOLD: layer_on(2); break; case TRIPLE_TAP: register_code(KC_CALCULATOR); break; case TRIPLE_HOLD: layer_on(3); } -} +} void comma_reset (qk_tap_dance_state_t *state, void *user_data) { switch (comma_state.state) { case SINGLE_TAP: unregister_code(KC_COMMA); break; //unregister comma - case SINGLE_HOLD: layer_off(1); break; + case SINGLE_HOLD: layer_off(1); break; case DOUBLE_TAP: ;break; case DOUBLE_HOLD: layer_off(2); break; case TRIPLE_TAP: unregister_code(KC_CALCULATOR); break; @@ -235,7 +232,7 @@ void comma_reset (qk_tap_dance_state_t *state, void *user_data) { //*************** F3 TAP DANCE *******************// //Good example for accessing multiple layers from the same key. -static xtap S1_state = { +static xtap S1_state = { .is_press_action = true, .state = 0 }; @@ -244,17 +241,17 @@ void bt_finished (qk_tap_dance_state_t *state, void *user_data) { S1_state.state = cur_dance(state); switch (S1_state.state) { case SINGLE_TAP: register_code(KC_F3); break; - case SINGLE_HOLD: layer_on(4); break; - case DOUBLE_TAP: layer_invert(4); break; + case SINGLE_HOLD: layer_on(_MACROS); break; + case DOUBLE_TAP: layer_invert(_MACROS); break; case DOUBLE_HOLD: layer_on(5); break; - case DOUBLE_SINGLE_TAP: layer_invert(4); break; + case DOUBLE_SINGLE_TAP: layer_invert(_MACROS); break; } } void bt_reset (qk_tap_dance_state_t *state, void *user_data) { switch (S1_state.state) { case SINGLE_TAP: unregister_code(KC_F3); break; - case SINGLE_HOLD: layer_off(4); break; + case SINGLE_HOLD: layer_off(_MACROS); break; case DOUBLE_TAP: break; //already inverted. Don't do anything. case DOUBLE_HOLD: layer_off(5); break; case DOUBLE_SINGLE_TAP: break; @@ -262,14 +259,152 @@ void bt_reset (qk_tap_dance_state_t *state, void *user_data) { S1_state.state = 0; } +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // simple tap dance + [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), + [REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)), + [ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC), + [Q_ESCAPE] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC), + [ENDHOME] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME), + [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), + [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), + [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), + [F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13), + [F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14), + [F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), + [TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset), + [F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset), + [COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset), + [HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset) +}; + +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// if (!record->event.pressed) { +// switch (keycode) { + +// case KC_SECRET_1 ... KC_SECRET_5: +// send_string(secret[keycode - KC_SECRET_1]); +// // clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); +// return true; break; + +// case UP_ENTER_RESET: +// register_code(KC_UP); +// unregister_code(KC_UP); +// register_code(KC_ENTER); +// unregister_code(KC_ENTER); +// reset_keyboard(); +// return false; break; + +// case TIL_SLASH: +// SEND_STRING ("~/."); +// return false; break; + +// case DBMS_OUT: +// SEND_STRING ("dbms_output.put_line('');"); +// SEND_STRING (SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); +// return false; break; + +// case ID_MAN_IP: +// SEND_STRING ("http://dev-1967110238.us-east-1.elb.amazonaws.com"); +// return false; break; + +// case MODRESET: +// clear_mods(); +// return false; break; + +// case DEREF: +// SEND_STRING ("->"); +// return false; break; + +// case EQRIGHT: +// SEND_STRING ("=>"); +// return false; break; + +// case TICK3: +// SEND_STRING ("```"); +// return false; break; + +// case TILD3: +// SEND_STRING ("~~~"); +// return false; break; +// } +// } +// return true; +// }; + + + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_SECRET_1 ... KC_SECRET_5: - if (!record->event.pressed) { - send_string(secret[keycode - KC_SECRET_1]); + if (!record->event.pressed) { + switch (keycode) { + case KC_SECRET_1 ... KC_SECRET_5: + send_string(secret[keycode - KC_SECRET_1]); + // clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return true; break; + case UP_ENTER_RESET: + SEND_STRING("make ergodox_infinity:gordon:dfu-util"); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + reset_keyboard(); + return false; break; + + case TIL_SLASH: + SEND_STRING ("~/."); + return false; break; + + case DBMS_OUT: + SEND_STRING ("dbms_output.put_line('');"); + SEND_STRING (SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); + return false; break; + case DIE_1000X_RIGHT: + SEND_STRING (SS_TAP(X_G) SS_TAP(X_G) SS_TAP(X_RIGHT) SS_TAP(X_B) SS_TAP(X_J)); + return false; break; + case DIE_1000X_LEFT: + SEND_STRING (SS_TAP(X_GRAVE) SS_TAP(X_G) SS_TAP(X_LEFT) SS_TAP(X_B) SS_TAP(X_J)); + return false; break; + case ID_MAN_IP: + SEND_STRING ("http://dev-1967110238.us-east-1.elb.amazonaws.com"); + return false; break; + + case MODRESET: + clear_mods(); + return false; break; + + case DEREF: + SEND_STRING ("->"); + return false; break; + + case EQRIGHT: + SEND_STRING ("=>"); + return false; break; + + case TICK3: + SEND_STRING ("```"); + + return false; break; + + case SPRK_TCK: + SEND_STRING ("```"); + SEND_STRING (SS_DOWN(X_LSHIFT) SS_TAP(X_ENTER) SS_UP(X_LSHIFT)); + SEND_STRING (SS_DOWN(X_LSHIFT) SS_TAP(X_ENTER) SS_UP(X_LSHIFT)); + SEND_STRING ("```"); + SEND_STRING (SS_TAP(X_UP)); + return false; break; + + case TILD3: + SEND_STRING ("~~~"); + return false; break; + } + } + else { //On key being pressed + switch (keycode) { + case KC_SECRET_1 ... KC_SECRET_5: + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; break; } - return false; - break; } return true; -} \ No newline at end of file +}; + diff --git a/users/gordon/gordon.h b/users/gordon/gordon.h index 548c63049..92641a8aa 100644 --- a/users/gordon/gordon.h +++ b/users/gordon/gordon.h @@ -6,20 +6,21 @@ // Fillers to make layering more clear -#define _______ KC_TRNS -#define ________ KC_TRNS +#define _______ KC_TRNS +#define ________ KC_TRNS #define _________ KC_TRNS -#define XXXXXXX KC_NO +#define _XXXXXX_ KC_TRNS +#define XXXXXXX KC_NO // KC codes that are too long -#define DOLLAR KC_DOLLAR -#define LSQUIGLY KC_LBRACKET -#define RSQUIGLY KC_RBRACKET -#define NUMLOCK KC_NUMLOCK -#define CAPLOCK KC_CAPSLOCK -#define BK_SLASH KC_BSLASH -#define ASTERSK KC_KP_ASTERISK - +#define DOLLAR KC_DOLLAR +#define LSQUIGLY KC_LBRACKET +#define RSQUIGLY KC_RBRACKET +#define NUMLOCK KC_NUMLOCK +#define CAPLOCK KC_CAPSLOCK +#define BK_SLASH KC_BSLASH +#define ASTERSK KC_KP_ASTERISK + // Navigation #define SNAPLEFT LGUI(KC_LEFT) #define SNAPRGHT LGUI(KC_RIGHT) @@ -30,19 +31,28 @@ #define WORKRIGHT LCTL(LGUI(KC_RIGHT)) #define WORKLEFT LCTL(LGUI(KC_LEFT)) +#define APP_1 LCTL(LGUI(KC_1)) +#define APP_2 LCTL(LGUI(KC_2)) +#define APP_3 LCTL(LGUI(KC_3)) +#define APP_4 LCTL(LGUI(KC_4)) +#define APP_5 LCTL(LGUI(KC_5)) +#define APP_6 LCTL(LGUI(KC_6)) +#define APP_7 LCTL(LGUI(KC_7)) +#define APP_8 LCTL(LGUI(KC_8)) + // KC/modifier hold -#define CTRL_F CTL_T(KC_F) -#define CTRL_J CTL_T(KC_J) -#define CTRL_Z CTL_T(KC_Z) -#define ALT_V ALT_T(KC_V) -#define ALT_M ALT_T(KC_M) -#define WIN_G GUI_T(KC_G) -#define WIN_H GUI_T(KC_H) -#define HYPER_X ALL_T(KC_X) -#define HYPE_DOT ALL_T(KC_DOT) -#define MEH_S MEH_T(KC_S) -#define MEH_L MEH_T(KC_L) -#define ALT_HOME ALT_T(KC_HOME) +#define CTRL_F CTL_T(KC_F) +#define CTRL_J CTL_T(KC_J) +#define CTRL_Z CTL_T(KC_Z) +#define ALT_V ALT_T(KC_V) +#define ALT_M ALT_T(KC_M) +#define WIN_G GUI_T(KC_G) +#define WIN_H GUI_T(KC_H) +#define HYPER_X ALL_T(KC_X) +#define HYPE_DOT ALL_T(KC_DOT) +#define MEH_S MEH_T(KC_S) +#define MEH_L MEH_T(KC_L) +#define ALT_HOME ALT_T(KC_HOME) // KC/Layer Hold @@ -52,6 +62,15 @@ #define SYMB_BSP LT(_SYMBOLS,KC_BSPACE) #define COL_MOUS LT(_MOUSE,KC_SCOLON) #define SPAC_SYM LT(_SYMBOLS,KC_SPACE) +#define SPAC_TXT LT(_TEXTNAV,KC_SPACE) + +#define APP_SW_I LT(_APPSWITCH,KC_I) +#define APP_SW_K LT(_APPSWITCH,KC_K) + +// #define TLSLSH TIL_SLASH +// #define TILDA_3x TILD3 +// #define _RESET_ UP_ENTER_RESET + // Double Modifier ONLY hold #define ALT_SHFT LSFT(KC_LALT) @@ -60,6 +79,7 @@ // KC/Double modifier Hold #define CTR_SH_W MT(MOD_LCTL|MOD_LSFT,KC_W) #define CTR_AL_R MT(MOD_LCTL|MOD_LALT,KC_R) +#define ALT_SH_R MT(MOD_LSFT|MOD_LALT,KC_R) //MISC #define PRINTSCR KC_PSCREEN @@ -82,16 +102,77 @@ enum { TRIPLE_HOLD = 7 }; +//Tap dance enums +enum +{ + F12TAP = 0, + F12ETAPS, + CALCCOMP, + REFRESH, //send R, or Control+R if double tapped. + ENDESC, + XESC, //'quad function'. x, control, escape, alt + ALY2, //'quad function': a, Hyper, ctrl+a, layer 2 + PRLOCK, + F6F7, // Shift F6 or Alt F7 + TABCOMBO, + FCTRL, + F3D, + ALTF4, + COMMA, + AT, + HTAB, + F1F13, + F2F14, + F5F15, + ENDHOME, + Q_ESCAPE +}; + +#ifdef TAP_DANCE_ENABLE +#define F1_F13 TD(F1F13) +#define F2_F14 TD(F2F14) +#define F5_F15 TD(F5F15) +#define F4_ALTF4 TD(ALTF4) +#define END_ESC TD(ENDESC) +#define Q_ESC TD(Q_ESCAPE) +#define END_HOME TD(ENDHOME) +#define SHF6_AF7 TD(F6F7) +#define F12_RUN TD(F12ETAPS) +#define COMMA_TD TD(COMMA) +#define CALC_COM TD(CALCCOMP) +#else //just to make things compile +#define F1_F13 KC_1 +#define F2_F14 KC_1 +#define F5_F15 KC_1 +#define F4_ALTF4 KC_1 +#define END_ESC KC_1 +#define END_HOME KC_1 +#define SHF6_AF7 KC_1 +#define F12_RUN KC_1 +#define COMMA_TD KC_1 +#define CALC_COM KC_1 +#endif + enum gordon_layers { _QWERTY = 0, - _SYMBOLS, - _MOUSE, - _NUMPAD, - _NAV, - _MACROS, - _FUNCTION, - _TEXTNAV + _SYMBOLS, // Programming and all other commonlye used symbols + _MOUSE, // Mouse movement and also a few macros + _NUMPAD, // For getting a numpad under the right hand, and a few helpful things under the left + _NAV, // Windows navigation. Windows snapping, changing workspaces, and ARROWS + _MACROS, // Non-text related Macros. + _FUNCTION, // Not sure what I had in mind for this one + _APPSWITCH, // For switching between apps using the `ctrl + Win + [num]` shortcut. + // This allows for toggling windows of the same app with one button. + // Example: Press and hold `I`, then tap `j` multiple times to cycle through all + // Intellij windows (and only Intellij). This requires the app to be pinned to the Windows bar + _ONESHOT, // A layer I use for shortcuts that require multiple modifiers and a button not on my home layer + // Example: If I need to hit `alt + shift + 5` + _TEXTNAV, // Navigate through text + _QWERTY_KIDS, // So my kids can do nothing but type. Could also be a `speed typing` layer with no LT or MTs + _STREET_FIGHTER, // For Street Fighter 5. Die 1000x Deaths!!!! + _DIRNAV, // For navigating to different directories. + _TEXT_MACROS // For text-manipulation macros. Passwords, saved strings, pre-formatting }; @@ -99,23 +180,23 @@ enum gordon_layers void register_hyper (void); void unregister_hyper (void); -void register_ctrl_a (void); -void unregister_ctrl_a (void); +void register_ctrl_a (void); +void unregister_ctrl_a (void); -void register_alt_f7 (void); +void register_alt_f7 (void); void unregister_alt_f7 (void); -void register_shift_f6 (void); -void unregister_shift_f6 (void); +void register_shift_f6 (void); +void unregister_shift_f6 (void); -void register_ctrl_shift (void); -void unregister_ctrl_shift (void); +void register_ctrl_shift (void); +void unregister_ctrl_shift (void); -void register_alt_shift (void); +void register_alt_shift (void); void unregister_alt_shift (void); -int cur_dance (qk_tap_dance_state_t *state); -int hold_cur_dance (qk_tap_dance_state_t *state); +int cur_dance (qk_tap_dance_state_t *state); +int hold_cur_dance (qk_tap_dance_state_t *state); void x_finished (qk_tap_dance_state_t *state, void *user_data); void x_reset (qk_tap_dance_state_t *state, void *user_data); @@ -132,26 +213,37 @@ void comma_reset (qk_tap_dance_state_t *state, void *user_data); void bt_finished (qk_tap_dance_state_t *state, void *user_data); void bt_reset (qk_tap_dance_state_t *state, void *user_data); -// Macro Declarations -enum { - INFOQM, - TIL_SLASH, - DEREF, - EQRIGHT, - TILD3, - TICK3, - ALTTAB_START, - ALTTAB_END -}; - enum secret_strings { KC_SECRET_1 = SAFE_RANGE, KC_SECRET_2, KC_SECRET_3, KC_SECRET_4, KC_SECRET_5, + END_SECRET_SAFE_RANGE }; + +// Macro Declarations +enum { + INFOQM = END_SECRET_SAFE_RANGE, + MODRESET, + TIL_SLASH, + DEREF, + EQRIGHT, + TILD3, + TICK3, + SPRK_TCK, + ALTTAB_START, + ALTTAB_END, + UP_ENTER_RESET, + DBMS_OUT, + DIE_1000X_RIGHT, + DIE_1000X_LEFT, + ID_MAN_IP +}; + + + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); -#endif \ No newline at end of file +#endif diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk index 359478912..19e77b01b 100644 --- a/users/gordon/rules.mk +++ b/users/gordon/rules.mk @@ -1,2 +1,4 @@ TAP_DANCE_ENABLE = yes -SRC += gordon.c \ No newline at end of file +SRC += gordon.c + +# BOOTMAGIC_ENABLE = yes diff --git a/users/losinggeneration/losinggeneration-keymap.h b/users/losinggeneration/losinggeneration-keymap.h index 89827bc13..74170dc31 100644 --- a/users/losinggeneration/losinggeneration-keymap.h +++ b/users/losinggeneration/losinggeneration-keymap.h @@ -88,9 +88,20 @@ qk_tap_dance_action_t tap_dance_actions[] = { * |Adjust| Ctrl | Alt | GUI |Lower | Del ||Space |Raise | Left | Down | Up |Right | * `-----------------------------------------'`-----------------------------------------' */ -#define BOTTOM_40_ROW \ +#define BOTTOM_GRID_ROW \ TD_ADJ ,TD_CTL , TD_ALT , TD_GUI , LOWER , KC_DEL , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT +/* + * ,-----------------------------------------..-----------------------------------------. + * |Adjust| Ctrl | Alt | GUI |Lower |Space ||Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------'`-----------------------------------------' + */ +#define BOTTOM_MIT_ROW \ + TD_ADJ ,TD_CTL , TD_ALT , TD_GUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT + +#ifdef USE_MIT_LAYOUT +#define BOTTOM_ROW BOTTOM_MIT_ROW + /* * ,-----------------------------------------..-----------------------------------------. * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | @@ -102,6 +113,22 @@ qk_tap_dance_action_t tap_dance_actions[] = { _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PGUP, KC_PGDN, KC_HOME, KC_END , KC_MSTP, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY +#else +#define BOTTOM_ROW BOTTOM_GRID_ROW + +/* + * ,-----------------------------------------..-----------------------------------------. + * | | F7 | F8 | F9 | F10 | F11 || F12 | PgUp | PgDn | Home | End | ⏹ | + * |------+------+------+------+------+------||------+------+------+------+------+------| + * | | | | | | || Bksp | | Mute | Vol- | Vol+ | ⏯ | + * `-----------------------------------------'`-----------------------------------------' + */ +#define BOTTOM_RAISE_LOWER_ROWS \ + _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PGUP, KC_PGDN, KC_HOME, KC_END , KC_MSTP, \ + _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY +#endif + + /* * ,-----------------------------------------..-----------------------------------------. * | Tab | || | Bksp | @@ -115,7 +142,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { * `-----------------------------------------'`-----------------------------------------' */ -#define STD_ESC_ROW(...) KC_ESC, __VA_ARGS__ +#define STD_ESC_ROW(...) MT_ESC, __VA_ARGS__ /* * ,-----------------------------------------..-----------------------------------------. @@ -139,7 +166,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { STD_TAB_ROW( KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ), \ STD_ESC_ROW( KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT), \ STD_LSFT_ROW(KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_40_ROW + BOTTOM_ROW /* Colemak * ,-----------------------------------------.,-----------------------------------------. @@ -156,7 +183,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { STD_TAB_ROW( KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN), \ STD_ESC_ROW( KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , KC_QUOT), \ STD_LSFT_ROW(KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_40_ROW + BOTTOM_ROW /* Workman * ,-----------------------------------------..-----------------------------------------. @@ -173,7 +200,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { STD_TAB_ROW( KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN), \ STD_ESC_ROW( KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , KC_QUOT), \ STD_LSFT_ROW(KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH), \ - BOTTOM_40_ROW + BOTTOM_ROW /* Dvorak * ,-----------------------------------------..-----------------------------------------. @@ -190,7 +217,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { STD_TAB_ROW( KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L), \ STD_ESC_ROW( KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_SLSH), \ STD_LSFT_ROW(KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z), \ - BOTTOM_40_ROW + BOTTOM_ROW /* Game (Qwerty without one shot modifiers & tap dancing) * ,-----------------------------------------..-----------------------------------------. diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index fa2314960..0f1f6f26a 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -1,3 +1,7 @@ -SRC += talljoe.c +SRC += talljoe.c tapdance.c EXTRAFLAGS+=-flto + +TAP_DANCE_ENABLE=yes +CONSOLE_ENABLE=no +COMMAND_ENABLE=no diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c index e49a3060d..e9c69b016 100644 --- a/users/talljoe/talljoe.c +++ b/users/talljoe/talljoe.c @@ -3,66 +3,67 @@ #include "talljoe.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = 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_BSLS, KC_ESC, - 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, - US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, KC_SCLN, US_QUOT, US_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_ADJ , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_APP , KC_RCTL, KC_PTT ), - [_WORKMAN] = LAYOUT( + [_BASE] = TEMPLATE_TKL( + KC_ESC, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, MO_ADJ , + 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_INS , KC_HOME, KC_PGUP, + 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_DEL , KC_END , KC_PGDN, + US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, US_QUOT, US_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, KC_UP , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), + [_WORKMAN] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______, + _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_NORMAN] = LAYOUT( + [_NORMAN] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______, + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , US_SCLN, _______, _______, _______, _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_DVORAK] = LAYOUT( + [_DVORAK] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y , KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL , _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I , KC_D, KC_H, KC_T, KC_N, KC_S, US_MINS, _______, - _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, + _______, US_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_COLMAK] = LAYOUT( + [_COLMAK] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, US_SCLN, _______, _______, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O , _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), #ifdef ENABLE_GAME_LAYER - [_GAME] = LAYOUT( + [_GAME] = TEMPLATE( KC_ESC , 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_GRV, 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, MO_NAV , 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_ADJ , KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_PTT ), #endif - [_NAV] = LAYOUT( + [_NAV] = TEMPLATE( KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN2, KC_BTN3, KC_DEL , US_CAPS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_RCTL, TG_ADJ , - KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, XXXXXXX, + KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), - [_NUM] = LAYOUT( + [_NUM] = TEMPLATE( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, XXXXXXX, KC_DEL , US_CAPS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, XXXXXXX, - KC_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, XXXXXXX, + KC_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, KC_SCLN, XXXXXXX, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) - [_ADJUST] = LAYOUT( + [_ADJUST] = TEMPLATE( MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , XXXXXXX, H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, KC_DEL , XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, - MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), + MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_STEP, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), // To Reset hit FN + ` + Esc - [_RESET] = LAYOUT( + [_RESET] = TEMPLATE( RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, @@ -98,6 +99,27 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + +#ifdef RGBLIGHT_ENABLE + static uint32_t savedRgbMode; + static uint16_t savedHue; + static uint8_t savedSat; + static uint8_t savedVal; + + if (keycode == KC_ESC) { + if (record->event.pressed) { + savedRgbMode = rgblight_get_mode(); + savedHue = rgblight_get_hue(); + savedSat = rgblight_get_sat(); + savedVal = rgblight_get_val(); + rgblight_mode(1); + rgblight_setrgb(255, 0, 0); + } else { + rgblight_mode(savedRgbMode); + rgblight_sethsv(savedHue, savedSat, savedVal); + } + } +#endif // If console is enabled, it will print the matrix position and status of each key pressed #ifdef CONSOLE_ENABLE xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 17e54af69..7c34cd41f 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -28,6 +28,10 @@ enum layers { _RESET = RESET_LAYER, }; +enum tap_dancers { + TD_SEMICOLON +}; + #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -53,6 +57,7 @@ enum layers { #define US_CAPS CTL_T(KC_ESC) #define US_QUOT RCTL_T(KC_QUOT) #define US_MINS RCTL_T(KC_QUOT) +#define US_SCLN TD(TD_SEMICOLON) #define US_ENT LT(_NUM, KC_ENT) #ifndef SPACE_COUNT @@ -105,4 +110,37 @@ enum layers { #define FN_MO2 KC_NO #endif +#ifdef TEMPLATE_TKL + #define _X_ KC_NO + #define TEMPLATE( \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \ + KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \ + ) TEMPLATE_TKL ( \ + KJ6, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, _X_, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, _X_, _X_, _X_, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, _X_, _X_, _X_, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, _X_, \ + KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, _X_, _X_, _X_ \ + ) +#else + #define TEMPLATE_TKL( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + ) TEMPLATE( \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KJ6, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KA5, \ + KA4, KP2, KC6, KX1, KK6, KX2, KC0, KM3, KD0, KA1 \ + ) +#endif + #endif diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c new file mode 100644 index 000000000..3198fc67f --- /dev/null +++ b/users/talljoe/tapdance.c @@ -0,0 +1,34 @@ +//Tap Dance +#include "talljoe.h" + +// Send semin-colon + enter on two taps +void tap_dance_semicolon(qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: + register_code(KC_SCLN); + unregister_code(KC_SCLN); + break; + case 2: + register_code(KC_SCLN); + unregister_code(KC_SCLN); + + uint8_t mods = get_mods(); + if (mods) { + clear_mods(); + } + + register_code(KC_ENT); + unregister_code(KC_ENT); + + if (mods) { + set_mods(mods); + } + + reset_tap_dance(state); + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMICOLON] = ACTION_TAP_DANCE_FN(tap_dance_semicolon), +}; diff --git a/users/xtonhasvim/readme.md b/users/xtonhasvim/readme.md new file mode 100644 index 000000000..e08e972f4 --- /dev/null +++ b/users/xtonhasvim/readme.md @@ -0,0 +1,10 @@ + +# Xton has Vim! + +Contains common code for Xton's vim emulation (vimulation?) layer. + +Inspired/stolen from the `ergodox_ez/vim` keymap. Rewritten to be a more straightforward state machine and support more macros. Vim layers `_CMD` and `_EDIT` are designed to lay on top of an otherwise fully-functional layout. `_CMD` runs the entire vim state machine while `_EDIT` should lay across your base layer and mask off just the escape key. + +Works via OSX text editing shortcuts, mainly MOD+arrow combinations. This has some limitations and only works on OSX. + +The `_CMD` layer will temporarily disable itself while *CMD* or *ALT* are held down so that typical OSX shortcuts can be used without switching out of vim mode. diff --git a/users/xtonhasvim/rules.mk b/users/xtonhasvim/rules.mk new file mode 100644 index 000000000..3777917f8 --- /dev/null +++ b/users/xtonhasvim/rules.mk @@ -0,0 +1 @@ +SRC += xtonhasvim.c diff --git a/users/xtonhasvim/xtonhasvim.c b/users/xtonhasvim/xtonhasvim.c new file mode 100644 index 000000000..a2ff2fa31 --- /dev/null +++ b/users/xtonhasvim/xtonhasvim.c @@ -0,0 +1,615 @@ + /* Copyright 2015-2017 Christon DeWan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "xtonhasvim.h" + +/************************************ + * helper foo + ************************************/ + +#define PRESS(kc) register_code(kc) +#define RELEASE(kc) unregister_code(kc) + +static void TAP(uint16_t keycode) { + PRESS(keycode); + RELEASE(keycode); +} + +static void CMD(uint16_t keycode) { + PRESS(KC_LGUI); + TAP(keycode); + RELEASE(KC_LGUI); +} + +static void CTRL(uint16_t keycode) { + PRESS(KC_LCTRL); + TAP(keycode); + RELEASE(KC_LCTRL); +} + +static void SHIFT(uint16_t keycode) { + PRESS(KC_LSHIFT); + TAP(keycode); + RELEASE(KC_LSHIFT); +} + +static void ALT(uint16_t keycode) { + PRESS(KC_LALT); + TAP(keycode); + RELEASE(KC_LALT); +} + + +static uint16_t vstate = VIM_START; +static bool yank_was_lines = false; +static bool SHIFTED = false; +static uint32_t mod_override_layer_state = 0; +static uint16_t mod_override_triggering_key = 0; + +static void edit(void) { vstate = VIM_START; layer_on(_EDIT); layer_off(_CMD); } +#define EDIT edit() + + +static void simple_movement(uint16_t keycode) { + switch(keycode) { + case VIM_B: + PRESS(KC_LALT); + SHIFT(KC_LEFT); // select to start of this word + RELEASE(KC_LALT); + break; + case VIM_E: + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + RELEASE(KC_LALT); + break; + case VIM_H: + SHIFT(KC_LEFT); + break; + case VIM_J: + CMD(KC_LEFT); + SHIFT(KC_DOWN); + SHIFT(KC_DOWN); + break; + case VIM_K: + CMD(KC_LEFT); + TAP(KC_DOWN); + SHIFT(KC_UP); + SHIFT(KC_UP); + break; + case VIM_L: + SHIFT(KC_RIGHT); + break; + case VIM_W: + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + SHIFT(KC_RIGHT); // select to end of next word + SHIFT(KC_LEFT); // select to start of next word + RELEASE(KC_LALT); + break; + } +} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +#define PASS_THRU process_record_keymap(keycode, record) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed && layer_state_is(_CMD) && IS_MOD(keycode)) { + mod_override_layer_state = layer_state; + mod_override_triggering_key = keycode; + layer_clear(); + return PASS_THRU; // let the event fall through... + } + if(mod_override_layer_state && !record->event.pressed && keycode == mod_override_triggering_key) { + layer_state_set(mod_override_layer_state); + mod_override_layer_state = 0; + mod_override_triggering_key = 0; + return PASS_THRU; + } + + if (VIM_START <= keycode && keycode <= VIM_ESC) { + if(keycode == VIM_SHIFT) { + SHIFTED = record->event.pressed; + return false; + } + + if (record->event.pressed) { + if(keycode == VIM_START) { + // entry from anywhere + layer_on(_CMD); + vstate = VIM_START; + + // reset state + yank_was_lines = false; + SHIFTED = false; + mod_override_layer_state = 0; + mod_override_triggering_key = 0; + + return false; + } + switch(vstate) { + case VIM_START: + switch(keycode){ + /***************************** + * ground state + *****************************/ + case VIM_A: + if(SHIFTED) { + // CMD(KC_RIGHT); + CTRL(KC_E); + } else { + TAP(KC_RIGHT); + } + EDIT; + break; + case VIM_B: + PRESS(KC_LALT); + PRESS(KC_LEFT); + break; + case VIM_C: + if(SHIFTED) { + PRESS(KC_LSHIFT); + CMD(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); + yank_was_lines = false; + EDIT; + } else { + vstate = VIM_C; + } + break; + case VIM_D: + if(SHIFTED) { + TAP(KC_K); + } else { + vstate = VIM_D; + } + break; + case VIM_E: + PRESS(KC_LALT); + PRESS(KC_RIGHT); + break; + case VIM_G: + if(SHIFTED) { + TAP(KC_END); + } else { + vstate = VIM_G; + } + break; + case VIM_H: + PRESS(KC_LEFT); + break; + case VIM_I: + if(SHIFTED){ + CTRL(KC_A); + } + EDIT; + break; + case VIM_J: + if(SHIFTED) { + CMD(KC_RIGHT); + TAP(KC_DEL); + } else { + PRESS(KC_DOWN); + } + break; + case VIM_K: + PRESS(KC_UP); + break; + case VIM_L: + PRESS(KC_RIGHT); + break; + case VIM_O: + if(SHIFTED) { + CMD(KC_LEFT); + TAP(KC_ENTER); + TAP(KC_UP); + EDIT; + } else { + CMD(KC_RIGHT); + TAP(KC_ENTER); + EDIT; + } + break; + case VIM_P: + if(SHIFTED) { + CMD(KC_LEFT); + CMD(KC_V); + } else { + if(yank_was_lines) { + CMD(KC_RIGHT); + TAP(KC_RIGHT); + CMD(KC_V); + } else { + CMD(KC_V); + } + } + break; + case VIM_S: + // s for substitute? + if(SHIFTED) { + CMD(KC_LEFT); + PRESS(KC_LSHIFT); + CMD(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); + yank_was_lines = false; + EDIT; + } else { + SHIFT(KC_RIGHT); + CMD(KC_X); + yank_was_lines = false; + EDIT; + } + break; + case VIM_U: + if(SHIFTED) { + PRESS(KC_LSFT); + CMD(KC_Z); + RELEASE(KC_LSHIFT); + } else { + CMD(KC_Z); + } + break; + case VIM_V: + if(SHIFTED) { + CMD(KC_LEFT); + SHIFT(KC_DOWN); + vstate = VIM_VS; + } else { + vstate = VIM_V; + } + break; + case VIM_W: + PRESS(KC_LALT); + TAP(KC_RIGHT); + TAP(KC_RIGHT); + TAP(KC_LEFT); + RELEASE(KC_LALT); + break; + case VIM_X: + // SHIFT(KC_RIGHT); + // CMD(KC_X); + PRESS(KC_DEL); + break; + case VIM_Y: + if(SHIFTED) { + CMD(KC_LEFT); + SHIFT(KC_DOWN); + CMD(KC_C); + TAP(KC_RIGHT); + yank_was_lines = true; + } else { + vstate = VIM_Y; + } + break; + case VIM_COMMA: + if(SHIFTED) { + // indent + CMD(KC_LBRACKET); + } else { + // toggle comment + CMD(KC_SLASH); + } + break; + case VIM_PERIOD: + if(SHIFTED) { + // outdent + CMD(KC_RBRACKET); + } + break; + } + break; + case VIM_C: + /***************************** + * c- ...for change. I never use this... + *****************************/ + switch(keycode) { + case VIM_B: + case VIM_E: + case VIM_H: + case VIM_J: + case VIM_K: + case VIM_L: + case VIM_W: + simple_movement(keycode); + CMD(KC_X); + yank_was_lines = false; + EDIT; + break; + + case VIM_C: + CMD(KC_LEFT); + PRESS(KC_LSHIFT); + CMD(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); + yank_was_lines = false; + EDIT; + break; + case VIM_I: + vstate = VIM_CI; + break; + default: + vstate = VIM_START; + break; + } + break; + case VIM_CI: + /***************************** + * ci- ...change inner word + *****************************/ + switch(keycode) { + case VIM_W: + ALT(KC_LEFT); + PRESS(KC_LSHIFT); + ALT(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); + yank_was_lines = false; + EDIT; + default: + vstate = VIM_START; + break; + } + break; + case VIM_D: + /***************************** + * d- ...delete stuff + *****************************/ + switch(keycode) { + case VIM_B: + case VIM_E: + case VIM_H: + case VIM_J: + case VIM_K: + case VIM_L: + case VIM_W: + simple_movement(keycode); + CMD(KC_X); + yank_was_lines = false; + vstate = VIM_START; + break; + case VIM_D: + CMD(KC_LEFT); + SHIFT(KC_DOWN); + CMD(KC_X); + yank_was_lines = true; + vstate = VIM_START; + break; + case VIM_I: + vstate = VIM_DI; + break; + default: + vstate = VIM_START; + break; + } + break; + case VIM_DI: + /***************************** + * ci- ...delete a word... FROM THE INSIDE! + *****************************/ + switch(keycode) { + case VIM_W: + ALT(KC_LEFT); + PRESS(KC_LSHIFT); + ALT(KC_RIGHT); + RELEASE(KC_LSHIFT); + CMD(KC_X); + yank_was_lines = false; + vstate = VIM_START; + default: + vstate = VIM_START; + break; + } + break; + case VIM_V: + /***************************** + * visual! + *****************************/ + switch(keycode) { + case VIM_D: + case VIM_X: + CMD(KC_X); + yank_was_lines = false; + vstate = VIM_START; + break; + case VIM_B: + PRESS(KC_LALT); + PRESS(KC_LSHIFT); + PRESS(KC_LEFT); + // leave open for key repeat + break; + case VIM_E: + PRESS(KC_LALT); + PRESS(KC_LSHIFT); + PRESS(KC_RIGHT); + // leave open for key repeat + break; + case VIM_H: + PRESS(KC_LSHIFT); + PRESS(KC_LEFT); + break; + case VIM_I: + vstate = VIM_VI; + break; + case VIM_J: + PRESS(KC_LSHIFT); + PRESS(KC_DOWN); + break; + case VIM_K: + PRESS(KC_LSHIFT); + PRESS(KC_UP); + break; + case VIM_L: + PRESS(KC_LSHIFT); + PRESS(KC_RIGHT); + break; + case VIM_W: + PRESS(KC_LALT); + SHIFT(KC_RIGHT); // select to end of this word + SHIFT(KC_RIGHT); // select to end of next word + SHIFT(KC_LEFT); // select to start of next word + RELEASE(KC_LALT); + break; + case VIM_P: + CMD(KC_V); + vstate = VIM_START; + break; + case VIM_Y: + CMD(KC_C); + TAP(KC_RIGHT); + yank_was_lines = false; + vstate = VIM_START; + break; + case VIM_V: + case VIM_ESC: + TAP(KC_RIGHT); + vstate = VIM_START; + break; + default: + // do nothing + break; + } + break; + case VIM_VI: + /***************************** + * vi- ...select a word... FROM THE INSIDE! + *****************************/ + switch(keycode) { + case VIM_W: + ALT(KC_LEFT); + PRESS(KC_LSHIFT); + ALT(KC_RIGHT); + RELEASE(KC_LSHIFT); + vstate = VIM_V; + default: + // ignore + vstate = VIM_V; + break; + } + break; + case VIM_VS: + /***************************** + * visual line + *****************************/ + switch(keycode) { + case VIM_D: + case VIM_X: + CMD(KC_X); + yank_was_lines = true; + vstate = VIM_START; + break; + case VIM_J: + PRESS(KC_LSHIFT); + PRESS(KC_DOWN); + break; + case VIM_K: + PRESS(KC_LSHIFT); + PRESS(KC_UP); + break; + case VIM_Y: + CMD(KC_C); + yank_was_lines = true; + TAP(KC_RIGHT); + vstate = VIM_START; + break; + case VIM_P: + CMD(KC_V); + vstate = VIM_START; + break; + case VIM_V: + case VIM_ESC: + TAP(KC_RIGHT); + vstate = VIM_START; + break; + default: + // do nothing + break; + } + break; + case VIM_G: + /***************************** + * gg, and a grab-bag of other macros i find useful + *****************************/ + switch(keycode) { + case VIM_G: + TAP(KC_HOME); + break; + // codes b + case VIM_H: + CTRL(KC_A); + break; + case VIM_J: + PRESS(KC_PGDN); + break; + case VIM_K: + PRESS(KC_PGUP); + break; + case VIM_L: + CTRL(KC_E); + break; + default: + // do nothing + break; + } + vstate = VIM_START; + break; + case VIM_Y: + /***************************** + * yoink! + *****************************/ + switch(keycode) { + case VIM_B: + case VIM_E: + case VIM_H: + case VIM_J: + case VIM_K: + case VIM_L: + case VIM_W: + simple_movement(keycode); + CMD(KC_C); + TAP(KC_RIGHT); + yank_was_lines = false; + break; + case VIM_Y: + CMD(KC_LEFT); + SHIFT(KC_DOWN); + CMD(KC_C); + TAP(KC_RIGHT); + yank_was_lines = true; + break; + default: + // NOTHING + break; + } + vstate = VIM_START; + break; + } + } else { + /************************ + * key release events + ************************/ + clear_keyboard(); + } + return false; + } else { + return PASS_THRU; + } +} diff --git a/users/xtonhasvim/xtonhasvim.h b/users/xtonhasvim/xtonhasvim.h new file mode 100644 index 000000000..21b794c03 --- /dev/null +++ b/users/xtonhasvim/xtonhasvim.h @@ -0,0 +1,66 @@ + /* Copyright 2015-2017 Christon DeWan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef USERSPACE +#define USERSPACE + +#include QMK_KEYBOARD_H +#include "action_layer.h" + +#define X_____X KC_NO + +bool process_record_xtonhasvim(uint16_t keycode, keyrecord_t *record); + +enum xtonhasvim_keycodes { + DUMMY = SAFE_RANGE, + VIM_START, // bookend for vim states + VIM_A, + VIM_B, + VIM_C, + VIM_CI, + VIM_D, + VIM_DI, + VIM_E, + VIM_H, + VIM_G, + VIM_I, + VIM_J, + VIM_K, + VIM_L, + VIM_O, + VIM_P, + VIM_S, + VIM_U, + VIM_V, + VIM_VS, // visual-line + VIM_VI, + VIM_W, + VIM_X, + VIM_Y, + VIM_PERIOD, // to support indent/outdent + VIM_COMMA, // and toggle comments + VIM_SHIFT, // avoid side-effect of supporting real shift. + VIM_ESC, // bookend + VIM_SAFE_RANGE // start other keycodes here. +}; + +enum xtonhasvim_layers { + _EDIT = 12, + _CMD +}; + + +#endif