diff --git a/.vscode/settings.json b/.vscode/settings.json index afe8341d0e2..3b91e707e31 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "*.h": "c", "*.c": "c", "*.cpp": "cpp", - "*.hpp": "cpp" + "*.hpp": "cpp", + "xstddef": "c" } } \ No newline at end of file diff --git a/bootloader.mk b/bootloader.mk index 55352f3d426..4bcf183fb77 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -32,21 +32,41 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY - BOOTLOADER_SIZE = 512 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 512 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 1024 + endif endif ifeq ($(strip $(BOOTLOADER)), caterina) OPT_DEFS += -DBOOTLOADER_CATERINA @@ -59,4 +79,4 @@ endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -endif \ No newline at end of file +endif diff --git a/build_keyboard.mk b/build_keyboard.mk index 90a3df7768c..4781f4a5d19 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -204,7 +204,11 @@ else endif # User space stuff -USER_PATH := users/$(KEYMAP) +ifeq ("$(USER_NAME)","") + USER_NAME := $(KEYMAP) +endif +USER_PATH := users/$(USER_NAME) + -include $(USER_PATH)/rules.mk ifneq ("$(wildcard users/$(KEYMAP)/config.h)","") CONFIG_H += users/$(KEYMAP)/config.h diff --git a/common_features.mk b/common_features.mk index 9b99edd752f..7ba7d48154d 100644 --- a/common_features.mk +++ b/common_features.mk @@ -34,6 +34,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE MUSIC_ENABLE := 1 SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c + SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c ifeq ($(PLATFORM),AVR) SRC += $(QUANTUM_DIR)/audio/audio.c else @@ -113,6 +114,15 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif +ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) + OPT_DEFS += -DRGB_MATRIX_ENABLE + SRC += is31fl3731.c + SRC += TWIlib.c + SRC += $(QUANTUM_DIR)/color.c + SRC += $(QUANTUM_DIR)/rgb_matrix.c + CIE1931_CURVE = yes +endif + ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) OPT_DEFS += -DTAP_DANCE_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c diff --git a/keyboards/xd60/keymaps/krusli/HHKB-like.txt b/docs/.nojekyll similarity index 100% rename from keyboards/xd60/keymaps/krusli/HHKB-like.txt rename to docs/.nojekyll diff --git a/docs/README.md b/docs/README.md index 93347a42e1c..a4db81eb622 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,18 +1,25 @@ # Quantum Mechanical Keyboard Firmware -## What is QMK Firmware? {#what-is-qmk-firmware} +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) -QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. +## What is QMK Firmware? -## How to Get It {#how-to-get-it} +QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Toolbox, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. + +## How to Get It If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork. Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`). -## How to Compile {#how-to-compile} +## How to Compile -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: +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: make planck/rev4:default @@ -20,6 +27,6 @@ This would build the `rev4` revision of the `planck` with the `default` keymap. make preonic:default -## How to Customize {#how-to-customize} +## How to Customize -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). +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). diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 00000000000..00aeb805777 --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,99 @@ +* [Getting Started](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Install Build Tools](getting_started_build_tools.md) + * Alternative: [Vagrant Guide](getting_started_vagrant.md) + * [Build/Compile Instructions](getting_started_make_guide.md) + * [Flashing Firmware](flashing.md) + * [Contributing to QMK](contributing.md) + * [How to Use Github](getting_started_github.md) + * [Getting Help](getting_started_getting_help.md) + +* [Complete Newbs Guide](newbs.md) + * [Getting Started](newbs_getting_started.md) + * [Building Your First Firmware](newbs_building_firmware.md) + * [Flashing Firmware](newbs_flashing.md) + * [Testing and Debugging](newbs_testing_debugging.md) + +* [FAQ](faq.md) + * [General FAQ](faq_general.md) + * [Build/Compile QMK](faq_build.md) + * [Debugging/Troubleshooting QMK](faq_debug.md) + * [Keymap](faq_keymap.md) + +* [Hardware](hardware.md) + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [AVR Processors](hardware_avr.md) + * ARM Processors (TBD) + * [Drivers](hardware_drivers.md) + +* [Features](features.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Backlight](feature_backlight.md) + * [Bootmagic](feature_bootmagic.md) + * [Command](feature_command.md) + * [Dynamic Macros](feature_dynamic_macros.md) + * [Grave Escape](feature_grave_esc.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Leader Key](feature_leader_key.md) + * [Macros](feature_macros.md) + * [Mouse Keys](feature_mouse_keys.md) + * [Pointing Device](feature_pointing_device.md) + * [PS/2 Mouse](feature_ps2_mouse.md) + * [RGB Lighting](feature_rgblight.md) + * [Space Cadet Shift](feature_space_cadet.md) + * [Space Cadet Shift Enter](feature_space_shift_cadet.md) + * [Stenography](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + +* [Keycodes](keycodes.md) + * [Backlight](feature_backlight.md#backlight-keycodes) + * [Basic](keycodes_basic.md) + * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) + * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) + * [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) + * [Mod+Key](feature_advanced_keycodes.md#modifier-keys) + * [Mod Tap](feature_advanced_keycodes.md#mod-tap) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) + * [Quantum](quantum_keycodes.md) + * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) + * [Stenography](feature_stenography.md#keycode-reference) + * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) + +* Reference + * [Config Options](config_options.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Documentation Templates](documentation_templates.md) + * [Glossary](reference_glossary.md) + * [Keymap Overview](keymap.md) + * [Unit Testing](unit_testing.md) + +* For Makers and Modders + * [Hand Wiring Guide](hand_wire.md) + * [ISP Flashing Guide](isp_flashing_guide.md) + +* For a Deeper Understanding + * [How Keyboards Work](how_keyboards_work.md) + * [Understanding QMK](understanding_qmk.md) + +* Other Topics + * [Using Eclipse with QMK](eclipse.md) + +* QMK Internals (In Progress) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Midi Device](internals_midi_device.md) + * [Midi Device Setup Process](internals_midi_device_setup_process.md) + * [Midi Util](internals_midi_util.md) + * [Send Functions](internals_send_functions.md) + * [Sysex Tools](internals_sysex_tools.md) diff --git a/docs/config_options.md b/docs/config_options.md index d45592f82fb..8cdcc97e495 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -89,6 +89,8 @@ This is a C header file that is one of the first things included, and will persi * tries to keep switch state consistent with keyboard LED state * `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )` * key combination that allows the use of magic commands (useful for debugging) +* `#define USB_MAX_POWER_CONSUMPTION` + * sets the maximum power (in mA) over USB for the device (default: 500) ## Features That Can Be Disabled @@ -116,7 +118,7 @@ If you define these options you will enable the associated feature, which may in * `#define FORCE_NKRO` * NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. * `#define PREVENT_STUCK_MODIFIERS` - * when switching layers, this will release all mods + * stores the layer a key press came from so the same layer is used when the key is released, regardless of which layers are enabled ## Behaviors That Can Be Configured diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md index 80de8c039a9..77c226117c2 100644 --- a/docs/documentation_best_practices.md +++ b/docs/documentation_best_practices.md @@ -22,59 +22,26 @@ Your page should generally have multiple "H1" headings. Only H1 and H2 headings You can have styled hint blocks drawn around text to draw attention to it. +### Important + ``` -{% hint style='info' %} -This uses `hint style='info'` -{% endhint %} +!> This is important ``` -### Examples: - -{% hint style='info' %} -This uses `hint style='info'` -{% endhint %} - -{% hint style='tip' %} -This uses `hint style='tip'` -{% endhint %} - -{% hint style='danger' %} -This uses `hint style='danger'` -{% endhint %} +Renders as: -{% hint style='working' %} -This uses `hint style='working'` -{% endhint %} +!> This is important -# Styled Terminal Blocks - -You can present styled terminal blocks by including special tokens inside your text block. +### General Tips ``` -\`\`\` -**[terminal] -**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] -Normal output line. Nothing special here... -But... -You can add some colors. What about a warning message? -**[warning [WARNING] The color depends on the theme. Could look normal too] -What about an error message? -**[error [ERROR] This is not the error you are looking for] -\`\`\` +?> This is a helpful tip. ``` -### Example +Renders as: + +?> This is a helpful tip. -``` -**[terminal] -**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] -Normal output line. Nothing special here... -But... -You can add some colors. What about a warning message? -**[warning [WARNING] The color depends on the theme. Could look normal too] -What about an error message? -**[error [ERROR] This is not the error you are looking for] -``` # Documenting Features @@ -94,4 +61,4 @@ This page describes my cool feature. You can use my cool feature to make coffee |KC_SUGAR||Order Sugar| ``` -Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. +Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_sidebar.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 2db313e75c1..aeb7ce1bf48 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -19,14 +19,15 @@ Currently, the keycodes able to used with these functions are limited to the [Ba # Switching and Toggling Layers -These functions allow you to activate layers in various ways. +These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) -* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. -* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. -* `TG(layer)` - toggles a layer on or off. -* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). -* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you repeatedly tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. -* `LM(layer, mod)` - Momentary switch to *layer* (like MO), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers. +* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) +* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. +* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers. +* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. +* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa +* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed). +* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps. # Working with Layers @@ -36,9 +37,9 @@ Care must be taken when switching layers, it's possible to lock yourself into a If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers: -* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.) +* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number). * Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer. -* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone. +* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone. ### Intermediate Users @@ -130,11 +131,9 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. -{% hint style='info' %} -Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped. +?> Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped. -Additionally, if there is at least one right modifier, any other modifiers will turn into their right equivalents, so it is not possible to "mix and match" the two. -{% endhint %} +?> Additionally, if there is at least one right modifier, any other modifiers will turn into their right equivalents, so it is not possible to "mix and match" the two. # One Shot Keys diff --git a/docs/feature_audio.md b/docs/feature_audio.md index eaaa2fe512f..50e389605c1 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -89,6 +89,20 @@ By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less th Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! +For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `.c` and `music_mask_user(keycode)` in your `keymap.c`: + + bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } + } + +Things that return false are not part of the mask, and are always processed. + The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: #define PITCH_STANDARD_A 432.0f @@ -97,6 +111,36 @@ You can completely disable Music Mode as well. This is useful, if you're pressed #define NO_MUSIC_MODE +## Faux Click + +This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly. + +* `CK_TOGG` - Toggles the status (will play sound if enabled) +* `CK_RST` - Resets the frequency to the default state +* `CK_UP` - Increases the frequency of the clicks +* `CK_DOWN` - Decreases the frequency of the clicks + +The feature is disabled by default, to save space. To enable it, add this to your `config.h`: + + #define AUDIO_CLICKY + +Additionally, even when enabled, the feature is not enabled by default, so you would need to turn it on first. And since we don't use EEPROM to store the setting (yet), you can default this to on by adding this to your `config.h`: + + #define AUDIO_CLICKY_ON + +You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values: + +| Option | Default Value | Description | +|--------|---------------|-------------| +| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. | +| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). | +| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. | +| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. | +| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical. | + + + + ## MIDI Functionality This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index 484c506f13c..9b4b2962490 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -88,10 +88,7 @@ occasion. This is simply due to habit and holding some keys a little longer than others. Once you find this value, work on tapping your problem keys a little quicker than normal and you will be set. -{% hint style='info' %} -Auto Shift has three special keys that can help you get this value right very -quick. See "Auto Shift Setup" for more details! -{% endhint %} +?> Auto Shift has three special keys that can help you get this value right very quick. See "Auto Shift Setup" for more details! ### NO_AUTO_SHIFT_SPECIAL (simple define) diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 006fa04bca9..67315308127 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -2,9 +2,7 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code. -{% hint style='danger' %} -**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. -{% endhint %} +!> **Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. ## The New Way: `SEND_STRING()` & `process_record_user` @@ -132,9 +130,7 @@ SEND_STRING(".."SS_TAP(X_END)); ## The Old Way: `MACRO()` & `action_get_macro` -{% hint style='info' %} -This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. -{% endhint %} +?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example: diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md new file mode 100644 index 00000000000..5d2db3b9709 --- /dev/null +++ b/docs/feature_rgb_matrix.md @@ -0,0 +1,143 @@ +# RGB Matrix Lighting + +There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: + + RGB_MATRIX_ENABLE = yes + +Configure the hardware via your `config.h`: + + // This is a 7-bit address, that gets left-shifted and bit 0 + // set to 0 for write, 1 for read (as per I2C protocol) + // The address will vary depending on your wiring: + // 0b1110100 AD <-> GND + // 0b1110111 AD <-> VCC + // 0b1110101 AD <-> SCL + // 0b1110110 AD <-> SDA + #define DRIVER_ADDR_1 0b1110100 + #define DRIVER_ADDR_2 0b1110110 + + #define DRIVER_COUNT 2 + #define DRIVER_1_LED_TOTAL 25 + #define DRIVER_2_LED_TOTAL 24 + #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. + +Define these arrays listing all the LEDs in your `.c`: + + 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_3, C2_3, C3_3}, + .... + } + +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). + + const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + /* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, + {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, + .... + } + +The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: + + x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION + y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION + +Where all variables are decimels/floats. + +`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). + +## Keycodes + +All RGB keycodes are currently shared with the RGBLIGHT system: + + * `RGB_TOG` - toggle + * `RGB_MOD` - cycle through modes + * `RGB_HUI` - increase hue + * `RGB_HUD` - decrease hue + * `RGB_SAI` - increase saturation + * `RGB_SAD` - decrease saturation + * `RGB_VAI` - increase value + * `RGB_VAD` - decrease value + * `RGB_SPI` - increase speed effect (no EEPROM support) + * `RGB_SPD` - decrease speed effect (no EEPROM support) + + + * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system + +## RGB Matrix Effects + +These are the effects that are currently available: + + enum rgb_matrix_effects { + RGB_MATRIX_SOLID_COLOR = 1, + RGB_MATRIX_ALPHAS_MODS, + RGB_MATRIX_DUAL_BEACON, + RGB_MATRIX_GRADIENT_UP_DOWN, + RGB_MATRIX_RAINDROPS, + RGB_MATRIX_CYCLE_ALL, + RGB_MATRIX_CYCLE_LEFT_RIGHT, + RGB_MATRIX_CYCLE_UP_DOWN, + RGB_MATRIX_RAINBOW_BEACON, + RGB_MATRIX_RAINBOW_PINWHEELS, + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, + RGB_MATRIX_JELLYBEAN_RAINDROPS, + #ifdef RGB_MATRIX_KEYPRESSES + RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_SPLASH, + RGB_MATRIX_MULTISPLASH, + RGB_MATRIX_SOLID_SPLASH, + RGB_MATRIX_SOLID_MULTISPLASH, + #endif + RGB_MATRIX_EFFECT_MAX + }; + +## Custom layer effects + +Custom layer effects can be done by defining this in your `.c`: + + void rgb_matrix_indicators_kb(void) { + // rgb_matrix_set_color(index, red, green, blue); + } + +A similar function works in the keymap as `rgb_matrix_indicators_user`. + +## Additional `config.h` Options + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) + #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) + #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 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 + +## EEPROM storage + +The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: + + #define EECONFIG_RGB_MATRIX (uint32_t *)16 + +Where `16` is an unused index from `eeconfig.h`. + +## Suspended state + +To use the suspend feature, add this to your `.c`: + + void suspend_power_down_kb(void) + { + rgb_matrix_set_suspend_state(true); + } + + void suspend_wakeup_init_kb(void) + { + rgb_matrix_set_suspend_state(false); + } diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index e31e331679d..141c3108d06 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -22,7 +22,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti * `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. -The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. +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. And that's the bulk of it! @@ -179,42 +179,124 @@ Below is a specific example: * Double Tap = Send `Escape` * Double Tap and Hold = Send `Alt` -The following example can be easily expanded to more than 4 quite easily: +## Setup + +You will need a few things that can be used for 'Quad Function Tap-Dance'. The suggested setup is to create a user directory for yourself. This directory will contain rules.mk `.c` and `.h`. This directory should be called ``, and located in the top level `users` directory. There should already be a few examples to look at there. + +### In `/qmk_firmware/users//rules.mk` + +Put the following: ```c -//**************** Definitions needed for quad function to work *********************// -//Enums used to clearly convey the state of the tap dance +TAP_DANCE_ENABLE = yes +SRC += your_name.c +``` + +Pretty simple. It is a nice way to keep some rules common on all your keymaps. + + +### In `/qmk_firmware/users//.h` + +You will need a few things in this file: + +```c +#ifndef YOUR_NAME +#define YOUR_NAME + +#include "quantum.h" +#include "process_keycode/process_tap_dance.h" + + +typedef struct { + bool is_press_action; + int state; +} xtap; + enum { SINGLE_TAP = 1, SINGLE_HOLD = 2, DOUBLE_TAP = 3, DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP - // Add more enums here if you want for triple, quadruple, etc. + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 }; -typedef struct { - bool is_press_action; - int state; -} tap; +//Tap dance enums +enum { + CTL_X = 0, + SOME_OTHER_DANCE +} + +int cur_dance (qk_tap_dance_state_t *state); + +//for the x tap dance. Put it here so it can be used in any keymap +void x_finished (qk_tap_dance_state_t *state, void *user_data); +void x_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +### In `/qmk_firmware/users//.c` +And then in your user's `.c` file you implement the functions above: + +```c +#include "gordon.h" +#include "quantum.h" +#include "action.h" +#include "process_keycode/process_tap_dance.h" + +/* Return an integer that corresponds to what kind of tap dance should be executed. + * + * How to figure out tap dance state: interrupted and pressed. + * + * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit + * under the tapping term. This is typically indicitive that you are trying to "tap" the key. + * + * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term + * has ended, but the key is still being pressed down. This generally means the key is being "held". + * + * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" + * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. + * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. + * + * Good places to put an advanced tap dance: + * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon + * + * Criteria for "good placement" of a tap dance key: + * Not a key that is hit frequently in a sentence + * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or + * in a web form. So 'tab' would be a poor choice for a tap dance. + * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the + * letter 'p', the word 'pepper' would be quite frustating to type. + * + * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested + * + */ 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 || state->pressed==0) return SINGLE_TAP; + if (state->interrupted || !state->pressed) return SINGLE_TAP; + //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. else return SINGLE_HOLD; } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. In example below, that means to send `xx` instead of `Escape`. else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ if (state->interrupted) return DOUBLE_SINGLE_TAP; else if (state->pressed) return DOUBLE_HOLD; else return DOUBLE_TAP; } - else return 6; //magic number. At some point this method will expand to work for more presses + //Assumes no one is trying to type the same letter three times (at least not quickly). + //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add + //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses } -//**************** Definitions needed for quad function to work *********************// - //instanalize an instance of 'tap' for the 'x' tap dance. static tap xtap_state = { .is_press_action = true, @@ -245,6 +327,10 @@ void x_reset (qk_tap_dance_state_t *state, void *user_data) { } xtap_state.state = 0; } + +qk_tap_dance_action_t tap_dance_actions[] = { + [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,x_finished, x_reset) +}; ``` -And then simply add this to your list of tap dance functions: -`[X_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)` + +And then simply use TD(X_CTL) anywhere in your keymap. diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md index 334a46c2d46..1863599f844 100644 --- a/docs/feature_terminal.md +++ b/docs/feature_terminal.md @@ -14,12 +14,14 @@ When enabled, a `> ` prompt will appear, where you'll be able to type, backspace `#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page. +Pressing "up" and "down" will allow you to cycle through the past 5 commands entered. + ## Future Ideas * Keyboard/user-extensible commands * Smaller footprint * Arrow key support -* Command history +* Command history - Done * SD card support * LCD support for buffer display * Keycode -> name string LUT @@ -43,14 +45,39 @@ QMK Firmware Built: 2017-08-29-20:24:44 ``` + +### `print-buffer` + +Outputs the last 5 commands entered + +``` +> print-buffer +0. print-buffer +1. help +2. about +3. keymap 0 +4. help +5. flush-buffer +``` + +### `flush-buffer` + +Clears command buffer +``` +> flush-buffer +Buffer cleared! +``` + + ### `help` + Prints out the available commands: ``` > help commands available: - about help keycode keymap exit + about help keycode keymap exit print-buffer flush-buffer ``` ### `keycode ` diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 454481cb2cc..c8fa406cb00 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -25,19 +25,19 @@ For example, Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`. -Additionally, `config.h` here will be processed like the same file in your keymap folder. This is handled separately from the `.h` file. +Additionally, `config.h` here will be processed like the same file in your keymap folder. This is handled separately from the `.h` file. -The reason for this, is that `.h` won't be added in time to add settings (such as `#define TAPPING_TERM 100`), and including the `` file in any `config.h` files will result in compile issues. +The reason for this, is that `.h` won't be added in time to add settings (such as `#define TAPPING_TERM 100`), and including the `` file in any `config.h` files will result in compile issues. + +So you should use the `config.h` for QMK settings, and the `.h` file for user or keymap specific settings. -So you should use the `config.h` for QMK settings, and the `.h` file for user or keymap specific settings. - ## Readme Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). ## `Config.h` -If you do add a `config,h` file, you want to make sure that it only gets processed once. So you may want to start off with something like this: +If you do add a `config,h` file, you want to make sure that it only gets processed once. So you may want to start off with something like this: ```c #ifndef USERSPACE_CONFIG_H @@ -48,7 +48,7 @@ If you do add a `config,h` file, you want to make sure that it only gets process #endif // !USERSPACE_CONFIG_H ``` -You can use any option hre that you could use in your keymap's `config.h` file. You can find a list of vales [here](config_options.md). +You can use any option hre that you could use in your keymap's `config.h` file. You can find a list of vales [here](config_options.md). ## Example @@ -115,3 +115,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead). + +## Override default userspace + +By default the userspace used will be the same as the keymap name. In some situations this isn't desirable. For instance, if you use the [layout](feature_layouts.md) feature you can't use the same name for different keymaps (e.g. ANSI and ISO). You can name your layouts `mylayout-ansi` and `mylayout-iso` and add the following line to your layout's `rules.mk`: + +``` +USER_NAME := mylayout +``` \ No newline at end of file diff --git a/docs/flashing.md b/docs/flashing.md index 8e1381f6981..e5fe59f8f03 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -20,7 +20,7 @@ Compatible flashers: * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI) * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line) -* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended) +* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended) Flashing sequence: diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index f01ae6d011a..7ce65e210eb 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -2,9 +2,7 @@ Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. -{% hint style='info' %} -This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. -{% endhint %} +?> This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork": diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 39ea34a60f6..a57edcb9846 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -14,7 +14,7 @@ The full syntax of the `make` command is `::`, The `` means the following * If no target is given, then it's the same as `all` below * `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. -* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. +* `dfu`, `teensy`, `avrdude` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`. * `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 77081704504..be693240620 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -66,9 +66,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r #define DESCRIPTION A custom keyboard ``` -{% hint style='info' %} -Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF. -{% endhint %} +?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF. ### Keyboard Matrix Configuration diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000000..6af276c85b3 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,45 @@ + + + + + QMK Firmware + + + + + + + +
+ + + + + + + + + + + + diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md index ea01a1a6266..f227d623f01 100644 --- a/docs/newbs_building_firmware.md +++ b/docs/newbs_building_firmware.md @@ -8,17 +8,15 @@ If you have closed and reopened your terminal window since following the first p Start by navigating to the `keymaps` folder for your keyboard. -{% hint style='info' %} -If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. +?> If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. -macOS: +?> macOS: open keyboards//keymaps -Windows: +?> Windows: start keyboards//keymaps -{% endhint %} ## Create a Copy Of The `default` Keymap @@ -32,9 +30,7 @@ Open up your `keymap.c`. Inside this file you'll find the structure that control This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer. -{% hint style='danger' %} -When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is. -{% endhint %} +!> When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is. ## Customize The Layout To Your Liking @@ -44,9 +40,7 @@ How to complete this step is entirely up to you. Make the one change that's been * [Features](features.md) * [FAQ](faq.md) -{% hint style='info' %} -While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise. -{% endhint %} +?> While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise. ## Build Your Firmware diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 4cd7c5c44a1..0b0ede37c4e 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -12,17 +12,15 @@ However, the QMK Toolbox is only available for Windows and macOS currently. If Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory. -{% hint style='info' %} -If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. +?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. -Windows: +?> Windows: start . -macOS: +?> macOS: open . -{% endhint %} The firmware file always follows this naming format: diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 60b94b01236..162d7066b52 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -14,9 +14,7 @@ Before you can build keymaps you need to install some software and setup your bu 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. -{% hint style='info' %} -Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject. -{% endhint %} +?> 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 @@ -29,12 +27,9 @@ QMK Toolbox is a Windows and macOS program that allows you to both program and d We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest. -{% hint style="info" %} -If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK: - -* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html) -* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) -{% endhint %} +?> If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
+[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
+[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) ### Windows @@ -63,9 +58,7 @@ Once you have setup your Linux/Unix environment you are ready to download QMK. W git clone https://github.com/qmk/qmk_firmware.git cd qmk_firmware -{% hint style='info' %} -If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message. -{% endhint %} +?> If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message. ## Setup QMK diff --git a/docs/qmk.css b/docs/qmk.css new file mode 100644 index 00000000000..543cd7f28d4 --- /dev/null +++ b/docs/qmk.css @@ -0,0 +1,862 @@ +* { + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-text-size-adjust: none; + -webkit-touch-callout: none; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +body:not(.ready) { + overflow: hidden; +} +body:not(.ready) [data-cloak], +body:not(.ready) .app-nav, +body:not(.ready) > nav { + display: none; +} +div#app { + font-size: 30px; + font-weight: lighter; + margin: 40vh auto; + text-align: center; +} +div#app:empty::before { + content: 'Loading...'; +} +.emoji { + height: 1.2rem; + vertical-align: middle; +} +.progress { + background-color: var(--theme-color, #ea6f5a); + height: 2px; + left: 0px; + position: fixed; + right: 0px; + top: 0px; + -webkit-transition: width 0.2s, opacity 0.4s; + transition: width 0.2s, opacity 0.4s; + width: 0%; + z-index: 999999; +} +.search a:hover { + color: var(--theme-color, #ea6f5a); +} +.search .search-keyword { + color: var(--theme-color, #ea6f5a); + font-style: normal; + font-weight: bold; +} +html, +body { + height: 100%; +} +body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + color: #efefef; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 15px; + letter-spacing: 0; + margin: 0; + overflow-x: hidden; +} +img { + max-width: 100%; +} +a[disabled] { + cursor: not-allowed; + opacity: 0.6; +} +kbd { + border: solid 1px #ccc; + border-radius: 3px; + display: inline-block; + font-size: 12px !important; + line-height: 12px; + margin-bottom: 3px; + padding: 3px 5px; + vertical-align: middle; +} +.task-list-item { + list-style-type: none; +} +li input[type='checkbox'] { + margin: 0 0.2em 0.25em -1.6em; + vertical-align: middle; +} +.app-nav { + margin: 25px 60px 0 0; + position: absolute; + right: 0; + text-align: right; + z-index: 10; +/* navbar dropdown */ +} +.app-nav.no-badge { + margin-right: 25px; +} +.app-nav p { + margin: 0; +} +.app-nav > a { + margin: 0 1rem; + padding: 5px 0; +} +.app-nav ul, +.app-nav li { + display: inline-block; + list-style: none; + margin: 0; +} +.app-nav a { + color: inherit; + font-size: 16px; + text-decoration: none; + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +.app-nav a:hover { + color: var(--theme-color, #ea6f5a); +} +.app-nav a.active { + border-bottom: 2px solid var(--theme-color, #ea6f5a); + color: var(--theme-color, #ea6f5a); +} +.app-nav li { + display: inline-block; + margin: 0 1rem; + padding: 5px 0; + position: relative; +} +.app-nav li ul { + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: #ccc; + border-radius: 4px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: none; + max-height: calc(100vh - 61px); + overflow-y: auto; + padding: 10px 0; + position: absolute; + right: -15px; + text-align: left; + top: 100%; + white-space: nowrap; +} +.app-nav li ul li { + display: block; + font-size: 14px; + line-height: 1rem; + margin: 0; + margin: 8px 14px; + white-space: nowrap; +} +.app-nav li ul a { + display: block; + font-size: inherit; + margin: 0; + padding: 0; +} +.app-nav li ul a.active { + border-bottom: 0; +} +.app-nav li:hover ul { + display: block; +} +.github-corner { + border-bottom: 0; + position: fixed; + right: 0; + text-decoration: none; + top: 0; + z-index: 1; +} +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; +} +.github-corner svg { + color: #3f3f3f; + fill: var(--theme-color, #ea6f5a); + height: 80px; + width: 80px; +} +main { + display: block; + position: relative; + width: 100vw; + height: 100%; + z-index: 0; +} +main.hidden { + display: none; +} +.anchor { + display: inline-block; + text-decoration: none; + -webkit-transition: all 0.3s; + transition: all 0.3s; +} +.anchor span { + color: #c8c8c8; +} +.anchor:hover { + text-decoration: underline; +} +.sidebar { + border-right: 1px solid rgba(0,0,0,0.07); + overflow-y: auto; + padding: 40px 0 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + width: 300px; + z-index: 20; +} +.sidebar > h1 { + margin: 0 auto 1rem; + font-size: 1.5rem; + font-weight: 300; + text-align: center; +} +.sidebar > h1 a { + color: inherit; + text-decoration: none; +} +.sidebar > h1 .app-nav { + display: block; + position: static; +} +.sidebar .sidebar-nav { + line-height: 2em; + padding-bottom: 40px; +} +.sidebar li.collapse .app-sub-sidebar { + display: none; +} +.sidebar ul { + margin: 0; + padding: 0; +} +.sidebar li > p { + font-weight: 700; + margin: 0; +} +.sidebar ul, +.sidebar ul li { + list-style: none; +} +.sidebar ul li a { + border-bottom: none; + display: block; +} +.sidebar ul li ul { + padding-left: 20px; +} +.sidebar::-webkit-scrollbar { + width: 4px; +} +.sidebar::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} +.sidebar:hover::-webkit-scrollbar-thumb { + background: rgba(136,136,136,0.4); +} +.sidebar:hover::-webkit-scrollbar-track { + background: rgba(136,136,136,0.1); +} +.sidebar-toggle { + background-color: transparent; + background-color: rgba(63,63,63,0.8); + border: 0; + outline: none; + padding: 10px; + position: absolute; + bottom: 0; + left: 0; + text-align: center; + -webkit-transition: opacity 0.3s; + transition: opacity 0.3s; + width: 284px; + z-index: 30; +} +.sidebar-toggle .sidebar-toggle-button:hover { + opacity: 0.4; +} +.sidebar-toggle span { + background-color: var(--theme-color, #ea6f5a); + display: block; + margin-bottom: 4px; + width: 16px; + height: 2px; +} +body.sticky .sidebar, +body.sticky .sidebar-toggle { + position: fixed; +} +.content { + padding-top: 60px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 300px; + -webkit-transition: left 250ms ease; + transition: left 250ms ease; +} +.markdown-section { + margin: 0 auto; + max-width: 800px; + padding: 30px 15px 40px 15px; + position: relative; +} +.markdown-section > * { + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-size: inherit; +} +.markdown-section > :first-child { + margin-top: 0 !important; +} +.markdown-section hr { + border: none; + border-bottom: 1px solid #eee; + margin: 2em 0; +} +.markdown-section iframe { + border: 1px solid #eee; +} +.markdown-section table { + border-collapse: collapse; + border-spacing: 0; + display: block; + margin-bottom: 1rem; + overflow: auto; + width: 100%; +} +.markdown-section th { + border: 1px solid #ddd; + font-weight: bold; + padding: 6px 13px; +} +.markdown-section td { + border: 1px solid #ddd; + padding: 6px 13px; +} +.markdown-section tr { + border-top: 1px solid #ccc; +} +.markdown-section tr:nth-child(2n) { + background-color: #555555; +} +.markdown-section p.tip { + background-color: #555555; + border-bottom-right-radius: 2px; + border-left: 4px solid #f66; + border-top-right-radius: 2px; + margin: 2em 0; + padding: 12px 24px 12px 30px; + position: relative; +} +.markdown-section p.tip:before { + background-color: #f66; + border-radius: 100%; + color: #3f3f3f; + content: '!'; + font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 14px; + font-weight: bold; + left: -12px; + line-height: 20px; + position: absolute; + height: 20px; + width: 20px; + text-align: center; + top: 14px; +} +.markdown-section p.tip code { + background-color: #efefef; +} +.markdown-section p.tip em { + color: #c8c8c8; +} +.markdown-section p.warn { + background: rgba(234,111,90,0.1); + border-radius: 2px; + padding: 1rem; +} +body.close .sidebar { + -webkit-transform: translateX(-300px); + transform: translateX(-300px); +} +body.close .sidebar-toggle { + width: auto; +} +body.close .content { + left: 0; +} +@media print { + .github-corner, + .sidebar-toggle, + .sidebar, + .app-nav { + display: none; + } +} +@media screen and (max-width: 768px) { + .github-corner, + .sidebar-toggle, + .sidebar { + position: fixed; + } + .app-nav { + margin-top: 16px; + } + .app-nav li ul { + top: 30px; + } + main { + height: auto; + overflow-x: hidden; + } + .sidebar { + left: -300px; + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + } + .content { + left: 0; + max-width: 100vw; + position: static; + padding-top: 20px; + -webkit-transition: -webkit-transform 250ms ease; + transition: -webkit-transform 250ms ease; + transition: transform 250ms ease; + transition: transform 250ms ease, -webkit-transform 250ms ease; + } + .app-nav, + .github-corner { + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + } + .sidebar-toggle { + background-color: transparent; + width: auto; + padding: 30px 30px 10px 10px; + } + body.close .sidebar { + -webkit-transform: translateX(300px); + transform: translateX(300px); + } + body.close .sidebar-toggle { + background-color: rgba(63,63,63,0.8); + -webkit-transition: 1s background-color; + transition: 1s background-color; + width: 284px; + padding: 10px; + } + body.close .content { + -webkit-transform: translateX(300px); + transform: translateX(300px); + } + body.close .app-nav, + body.close .github-corner { + display: none; + } + .github-corner:hover .octo-arm { + -webkit-animation: none; + animation: none; + } + .github-corner .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; + } +} +@-webkit-keyframes octocat-wave { + 0%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + 20%, 60% { + -webkit-transform: rotate(-25deg); + transform: rotate(-25deg); + } + 40%, 80% { + -webkit-transform: rotate(10deg); + transform: rotate(10deg); + } +} +@keyframes octocat-wave { + 0%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + 20%, 60% { + -webkit-transform: rotate(-25deg); + transform: rotate(-25deg); + } + 40%, 80% { + -webkit-transform: rotate(10deg); + transform: rotate(10deg); + } +} +section.cover { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height: 100vh; + display: none; +} +section.cover.show { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} +section.cover.has-mask .mask { + background-color: #3f3f3f; + opacity: 0.8; + position: absolute; + top: 0; + height: 100%; + width: 100%; +} +section.cover .cover-main { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + margin: -20px 16px 0; + text-align: center; + z-index: 1; +} +section.cover a { + color: inherit; + text-decoration: none; +} +section.cover a:hover { + text-decoration: none; +} +section.cover p { + line-height: 1.5rem; + margin: 1em 0; +} +section.cover h1 { + color: inherit; + font-size: 2.5rem; + font-weight: 300; + margin: 0.625rem 0 2.5rem; + position: relative; + text-align: center; +} +section.cover h1 a { + display: block; +} +section.cover h1 small { + bottom: -0.4375rem; + font-size: 1rem; + position: absolute; +} +section.cover blockquote { + font-size: 1.5rem; + text-align: center; +} +section.cover ul { + line-height: 1.8; + list-style-type: none; + margin: 1em auto; + max-width: 500px; + padding: 0; +} +section.cover .cover-main > p:last-child a { + border-color: var(--theme-color, #ea6f5a); + border-radius: 2rem; + border-style: solid; + border-width: 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--theme-color, #ea6f5a); + display: inline-block; + font-size: 1.05rem; + letter-spacing: 0.1rem; + margin: 0.5rem 1rem; + padding: 0.75em 2rem; + text-decoration: none; + -webkit-transition: all 0.15s ease; + transition: all 0.15s ease; +} +section.cover .cover-main > p:last-child a:last-child { + background-color: var(--theme-color, #ea6f5a); + color: #fff; +} +section.cover .cover-main > p:last-child a:last-child:hover { + color: inherit; + opacity: 0.8; +} +section.cover .cover-main > p:last-child a:hover { + color: inherit; +} +section.cover blockquote > p > a { + border-bottom: 2px solid var(--theme-color, #ea6f5a); + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +section.cover blockquote > p > a:hover { + color: var(--theme-color, #ea6f5a); +} +body { + background-color: #3f3f3f; +} +/* sidebar */ +.sidebar { + background-color: #3f3f3f; + color: #c8c8c8; +} +.sidebar li { + margin: 6px 15px; +} +.sidebar ul li a { + color: #c8c8c8; + font-size: 14px; + overflow: hidden; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} +.sidebar ul li a:hover { + text-decoration: underline; +} +.sidebar ul li ul { + padding: 0; +} +.sidebar ul li.active > a { + color: var(--theme-color, #ea6f5a); + font-weight: 600; +} +/* markdown content found on pages */ +.markdown-section h1, +.markdown-section h2, +.markdown-section h3, +.markdown-section h4, +.markdown-section strong { + color: #657b83; + font-weight: 600; +} +.markdown-section a { + color: var(--theme-color, #ea6f5a); + font-weight: 600; +} +.markdown-section h1 { + font-size: 2rem; + margin: 0 0 1rem; +} +.markdown-section h2 { + font-size: 1.75rem; + margin: 45px 0 0.8rem; +} +.markdown-section h3 { + font-size: 1.5rem; + margin: 40px 0 0.6rem; +} +.markdown-section h4 { + font-size: 1.25rem; +} +.markdown-section h5 { + font-size: 1rem; +} +.markdown-section h6 { + color: #777; + font-size: 1rem; +} +.markdown-section figure, +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + margin: 1.2em 0; +} +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + line-height: 1.6rem; + word-spacing: 0.05rem; +} +.markdown-section ul, +.markdown-section ol { + padding-left: 1.5rem; +} +.markdown-section blockquote { + border-left: 4px solid var(--theme-color, #ea6f5a); + color: #858585; + margin: 2em 0; + padding-left: 20px; +} +.markdown-section blockquote p { + font-weight: 600; + margin-left: 0; +} +.markdown-section iframe { + margin: 1em 0; +} +.markdown-section em { + color: #7f8c8d; +} +.markdown-section code { + background-color: #282828; + border-radius: 2px; + color: #aaaaaa; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + margin: 0 2px; + padding: 3px 5px; + white-space: pre-wrap; +} +.markdown-section pre { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #282828; + font-family: 'Roboto Mono', Monaco, courier, monospace; + line-height: 1.5rem; + margin: 1.2em 0; + overflow: auto; + padding: 0 1.4rem; + position: relative; + word-wrap: normal; +} +/* code highlight */ +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #8e908c; +} +.token.namespace { + opacity: 0.7; +} +.token.boolean, +.token.number { + color: #c76b29; +} +.token.punctuation { + color: #525252; +} +.token.property { + color: #c08b30; +} +.token.tag { + color: #2973b7; +} +.token.string { + color: var(--theme-color, #ea6f5a); +} +.token.selector { + color: #6679cc; +} +.token.attr-name { + color: #2973b7; +} +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #22a2c9; +} +.token.attr-value, +.token.control, +.token.directive, +.token.unit { + color: var(--theme-color, #ea6f5a); +} +.token.keyword { + color: #e96900; +} +.token.statement, +.token.regex, +.token.atrule { + color: #22a2c9; +} +.token.placeholder, +.token.variable { + color: #3d8fd1; +} +.token.deleted { + text-decoration: line-through; +} +.token.inserted { + border-bottom: 1px dotted #202746; + text-decoration: none; +} +.token.italic { + font-style: italic; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.important { + color: #c94922; +} +.token.entity { + cursor: help; +} +.markdown-section pre > code { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #282828; + border-radius: 2px; + color: #657b83; + display: block; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + line-height: inherit; + margin: 0 2px; + max-width: inherit; + overflow: inherit; + padding: 2.2em 5px; + white-space: inherit; +} +.markdown-section code::after, +.markdown-section code::before { + letter-spacing: 0.05rem; +} +code .token { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + min-height: 1.5rem; +} +pre::after { + color: #ccc; + content: attr(data-lang); + font-size: 0.6rem; + font-weight: 600; + height: 15px; + line-height: 15px; + padding: 5px 10px 0; + position: absolute; + right: 0; + text-align: right; + top: 0; +} +.markdown-section p.tip { + background-color: #282828; + color: #657b83; +} +input[type='search'] { + background: #4f4f4f; + border-color: #4f4f4f; + color: #c8c8c8; +} diff --git a/docs/sw.js b/docs/sw.js new file mode 100644 index 00000000000..1e4aaeb7621 --- /dev/null +++ b/docs/sw.js @@ -0,0 +1,83 @@ +/* =========================================================== + * docsify sw.js + * =========================================================== + * Copyright 2016 @huxpro + * Licensed under Apache 2.0 + * Register service worker. + * ========================================================== */ + +const RUNTIME = 'docsify' +const HOSTNAME_WHITELIST = [ + self.location.hostname, + 'fonts.gstatic.com', + 'fonts.googleapis.com', + 'unpkg.com' +] + +// The Util Function to hack URLs of intercepted requests +const getFixedUrl = (req) => { + var now = Date.now() + var url = new URL(req.url) + + // 1. fixed http URL + // Just keep syncing with location.protocol + // fetch(httpURL) belongs to active mixed content. + // And fetch(httpRequest) is not supported yet. + url.protocol = self.location.protocol + + // 2. add query for caching-busting. + // Github Pages served with Cache-Control: max-age=600 + // max-age on mutable content is error-prone, with SW life of bugs can even extend. + // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. + // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 + if (url.hostname === self.location.hostname) { + url.search += (url.search ? '&' : '?') + 'cache-bust=' + now + } + return url.href +} + +/** + * @Lifecycle Activate + * New one activated when old isnt being used. + * + * waitUntil(): activating ====> activated + */ +self.addEventListener('activate', event => { + event.waitUntil(self.clients.claim()) +}) + +/** + * @Functional Fetch + * All network requests are being intercepted here. + * + * void respondWith(Promise r) + */ +self.addEventListener('fetch', event => { + // Skip some of cross-origin requests, like those for Google Analytics. + if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { + // Stale-while-revalidate + // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale + // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 + const cached = caches.match(event.request) + const fixedUrl = getFixedUrl(event.request) + const fetched = fetch(fixedUrl, { cache: 'no-store' }) + const fetchedCopy = fetched.then(resp => resp.clone()) + + // Call respondWith() with whatever we get first. + // If the fetch fails (e.g disconnected), wait for the cache. + // If there’s nothing in cache, wait for the fetch. + // If neither yields a response, return offline pages. + event.respondWith( + Promise.race([fetched.catch(_ => cached), cached]) + .then(resp => resp || fetched) + .catch(_ => { /* eat any errors */ }) + ) + + // Update the cache with the version we fetched (only for ok status) + event.waitUntil( + Promise.all([fetchedCopy, caches.open(RUNTIME)]) + .then(([response, cache]) => response.ok && cache.put(event.request, response)) + .catch(_ => { /* eat any errors */ }) + ) + } +}) diff --git a/drivers/avr/TWIlib.c b/drivers/avr/TWIlib.c new file mode 100644 index 00000000000..b39e3054a5c --- /dev/null +++ b/drivers/avr/TWIlib.c @@ -0,0 +1,232 @@ +/* + * 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 new file mode 100644 index 00000000000..23fd1f09aa9 --- /dev/null +++ b/drivers/avr/TWIlib.h @@ -0,0 +1,82 @@ +/* + * 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 "is31fl3731.h" +#include +#include +#include +#include +#include "TWIlib.h" +#include "progmem.h" + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define ISSI_ADDR_DEFAULT 0x74 + +#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG_PICTUREMODE 0x00 +#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 +#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 + +#define ISSI_CONF_PICTUREMODE 0x00 +#define ISSI_CONF_AUTOFRAMEMODE 0x04 +#define ISSI_CONF_AUDIOMODE 0x08 + +#define ISSI_REG_PICTUREFRAME 0x01 + +#define ISSI_REG_SHUTDOWN 0x0A +#define ISSI_REG_AUDIOSYNC 0x06 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[TXMAXBUFLEN]; + +// These buffers match the IS31FL3731 PWM registers 0x24-0xB3. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required = false; + +uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; +bool g_led_control_registers_update_required = false; + +// This is the bit pattern in the LED control registers +// (for matrix A, add one to register for matrix B) +// +// reg - b7 b6 b5 b4 b3 b2 b1 b0 +// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01 +// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00 +// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00 +// 0x06 - - , - , - , - , - ,B02,B01,B00 +// 0x08 - - , - , - , - , - , - , - , - +// 0x0A - B17,B16,B15, - , - , - , - , - +// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09 +// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 +// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 + + +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; + + // 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 ); + //} +} + +void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) +{ + // assumes bank is already selected + + // 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; + // 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]; + } + + // 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 ); + } + } +} + +void IS31FL3731_init( uint8_t addr ) +{ + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, first enable software shutdown, + // then set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // select "function register" bank + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + + // enable software shutdown + IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x00 ); + // this delay was copied from other drivers, might not be needed + _delay_ms( 10 ); + + // picture mode + IS31FL3731_write_register( addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE ); + // display frame 0 + IS31FL3731_write_register( addr, ISSI_REG_PICTUREFRAME, 0x00 ); + // audio sync off + IS31FL3731_write_register( addr, ISSI_REG_AUDIOSYNC, 0x00 ); + + // select bank 0 + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); + + // turn off all LEDs in the LED control register + for ( int i = 0x00; i <= 0x11; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // turn off all LEDs in the blink control register (not really needed) + for ( int i = 0x12; i <= 0x23; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // set PWM on all LEDs to 0 + for ( int i = 0x24; i <= 0xB3; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // select "function register" bank + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + + // disable software shutdown + IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x01 ); + + // select bank 0 and leave it selected. + // most usage after initialization is just writing PWM buffers in bank 0 + // as there's not much point in double-buffering + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); +} + +void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) +{ + if ( index >= 0 && index < DRIVER_LED_TOTAL ) { + is31_led led = g_is31_leds[index]; + + // Subtract 0x24 to get the second index of g_pwm_buffer + g_pwm_buffer[led.driver][led.r - 0x24] = red; + g_pwm_buffer[led.driver][led.g - 0x24] = green; + g_pwm_buffer[led.driver][led.b - 0x24] = blue; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) +{ + for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) + { + IS31FL3731_set_color( i, red, green, blue ); + } +} + +void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) +{ + is31_led led = g_is31_leds[index]; + + uint8_t control_register_r = (led.r - 0x24) / 8; + uint8_t control_register_g = (led.g - 0x24) / 8; + uint8_t control_register_b = (led.b - 0x24) / 8; + uint8_t bit_r = (led.r - 0x24) % 8; + uint8_t bit_g = (led.g - 0x24) % 8; + uint8_t bit_b = (led.b - 0x24) % 8; + + if ( red ) { + g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); + } else { + g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); + } + if ( green ) { + g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); + } else { + g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); + } + if ( blue ) { + g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); + } else { + g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); + } + + g_led_control_registers_update_required = true; + + +} + +void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_pwm_buffer_update_required ) + { + IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] ); + IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + } + g_pwm_buffer_update_required = false; +} + +void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_led_control_registers_update_required ) + { + for ( int i=0; i<18; i++ ) + { + IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] ); + IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] ); + } + } +} + diff --git a/drivers/avr/is31fl3731.h b/drivers/avr/is31fl3731.h new file mode 100644 index 00000000000..3d30fc67b75 --- /dev/null +++ b/drivers/avr/is31fl3731.h @@ -0,0 +1,214 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 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 IS31FL3731_DRIVER_H +#define IS31FL3731_DRIVER_H + +#include +#include + +typedef struct is31_led { + uint8_t driver:2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3731_init( uint8_t addr ); +void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ); +void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); + +void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 + + + +#endif // IS31FL3731_DRIVER_H diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h index a3d820f805f..969fd5b4a96 100644 --- a/keyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1up60rgb/1up60rgb.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define 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, K213, K214, \ @@ -17,4 +17,50 @@ { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \ } -#endif \ No newline at end of file + +/* ANSI variant. No extra keys for ISO */ +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + 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, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ + 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, KC_NO,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +/* ISO variant. Remove useless ANSI keys */ +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +/* HHKB Variant */ +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) 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,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +#endif diff --git a/keyboards/1up60rgb/config.h b/keyboards/1up60rgb/config.h index 2668ab21b89..bfdf354af7d 100644 --- a/keyboards/1up60rgb/config.h +++ b/keyboards/1up60rgb/config.h @@ -49,7 +49,7 @@ #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 20 +#define RGBLED_NUM 16 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/1up60rgb/info.json b/keyboards/1up60rgb/info.json index d92164444d5..d662dc60d48 100644 --- a/keyboards/1up60rgb/info.json +++ b/keyboards/1up60rgb/info.json @@ -5,8 +5,20 @@ "width": 15, "height": 5, "layouts": { - "KEYMAP": { - "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":"~", "x":13, "y":0}, {"label":"Del", "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}, {"label":"Fn", "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_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}, {"label":"~", "x":13, "y":0}, {"label":"Del", "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}, {"label":"Fn", "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": [{"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":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + }, + + "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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_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}] + } } } diff --git a/keyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1up60rgb/keymaps/default/keymap.c index 3f0f49b7245..cb372e15d73 100644 --- a/keyboards/1up60rgb/keymaps/default/keymap.c +++ b/keyboards/1up60rgb/keymaps/default/keymap.c @@ -2,14 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + 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_BSPC, 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_ENT, KC_LSFT, 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_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), - KEYMAP( + 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, diff --git a/keyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1up60rgb/keymaps/iso/keymap.c index 140ff63294c..42fcb6cf9bb 100644 --- a/keyboards/1up60rgb/keymaps/iso/keymap.c +++ b/keyboards/1up60rgb/keymaps/iso/keymap.c @@ -2,14 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + 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_BSPC, 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_ENT, 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_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), - KEYMAP( + 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, diff --git a/keyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1up60rgb/keymaps/tsangan/keymap.c index 6b47a1a35f2..485010eef10 100644 --- a/keyboards/1up60rgb/keymaps/tsangan/keymap.c +++ b/keyboards/1up60rgb/keymaps/tsangan/keymap.c @@ -2,14 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + 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_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, KC_ENT, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL), - KEYMAP( + LAYOUT_all( RESET, 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, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, diff --git a/keyboards/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk index c303af4bccd..7363b3c3dfc 100644 --- a/keyboards/1up60rgb/rules.mk +++ b/keyboards/1up60rgb/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 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/alf_x2/alf_x2.c b/keyboards/alf_x2/alf_x2.c new file mode 100644 index 00000000000..cc22d872a5d --- /dev/null +++ b/keyboards/alf_x2/alf_x2.c @@ -0,0 +1 @@ +#include "alf_x2.h" diff --git a/keyboards/alf_x2/alf_x2.h b/keyboards/alf_x2/alf_x2.h new file mode 100644 index 00000000000..ca40451d8b9 --- /dev/null +++ b/keyboards/alf_x2/alf_x2.h @@ -0,0 +1,98 @@ +#ifndef ALF_X2_H +#define ALF_X2_H + +#include "quantum.h" + +// K404 and K408 are the microswitches at the top of the PCB + +#define LAYOUT( \ + K404, K408, \ + 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, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#define LAYOUT_std_ansi( \ + K404, K408, \ + 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, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_std_splits( \ + K404, K408, \ + 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, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_hhkb( \ + K404, K408, \ + 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, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K403, K406, K410, K411 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_2u_split_arrows( \ + K404, K408, \ + 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, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#define LAYOUT_split_arrows( \ + K404, K408, \ + 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, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_N), K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/alf_x2/config.h b/keyboards/alf_x2/config.h new file mode 100644 index 00000000000..31212ce3368 --- /dev/null +++ b/keyboards/alf_x2/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 ALF +#define PRODUCT X2 +#define DESCRIPTION ALF X2 60 + +/* 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, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#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 4 +#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/alf_x2/info.json b/keyboards/alf_x2/info.json new file mode 100644 index 00000000000..85db6d69aed --- /dev/null +++ b/keyboards/alf_x2/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "ALF X2", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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}, {"x":13, "y":1}, {"x":14, "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":"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}, {"x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "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}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + }, + + "LAYOUT_std_ansi": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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":"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":"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":"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":2.75}, {"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.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] + }, + + "LAYOUT_std_splits": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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}, {"x":13, "y":1}, {"x":14, "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":"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":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"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}, {"x":14, "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.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] + }, + + "LAYOUT_hhkb": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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}, {"x":13, "y":1}, {"x":14, "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":"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":"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}, {"x":14, "y":4}, {"label":"Win", "x":1.5, "y":5, "w":1.25}, {"label":"Alt", "x":2.75, "y":5, "w":1.5}, {"x":4.25, "y":5, "w":6.25}, {"label":"Alt", "x":10.5, "y":5, "w":1.5}, {"label":"Win", "x":12, "y":5, "w":1.25}] + }, + + "LAYOUT_split_arrows": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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}, {"x":13, "y":1}, {"x":14, "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":"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":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"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, "w":1.75}, {"x":13, "y":4}, {"x":14, "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}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + }, + + "LAYOUT_2u_split_arrows": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "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}, {"x":13, "y":1}, {"x":14, "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":"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":"Shift", "x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "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}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/alf_x2/keymaps/default/keymap.c b/keyboards/alf_x2/keymaps/default/keymap.c new file mode 100644 index 00000000000..9470e38b562 --- /dev/null +++ b/keyboards/alf_x2/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_VOLU, KC_VOLD, + 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_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_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + + LAYOUT( + KC_MNXT, KC_MPRV, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +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)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } +} diff --git a/keyboards/alf_x2/keymaps/hhkb_60/keymap.c b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c new file mode 100644 index 00000000000..8baba1ae9d6 --- /dev/null +++ b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_VOLU, KC_VOLD, + 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_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, KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL), + + LAYOUT( + KC_MNXT, KC_MPRV, + KC_NO, 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, RESET, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +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)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } +} \ No newline at end of file diff --git a/keyboards/alf_x2/readme.md b/keyboards/alf_x2/readme.md new file mode 100644 index 00000000000..ece339fa96f --- /dev/null +++ b/keyboards/alf_x2/readme.md @@ -0,0 +1,15 @@ +# ALF X2 + +![alf_x2](https://cdn.shopify.com/s/files/1/1674/0405/products/1_088c2862-1f68-4fdd-a346-965208c3a3de_1024x1024.png?v=1511296076) + +A customizable 60% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: ALF X2 60% +Hardware Availability: [zFrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60) + +Make example for this keyboard (after setting up your build environment): + + make alf_x2: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/alf_x2/rules.mk b/keyboards/alf_x2/rules.mk new file mode 100644 index 00000000000..9c4082da29f --- /dev/null +++ b/keyboards/alf_x2/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 = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/alpha/alpha.c b/keyboards/alpha/alpha.c new file mode 100755 index 00000000000..3029ba50a83 --- /dev/null +++ b/keyboards/alpha/alpha.c @@ -0,0 +1 @@ +#include "alpha.h" diff --git a/keyboards/alpha/alpha.h b/keyboards/alpha/alpha.h new file mode 100755 index 00000000000..025a3ac5fbb --- /dev/null +++ b/keyboards/alpha/alpha.h @@ -0,0 +1,16 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \ + K200, K201, K202, K203, K205, K207, K208, K209 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \ + { K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \ +} + +#endif diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h new file mode 100755 index 00000000000..02952756358 --- /dev/null +++ b/keyboards/alpha/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 PyroL +#define PRODUCT alpha +#define DESCRIPTION 28-key keyboard by PyroL + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, B4, B5 } +#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#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 F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/alpha/info.json b/keyboards/alpha/info.json new file mode 100644 index 00000000000..b08e6d9a419 --- /dev/null +++ b/keyboards/alpha/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Alpha", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 10, + "height": 3, + "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":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "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":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2, "w":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}] + } + } +} diff --git a/keyboards/alpha/keymaps/default/keymap.c b/keyboards/alpha/keymaps/default/keymap.c new file mode 100755 index 00000000000..03c47452d3f --- /dev/null +++ b/keyboards/alpha/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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, TO(1), + KC_Z, KC_X, KC_C, KC_V, MT(MOD_LSFT, KC_SPC), KC_B, KC_N, KC_M), + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_BSPC, KC_ESC, KC_TAB, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(2), + KC_LCTL, KC_LGUI, KC_LALT, TO(0), MT(MOD_LSFT, KC_ENT), KC_COMM, KC_DOT, KC_SLSH), + + LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_LSFT, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, TO(3), + RGB_VAI, RGB_VAD, RGB_HUI, TO(0), RGB_MOD, KC_MPLY, KC_VOLD, KC_VOLU), + + LAYOUT( + RESET, 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, M(0), KC_NO, KC_NO, KC_NO), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case 0: + SEND_STRING("I'm so sorry... -PyroL"); + return false; + } + } + return true; +}; + +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)) { + + } 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 { + + } + +} diff --git a/keyboards/alpha/readme.md b/keyboards/alpha/readme.md new file mode 100644 index 00000000000..3a733d36581 --- /dev/null +++ b/keyboards/alpha/readme.md @@ -0,0 +1,17 @@ +# Alpha + +![Alpha](https://i.imgur.com/J6EJ30N.jpg) + +A 28-key, semi-ortho keyboard designed by PyroL! + +Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL) + +Hardware Supported: Alpha PCB, Pro Micro + +Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website. + +Make example for Alpha (after setting up your build environment): + + make alpha:default + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. \ No newline at end of file diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk new file mode 100755 index 00000000000..61ea958d7e4 --- /dev/null +++ b/keyboards/alpha/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* +BOOTLOADER = caterina + + +# 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/alps64/alps64.h b/keyboards/alps64/alps64.h index 83af132dfc6..a7ac93421cb 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* Alps64 keymap definition macro */ -#define KEYMAP( \ +#define LAYOUT_all( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, 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, \ @@ -38,7 +38,75 @@ along with this program. If not, see . { K70, K71, K72, K73, K74, K75, K76, K77 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_iso( \ + 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, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, 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, K41, 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 } \ +} + +#define LAYOUT_standard_60( \ + 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 } \ +} + +#define LAYOUT_infinity( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, 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, K22, \ + 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, K22, K23, K24, K25, K26, 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 } \ +} + +#define LAYOUT_aek_103( \ + 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, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, 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 } \ +} + +#define LAYOUT_kc( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, 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 new file mode 100644 index 00000000000..41735cf7ea8 --- /dev/null +++ b/keyboards/alps64/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "alps64", + "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_standard_60": { + "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}] + }, + + "LAYOUT_infinity": { + "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_aek_103": { + "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.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 49ef9b2bf3a..12f78952dfe 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -2,7 +2,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ - KC_KEYMAP( \ + 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, \ diff --git a/keyboards/amj40/info.json b/keyboards/amj40/info.json new file mode 100644 index 00000000000..ddbd34a7c4f --- /dev/null +++ b/keyboards/amj40/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "AMJ40", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 12, + "height": 4, + "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":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2, "w":1.25}, {"x":11, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"x":8.5, "y":3, "w":1.25}, {"x":9.75, "y":3}, {"x":10.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c new file mode 100755 index 00000000000..62f4376f586 --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,43 @@ +#include "amj40.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [0] = KEYMAP( \ + 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),\ + KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3), KC_RCTL \ + ), + + // Number Layer + [1] = KEYMAP( \ + 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), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Shifted Layer + [2] = KEYMAP( \ + 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, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Fkey Layer + [3] = KEYMAP( \ + 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, \ + KC_TRNS, TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Gaming Layer + [4] = KEYMAP( \ + 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,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), +}; diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/readme.md b/keyboards/amj40/keymaps/jetpacktuxedo/readme.md new file mode 100755 index 00000000000..64ae16c7eb8 --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/readme.md @@ -0,0 +1,55 @@ +Jetpacktuxedo's AMJ40 layout +===================== + +This is based heavily on my minivan layout, with most difference stemming from the different widths between the minivan and the AMJ40. ![Image of my specific layout](https://i.imgur.com/B9XraJY.jpg) + +## Base Layer (0) + +The base layer is pretty simple, straight qwerty layout where available. Both spacebars go to layer 1 when held. `tab` is `tab` when pressed and `fn2` when held, `enter` is the same. `GESC` is `esc` when used alone, but `~` when shifted. `/` is `/` when tapped but `rshift` when held. +``` +|GESC| Q | W | E | R | T | Y | U | I | O | P |BSPC| +| TAB | A | S | D | F | G | H | J | K | L | ENTER | +|LSHIFT | Z | X | C | V | B | N | M | , | . | / | +|LCTRL|LWIN|LALT | SPACE | SPACE |RALT |FN 3|RCTRL | +``` + +## Number Layer (1) + +Numbers are set up just like on my minivan layout, but symbols are a bit different because the AMJ40 is one key narrower than the minivan and also lacks dedicated arrows. Decided to go with `hjkl` arrows, which takes some getting used to. `;` is on a layer now because of the narrowness I mentioned before, and it (along with `-`, `=`, and `'`) moves to the right hand to leave room for the `hjkl` arrows. `delete` on `backspace`, `[` and `]` on `<` and `>`, and `\` on `/` are all stolen straight from my minivan layout. +``` +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |DEL | +| | - | = | ; | ' | | ← | ↓ | ↑ | → | | +| | | | | | | | | [ | ] | \ | +| | | | | | | | | +``` + +## Shifted Layer (2) + +I don't want to be using two key combos constantly, so I also added this symbol layer that is basically shift+numeric layer. Also has nav keys on top of where arrows sit on the previous layer +``` +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |DEL | +| | _ | + | : | " | |HOME|PGDN|PGUP|END | | +| | | | | | | | | { | } | | | +| | | | | | | | | +``` + +## Fkey Layer (3) + +Honestly, I use this more for jumping to my gaming layer and for reset than I use it for Fkeys. Lol. Hitting the left windows key while in this layer locks the gaming layer listed below +``` +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |RSET| +| |F11 |F12 | | | | | | | | | +| | | | | | | | | | | | +| |FN 4| | | | | | | +``` + +## "Gaming" Layer (4) + +Based on the "gaming" layer on my minivan that I mostly just use for mouse keys. To toggle this back off you hit the right windows key (to go to layer 3) and then the left windows key again. +``` +|ESC | | | | | |MWUP|MLCK|M UP|MRCK| | | +| TAB | | | | | |MWDN|M L |M DN|M R | | +| | | | | | | | | | | | +| | | | SPACE | | | | | +``` + diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk new file mode 100644 index 00000000000..d7f3e76054e --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk @@ -0,0 +1,27 @@ +# 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 = 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. + +# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amjpad/info.json b/keyboards/amjpad/info.json new file mode 100644 index 00000000000..3873d548f07 --- /dev/null +++ b/keyboards/amjpad/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "AMJ Pad", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT": { + "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}] + } + } +} diff --git a/keyboards/atom47/rev2/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c similarity index 94% rename from keyboards/atom47/rev2/keymaps/LEdiodes/keymap.c rename to keyboards/atom47/keymaps/LEdiodes/keymap.c index 75c8654ba64..b987c433fef 100644 --- a/keyboards/atom47/rev2/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -1,4 +1,4 @@ -#include "atom47.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] = KEYMAP_ANSI( +[_L0] = LAYOUT_ansi( 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] = KEYMAP_ANSI( +[_L2] = LAYOUT_ansi( _______, 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] = KEYMAP_ANSI( +[_L1] = LAYOUT_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_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] = KEYMAP_ANSI( +[_L3] = LAYOUT_ansi( _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/atom47/rev2/keymaps/LEdiodes/rules.mk b/keyboards/atom47/keymaps/LEdiodes/rules.mk similarity index 100% rename from keyboards/atom47/rev2/keymaps/LEdiodes/rules.mk rename to keyboards/atom47/keymaps/LEdiodes/rules.mk diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c index 233ff2b8b7f..945e66ab7b8 100644 --- a/keyboards/atom47/keymaps/default/keymap.c +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "atom47.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. @@ -13,25 +13,25 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = KEYMAP_ANSI( +[_MA] = LAYOUT_ansi( 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] = KEYMAP_ANSI( +[_FN] = LAYOUT_ansi( _______, 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] = KEYMAP_ANSI( +[_FN1] = LAYOUT_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_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] = KEYMAP_ANSI( +[_PN] = LAYOUT_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ 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 7de75e10ec4..abe63a41e8a 100644 --- a/keyboards/atom47/keymaps/maartenwut/keymap.c +++ b/keyboards/atom47/keymaps/maartenwut/keymap.c @@ -1,4 +1,4 @@ -#include "atom47.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. @@ -11,36 +11,60 @@ #define _______ KC_TRNS +enum custom_keycodes { + CTRLZ = SAFE_RANGE, + CTRLX, + CTRLC, + CTRLV +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = KEYMAP_ANSI( - 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, \ +[_MA] = LAYOUT_ansi( + 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), \ -[_RA] = KEYMAP_ANSI( +[_LO] = LAYOUT_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_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( _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, \ KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_LO] = KEYMAP_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_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_LBRC, KC_RBRC, KC_BSLS, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), \ - }; void led_set_user(uint8_t usb_led) { if (usb_led & (1<event.pressed) { + switch(keycode) { + case CTRLZ: + SEND_STRING(SS_LCTRL("z")); + return false; + case CTRLX: + SEND_STRING(SS_LCTRL("x")); + return false; + case CTRLC: + SEND_STRING(SS_LCTRL("c")); + return false; + case CTRLV: + SEND_STRING(SS_LCTRL("v")); + return false; + } + } + return true; +}; diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md index f2ec08500e1..1e96d42e9d2 100644 --- a/keyboards/atom47/readme.md +++ b/keyboards/atom47/readme.md @@ -3,7 +3,7 @@ ![Atom47](https://i.imgur.com/Wwflqvt.png) ## Support -Keyboard Maintainer: [Maarten Dekkers(https://github.com/maartenwut) +Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) Hardware Supported: Atom47 rev3 Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) diff --git a/keyboards/atom47/config.h b/keyboards/atom47/rev1/config.h similarity index 94% rename from keyboards/atom47/config.h rename to keyboards/atom47/rev1/config.h index 5743a9eb53c..d21d8ce34d9 100644 --- a/keyboards/atom47/config.h +++ b/keyboards/atom47/rev1/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 CONFIG_H -#define CONFIG_H +#ifndef REV1_CONFIG_H +#define REV1_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 +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.1 /* key matrix size */ #define MATRIX_ROWS 4 diff --git a/keyboards/atom47/rev1/info.json b/keyboards/atom47/rev1/info.json new file mode 100644 index 00000000000..219e0f27189 --- /dev/null +++ b/keyboards/atom47/rev1/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Atom47", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_ansi": { + "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/atom47.c b/keyboards/atom47/rev1/rev1.c similarity index 95% rename from keyboards/atom47/atom47.c rename to keyboards/atom47/rev1/rev1.c index fac22f77868..816b43b9ab9 100644 --- a/keyboards/atom47/atom47.c +++ b/keyboards/atom47/rev1/rev1.c @@ -1,4 +1,4 @@ -#include "atom47.h" +#include "rev1.h" #include "led.h" void matrix_init_kb(void) { diff --git a/keyboards/atom47/atom47.h b/keyboards/atom47/rev1/rev1.h similarity index 84% rename from keyboards/atom47/atom47.h rename to keyboards/atom47/rev1/rev1.h index eddc5c8f87a..f8329a7842a 100644 --- a/keyboards/atom47/atom47.h +++ b/keyboards/atom47/rev1/rev1.h @@ -1,12 +1,12 @@ -#ifndef ATOM47_H -#define ATOM47_H +#ifndef ATOM47_REV1_H +#define ATOM47_REV1_H #include "quantum.h" // readability #define XXX KC_NO -#define KEYMAP_ANSI( \ +#define LAYOUT_ansi( \ 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, \ @@ -19,7 +19,5 @@ {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ } -void matrix_init_user(void); -void matrix_scan_user(void); #endif diff --git a/keyboards/atom47/rev1/rules.mk b/keyboards/atom47/rev1/rules.mk new file mode 100644 index 00000000000..13e553b5628 --- /dev/null +++ b/keyboards/atom47/rev1/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/atom47/rev2/atom47.c b/keyboards/atom47/rev2/atom47.c deleted file mode 100644 index 7b839e79675..00000000000 --- a/keyboards/atom47/rev2/atom47.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "atom47.h" -#include "led.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - // * Set our LED pins as output - DDRB &= ~(1<<5); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#ifndef REV2_CONFIG_H +#define REV2_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 +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.2 /* key matrix size */ #define MATRIX_ROWS 4 diff --git a/keyboards/atom47/rev2/info.json b/keyboards/atom47/rev2/info.json new file mode 100644 index 00000000000..219e0f27189 --- /dev/null +++ b/keyboards/atom47/rev2/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Atom47", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_ansi": { + "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/keymaps/default/keymap.c b/keyboards/atom47/rev2/keymaps/default/keymap.c deleted file mode 100644 index 1473863c4e0..00000000000 --- a/keyboards/atom47/rev2/keymaps/default/keymap.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "atom47.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 _MA 0 //Main layer -#define _FN 1 //Fn -#define _FN1 2 //Fn1 -#define _PN 3 //Pn - -#define _______ KC_TRNS - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = KEYMAP_ANSI( - 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] = KEYMAP_ANSI( - _______, 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] = KEYMAP_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_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] = KEYMAP_ANSI( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), -}; diff --git a/keyboards/atom47/rev2/keymaps/default/readme.md b/keyboards/atom47/rev2/keymaps/default/readme.md deleted file mode 100644 index ab86b4f128c..00000000000 --- a/keyboards/atom47/rev2/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -This is the default keymap as found on the Vortex Core, with some added buttons for backlight control. diff --git a/keyboards/atom47/rev2/readme.md b/keyboards/atom47/rev2/readme.md index 18ee85d54f3..30f44df1dc6 100644 --- a/keyboards/atom47/rev2/readme.md +++ b/keyboards/atom47/rev2/readme.md @@ -3,7 +3,7 @@ This is the keymap for rev2 of the Atom47. Only 9 of those have been sold for testing purposes. It had a slightly misaligned usb port and the pcb was too thick (should've been 1.2mm instead of 1.6mm). The pcb only supports the default hardware layout, although /u/ChrisSwires has [modified his](https://www.reddit.com/r/MechanicalKeyboards/comments/7n2dua/not_your_average_core_with_honeywell/) and put a big spacebar in it. ## Support -Keyboard Maintainer: [Matthew Kerfoot(https://github.com/mkerfoot) +Keyboard Maintainer: [Matthew Kerfoot](https://github.com/mkerfoot) Hardware Supported: Atom47 rev2 Hardware Availability: None diff --git a/keyboards/atom47/rev2/keymaps/LEdiodes/atom47.c b/keyboards/atom47/rev2/rev2.c similarity index 96% rename from keyboards/atom47/rev2/keymaps/LEdiodes/atom47.c rename to keyboards/atom47/rev2/rev2.c index 7b839e79675..31a8561f0c5 100644 --- a/keyboards/atom47/rev2/keymaps/LEdiodes/atom47.c +++ b/keyboards/atom47/rev2/rev2.c @@ -1,4 +1,4 @@ -#include "atom47.h" +#include "rev2.h" #include "led.h" void matrix_init_kb(void) { diff --git a/keyboards/atom47/rev2/keymaps/LEdiodes/atom47.h b/keyboards/atom47/rev2/rev2.h similarity index 96% rename from keyboards/atom47/rev2/keymaps/LEdiodes/atom47.h rename to keyboards/atom47/rev2/rev2.h index 2c19a20cc5d..f0134511da6 100644 --- a/keyboards/atom47/rev2/keymaps/LEdiodes/atom47.h +++ b/keyboards/atom47/rev2/rev2.h @@ -6,7 +6,7 @@ // readability #define XXX KC_NO -#define KEYMAP_ANSI( \ +#define LAYOUT_ansi( \ 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/rev2/rules.mk b/keyboards/atom47/rev2/rules.mk index d446d3a6995..a3a258ed820 100644 --- a/keyboards/atom47/rev2/rules.mk +++ b/keyboards/atom47/rev2/rules.mk @@ -1,65 +1,3 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk index 9b3263afd69..bebdb98d625 100644 --- a/keyboards/atom47/rules.mk +++ b/keyboards/atom47/rules.mk @@ -45,8 +45,8 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 +BOOTLOADER= qmk-dfu # Build Options # comment out to disable the options. @@ -56,10 +56,11 @@ 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 = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +DEFAULT_FOLDER = atom47/rev2 + diff --git a/keyboards/atomic/atomic.h b/keyboards/atomic/atomic.h index b7ceb68d07b..a22029f7695 100644 --- a/keyboards/atomic/atomic.h +++ b/keyboards/atomic/atomic.h @@ -10,7 +10,7 @@ // 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_SEMI_STANDARD( \ +#define LAYOUT_semi_standard( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ @@ -24,7 +24,7 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ } -#define KEYMAP_GRID( \ +#define LAYOUT_grid( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ @@ -38,6 +38,6 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ } -#define LAYOUT_ortho_5x15 KEYMAP_GRID +#define LAYOUT_ortho_5x15 LAYOUT_grid #endif \ No newline at end of file diff --git a/keyboards/atomic/info.json b/keyboards/atomic/info.json new file mode 100644 index 00000000000..b07a070253a --- /dev/null +++ b/keyboards/atomic/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Atomic", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_semi_standard": { + "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":13, "y":0, "w":2}, {"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":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "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":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2, "w":2}, {"x":14, "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, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3, "w":2}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + } + } +} diff --git a/keyboards/atomic/keymaps/abienz.c b/keyboards/atomic/keymaps/abienz.c index 589a64dc4e2..2e69165f24a 100644 --- a/keyboards/atomic/keymaps/abienz.c +++ b/keyboards/atomic/keymaps/abienz.c @@ -1,36 +1,33 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* 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, KC_EQL, KC_BSPC, KC_NO }, - { KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP }, - { KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - [1] = { /* function */ - { 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_BSPC, KC_NO }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY }, - { KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT }, - } + [0] = LAYOUT_grid( /* 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, KC_EQL, KC_BSPC, KC_NO , + KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP, + KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, + ), + [1] = LAYOUT_grid( /* function */ + 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_BSPC, KC_NO , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY, + KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, + ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), - [2] = ACTION_LAYER_MOMENTARY(1), - + [1] = ACTION_LAYER_MOMENTARY(1), + [2] = ACTION_LAYER_MOMENTARY(1), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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: - return MACRODOWN(TYPE(KC_T), END); + switch (id) { + case 0: + return MACRODOWN(TYPE(KC_T), END); break; - } - return MACRO_NONE; + } + return MACRO_NONE; }; - diff --git a/keyboards/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c index 0ede363a1f3..ae1efb2b663 100644 --- a/keyboards/atomic/keymaps/default/keymap.c +++ b/keyboards/atomic/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear #define _______ KC_TRNS @@ -21,7 +21,7 @@ * | KEY . XXXXXX | * '-----------------' */ - + /* ROW 2 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -30,7 +30,7 @@ * | KEY . XXXXXX | | KEY . XXXXXX | * '-----------------' '-----------------' */ - + /* ROW 3 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -42,7 +42,7 @@ * | X | * '-----------------' */ - + /* ROW 4 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -78,157 +78,156 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_QW] = { /* 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_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_ESC, 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_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_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_CM] = { /* 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_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_ENT, KC_PGUP }, - { 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_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* DVORAK - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ + /* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ - [_DV] = { /* DVORAK */ - { 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_BSPC }, - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { 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_ENT, KC_ENT, KC_PGUP }, - { 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_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* LOWERED - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_LW] = { /* LOWERED */ - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, - { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* RAISED - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_RS] = { /* RAISED */ - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, - { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | QWERTY | COLEMK | DVORAK | | | | | | | XXXXXX . | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_FN] = { /* FUNCTION */ - { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, + [_QW] = LAYOUT_grid( /* 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_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_ESC, 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_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_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* COLEMAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_CM] = LAYOUT_grid( /* 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_EQL, KC_BSPC, 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_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_ENT, KC_PGUP, + 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_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* DVORAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_DV] = LAYOUT_grid( /* DVORAK */ + 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_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + 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_ENT, KC_ENT, KC_PGUP, + 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_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* LOWERED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = LAYOUT_grid( /* LOWERED */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS , + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = LAYOUT_grid( /* RAISED */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS , + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | | QWERTY | COLEMK | DVORAK | | | | | | | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_grid( /* FUNCTION */ + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U, + _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atomic/keymaps/michelle.c b/keyboards/atomic/keymaps/michelle.c index 2364c46a15d..9c22423d685 100644 --- a/keyboards/atomic/keymaps/michelle.c +++ b/keyboards/atomic/keymaps/michelle.c @@ -1,183 +1,182 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Dvorak */ - { KC_ESC, 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_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { 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_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { 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_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { 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_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ - }, - [1] = { /* Qwerty + F keys */ - { 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_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { 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_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { 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_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { 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_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ - }, - [2] = { /* Numpad + qwerty shortcut keys */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ - }, + [0] = LAYOUT_grid( /* Dvorak */ + KC_ESC, 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_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + 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_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + 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_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + 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_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ + ), + [1] = LAYOUT_grid( /* Qwerty + F keys */ + 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_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + 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_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + 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_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + 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_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ + ), + [2] = LAYOUT_grid( /* Numpad + qwerty shortcut keys */ + { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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: - return MACRODOWN(TYPE(KC_T), END); + switch(id) { + case 0: + return MACRODOWN(TYPE(KC_T), END); break; - } - return MACRO_NONE; + } + return MACRO_NONE; }; diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 43ec0b23bf2..4ccac63f6cb 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -1,4 +1,4 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" #include "led.h" @@ -111,126 +111,126 @@ enum keyboard_macros { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* LAYER = LAYER_QWERTY - .--------------------------------------------------------------------------------------------------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_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_BSPC }, - { KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_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_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_RSFT, KC_UP , KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } -}, -/* LAYER = LAYER_UPPER - .--------------------------------------------------------------------------------------------------------------------------------------. - | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_UPPER] = { - { KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______ }, - { KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, - { _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME }, - { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END }, - { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ } -}, -/* LAYER = LAYER_LOWER - .--------------------------------------------------------------------------------------------------------------------------------------. - | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_LOWER] = { - { 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_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS }, - { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END }, - { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ } -}, -/* LAYER = LAYER_FUNCTION - .--------------------------------------------------------------------------------------------------------------------------------------. - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_FUNCTION] = { - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE }, - { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } -}, -/* LAYER = LAYER_MOUSE - .--------------------------------------------------------------------------------------------------------------------------------------. - | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_MOUSE] = { - { KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } -}, -/* LAYER = LAYER_ADJUST - .--------------------------------------------------------------------------------------------------------------------------------------. - | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_ADJUST] = { - { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX }, - { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, 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, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } -}, + /* LAYER = LAYER_QWERTY + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_QWERTY] = LAYOUT_grid( + 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_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_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_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_RSFT, KC_UP , KC_PGDN, + KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* LAYER = LAYER_UPPER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_UPPER] = LAYOUT_grid( + KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______, + KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS , + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME, + _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END , + _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ + ), + /* LAYER = LAYER_LOWER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_LOWER] = LAYOUT_grid( + 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_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS , + _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME, + _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END , + _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ + ), + /* LAYER = LAYER_FUNCTION + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_FUNCTION] = LAYOUT_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + /* LAYER = LAYER_MOUSE + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_MOUSE] = LAYOUT_grid( + KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R, + XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + /* LAYER = LAYER_ADJUST + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_ADJUST] = LAYOUT_grid( + XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX, + XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, 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, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP + ), }; #ifdef AUDIO_ENABLE @@ -255,22 +255,19 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); #endif /* AUDIO_ENABLE */ -void persistent_default_layer_set(uint16_t default_layer) -{ - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_LSFT), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) - { + // MACRODOWN only works in this function + switch(id) { case MACRO_HELP_1: if (record->event.pressed) diff --git a/keyboards/atomic/keymaps/twolayer.c b/keyboards/atomic/keymaps/twolayer.c index 8ea045d806a..f0ff56467da 100644 --- a/keyboards/atomic/keymaps/twolayer.c +++ b/keyboards/atomic/keymaps/twolayer.c @@ -1,72 +1,68 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [0] = { /* 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_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_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_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_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT }, - }, + /* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_grid( /* 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_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_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_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_RSFT, KC_UP, KC_PGDN, + M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, + ), - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| - * | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [1] = { /* FUNCTION LAYER*/ - { 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, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R }, - }, + /* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| + * | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [1] = LAYOUT_grid( /* FUNCTION LAYER*/ + 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, ___T___, ___T___, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U, + KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D, + _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R, + ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), - [2] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_MOMENTARY(1), + [2] = ACTION_LAYER_MOMENTARY(1), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index f841c351997..8e868ecc0e6 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -9,7 +9,7 @@ // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json new file mode 100644 index 00000000000..34933672f9b --- /dev/null +++ b/keyboards/atreus/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Atreus", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 12.5, + "height": 4.6, + "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}] + } + } +} \ No newline at end of file diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c index b8ec0e032fa..575a640c4f1 100644 --- a/keyboards/atreus/keymaps/alphadox/keymap.c +++ b/keyboards/atreus/keymaps/alphadox/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H #define BASE 0 #define SYMB 1 @@ -9,27 +9,26 @@ enum macro_id { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[BASE] = KEYMAP( + [BASE] = LAYOUT( KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT) -), + ), -[SYMB] = KEYMAP( + [SYMB] = LAYOUT( KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS -), + ), -[ETC] = KEYMAP( + [ETC] = LAYOUT( RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO -), + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c index d0741162690..529b58a13b4 100644 --- a/keyboards/atreus/keymaps/classic/keymap.c +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.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. @@ -9,23 +9,26 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ), + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT + ), - [_RS] = KEYMAP( /* [> RAISE <] */ - KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS , - TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS , + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL + ), - [_LW] = KEYMAP( /* [> LOWER <] */ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , - KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET ) + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 9e91233c329..2e991ac6f27 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.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. @@ -12,50 +12,51 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ), -/* - * ! @ up { } || pgup 7 8 9 * - * # left down right $ || pgdn 4 5 6 + - * [ ] ( ) & || ` 1 2 3 \ - * lower insert super shift bksp ctrl || alt space fn . 0 = - */ -[_RS] = KEYMAP( /* [> RAISE <] */ - KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , - TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), -/* - * insert home up end pgup || up F7 F8 F9 F10 - * del left down right pgdn || down F4 F5 F6 F11 - * volup reset || F1 F2 F3 F12 - * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause - */ -[_LW] = KEYMAP( /* [> LOWER <] */ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , - KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , - KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 15064eb8c9a..ba343ce4dbf 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -1,5 +1,5 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H // layers #define BASE 0 @@ -25,7 +25,7 @@ enum custom_keycodes { CLOUD9_GOTO_SYMBOL, CLOUD9_GOTO_LINE, CLOUD9_NAVIGATE, - + }; // building instructions: @@ -35,50 +35,47 @@ enum custom_keycodes { // avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[BASE] = { - {KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, }, - {KC_A, KC_O, KC_E, KC_U, KC_I, KC_TRNS, KC_D, KC_H, KC_T, KC_N, KC_S, }, - {KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(KEYNAV), KC_B, KC_M, KC_W, KC_V, KC_Z, }, - {OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), MO(COMBINED), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT), } -}, - -[KEYNAV] = { - {KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, }, - {MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), }, - {MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), } -}, - -[KEYSEL] = { - {MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), }, - {MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), }, - {MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), }, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), } -}, - -[COMBINED] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, }, - {KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, }, - {KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, }, - {KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_PIPE, KC_BSLS, } -}, - -[MOUSE] = { - {KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, }, - {KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), }, - {KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), } -}, - -[BROWSER_CONTROL] = { - {KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_TRNS, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, }, - {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS, } -}, - - + [BASE] = LAYOUT( + KC_QUOTE, KC_COMMA, 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, + KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, + OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), MO(COMBINED), MO(KEYNAV), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT) + ), + + [KEYNAV] = LAYOUT( + KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, + MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), + MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + ), + + [KEYSEL] = LAYOUT( + MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), + MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), + MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + ), + + [COMBINED] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, + KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, + KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, + KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_PIPE, KC_BSLS + ), + + [MOUSE] = LAYOUT( + KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, + KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS, KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), + KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN3, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT) + ), + + [BROWSER_CONTROL] = LAYOUT( + KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS + ), }; const uint16_t PROGMEM fn_actions[] = { @@ -91,31 +88,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Cloud9 macros case CLOUD9_TAB_LEFT: SEND_STRING(SS_LCTRL("[")); - return true; + return true; break; case CLOUD9_TAB_RIGHT: SEND_STRING(SS_LCTRL("]")); - return true; + return true; break; case CLOUD9_TAB_CLOSE: SEND_STRING(SS_LALT("w")); - return true; + return true; break; case CLOUD9_GOTO_SYMBOL: SEND_STRING(SS_LSFT(SS_LCTRL("e"))); - return true; + return true; break; case CLOUD9_GOTO_LINE: SEND_STRING(SS_LCTRL("g")); - return true; + return true; break; case CLOUD9_NAVIGATE: SEND_STRING(SS_LCTRL("e")); return true; - break; + break; } } - + return true; } @@ -142,7 +139,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) else mouse_lock = true; } - break; + break; } return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 32c8826e023..232c700e948 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.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. @@ -17,23 +17,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), - -[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), - -[MOUS] = KEYMAP( /* Mouse and Media Keys */ - KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, - KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, - _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + [BASE] = LAYOUT( /* Qwerty */ + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS + ), + + [NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______ + ), + + [MOUS] = LAYOUT( /* Mouse and Media Keys */ + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, + _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1 + ), }; @@ -45,17 +48,16 @@ const uint16_t PROGMEM fn_actions[] = { [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/gerb/keymap.c b/keyboards/atreus/keymaps/gerb/keymap.c index 1ba3942e3b9..c52f32ef61d 100644 --- a/keyboards/atreus/keymaps/gerb/keymap.c +++ b/keyboards/atreus/keymaps/gerb/keymap.c @@ -1,7 +1,7 @@ // This is the personal keymap of Chris Gerber (@gerbercj). I haven't worked out the kinks // with the Colemak and Dvorak support yet, but everything else works nicely. -#include "atreus.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. @@ -14,53 +14,52 @@ #define _L2 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = { /* Qwerty */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT } - }, - [_CM] = { /* Colemak */ - {KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT } - }, - [_DV] = { /* Dvorak */ - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S }, - {KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_ENT } - }, - [_L1] = { /* LAYER 1 */ - {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_VOLU, KC_7, KC_8, KC_9, KC_LBRC}, - {KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_VOLD, KC_4, KC_5, KC_6, KC_RBRC}, - {KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_MINS, KC_LALT, KC_MUTE, KC_1, KC_2, KC_3, KC_BSLS}, - {TG(_L2), KC_APP, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL } - }, - [_L2] = { /* LAYER 2 */ - {KC_TRNS, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, KC_NO, DF(_QW), KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_NO, DF(_CM), KC_F6, KC_F5, KC_F6, KC_F11 }, - {KC_BTN4, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, KC_LALT, DF(_DV), KC_F1, KC_F2, KC_F3, KC_F12 }, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET } - } + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT + ), + [_CM] = LAYOUT( /* Colemak */ + 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, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT + ), + [_DV] = LAYOUT( /* Dvorak */ + 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, + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_ENT + ), + [_L1] = LAYOUT( /* LAYER 1 */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_7, KC_8, KC_9, KC_LBRC, + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_4, KC_5, KC_6, KC_RBRC, + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_MINS, KC_MUTE, KC_1, KC_2, KC_3, KC_BSLS, + TG(_L2), KC_APP, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL + ), + [_L2] = LAYOUT( /* LAYER 2 */ + KC_TRNS, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, DF(_QW), KC_F7, KC_F8, KC_F9, KC_F10, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, DF(_CM), KC_F6, KC_F5, KC_F6, KC_F11, + KC_BTN4, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, DF(_DV), KC_F1, KC_F2, KC_F3, KC_F12, + KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +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; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/henxing/keymap.c b/keyboards/atreus/keymaps/henxing/keymap.c index e5ff5f5d3fb..51a46fa3737 100644 --- a/keyboards/atreus/keymaps/henxing/keymap.c +++ b/keyboards/atreus/keymaps/henxing/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -19,87 +19,85 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * q w e r t || y u i o p - * a s d f g || h j k l ; - * z x c v b || n m , . / - * esc tab gui shift bksp ctrl || alt space lower - ' enter - */ - [_QWERTY] = KEYMAP( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ - ), - - /* - * ! @ up { } || pgup 7 8 9 * - * # left down right $ || pgdn 4 5 6 + - * [ ] ( ) & || ` 1 2 3 \ - * raise insert gui shift bksp ctrl || alt space ____ . 0 = - */ - [_LOWER] = KEYMAP( \ - KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ - RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ - ), - - /* - * insert home up end pgup || up F7 F8 F9 F10 - * del left down right pgdn || down F4 F5 F6 F11 - * volup reset || F1 F2 F3 F12 - * voldn super shift bksp ctrl || alt space QWERTY prtsc scroll pause - */ - [_RAISE] = KEYMAP( \ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ - KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ - KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ - ) - + /* + * q w e r t || y u i o p + * a s d f g || h j k l ; + * z x c v b || n m , . / + * esc tab gui shift bksp ctrl || alt space lower - ' enter + */ + [_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, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * raise insert gui shift bksp ctrl || alt space ____ . 0 = + */ + [_LOWER] = LAYOUT( \ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ + RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ + ), + + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space QWERTY prtsc scroll pause + */ + [_RAISE] = LAYOUT( \ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ + KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ + ), }; void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // The value to return - bool return_value = false; - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - break; - - case LOWER: - // Toggle LOWER layer on when key pressed and off when released - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - break; - - case RAISE: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_RAISE); - } - break; - - default: - - // If the keycode is not handled by any of the other cases, the - // function should return true - return_value = true; - break; - } - - return return_value; + // The value to return + bool return_value = false; + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + break; + + case LOWER: + // Toggle LOWER layer on when key pressed and off when released + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + break; + + case RAISE: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_RAISE); + } + break; + + default: + + // If the keycode is not handled by any of the other cases, the + // function should return true + return_value = true; + break; + } + + return return_value; } diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c index 90ec6f9049a..42bef9d80c9 100644 --- a/keyboards/atreus/keymaps/jeremy/keymap.c +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -1,6 +1,6 @@ // This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "keymap_colemak.h" @@ -25,41 +25,43 @@ #define KM_REDO LGUI(LSFT(KC_Z)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[ALPH] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL} -}, -[NUMS] = { - {KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH}, - {KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, - {KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} -}, -[CURS] = { - {KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS}, - {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS}, - {KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[SYMB] = { - {KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC}, - {KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD}, - {KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC}, - {KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[FKEY] = { - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}}; + [ALPH] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LALT, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL + ), + [NUMS] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH, + KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR, + KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS + ), + [CURS] = LAYOUT( + KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [SYMB] = LAYOUT( + KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC, + KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD, + KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC, + KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [FKEY] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, + 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 uint16_t PROGMEM fn_actions[] = {}; +}; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) {} return MACRO_NONE; diff --git a/keyboards/atreus/keymaps/khitsule/keymap.c b/keyboards/atreus/keymaps/khitsule/keymap.c index 23fabf0d791..04cd4d59168 100644 --- a/keyboards/atreus/keymaps/khitsule/keymap.c +++ b/keyboards/atreus/keymaps/khitsule/keymap.c @@ -1,10 +1,10 @@ // Personal keymap of khitsule -#include "atreus.h" +#include QMK_KEYBOARD_H -#define ALPH 0 -#define LOWR 1 -#define RAIS 2 +#define ALPH 0 +#define LOWR 1 +#define RAIS 2 // enum layers { // ALPH, //alpha qwerty @@ -24,24 +24,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[ALPH] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, CTL_T(KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TRNS, KC_TRNS, ALT_T(KC_ENT), LT(LOWR, KC_TAB), SFT_T(KC_BSPC), LT(RAIS, KC_DEL), KC_LGUI, KC_TRNS, KC_QUOT, KC_MINUS} -}, -[LOWR] = { - {KC_PSCR, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_RPRN}, - {KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_TRNS, KC_LBRC, KC_F4, KC_F5, KC_F6, KC_RBRC}, - {KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, KC_TRNS, LSFT(KC_LBRC), KC_F1, KC_F2, KC_F3, LSFT(KC_RBRC)}, - {KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[RAIS] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS}, - {KC_CIRC, KC_AMPR, KC_GRV, KC_TILD, KC_PIPE, KC_TRNS, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_MINUS, KC_1, KC_2, KC_3, KC_SLASH}, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL} -} + [ALPH] = 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, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TRNS, KC_TRNS, ALT_T(KC_ENT), LT(LOWR, KC_TAB), CTL_T(KC_SPC), SFT_T(KC_BSPC), LT(RAIS, KC_DEL), KC_LGUI, KC_TRNS, KC_QUOT, KC_MINUS + ), + [LOWR] = LAYOUT( + KC_PSCR, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_RPRN, + KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_LBRC, KC_F4, KC_F5, KC_F6, KC_RBRC, + KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, LSFT(KC_LBRC), KC_F1, KC_F2, KC_F3, LSFT(KC_RBRC), + KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [RAIS] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, + KC_CIRC, KC_AMPR, KC_GRV, KC_TILD, KC_PIPE, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_MINUS, KC_1, KC_2, KC_3, KC_SLASH, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL + ), }; const uint16_t PROGMEM fn_actions[] = { @@ -49,9 +49,8 @@ const uint16_t PROGMEM fn_actions[] = { [2] = ACTION_MACRO_TAP(2) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { case 1: return tap_mod_macro(record, LGUI, MACRO( D(LSFT), T(9), U(LSFT), END)); break; diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index d39a184d487..2d8f0d70f86 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -15,7 +15,7 @@ * here: https://colemakmods.github.io/mod-dh/ */ -#include "atreus.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. @@ -47,136 +47,136 @@ ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - * Colemak-ModDH - * - * ,----------------------------------. ,----------------------------------. - * | Q | W | F | P | B | | J | L | U | Y | ; | - * +------+------+------+------+------| +------+------+------+------+------| - * | A | R | S | T | G | | M | N | E | I | O | - * +------+------+------+------+------| +------+------+------+------+------| - * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| - * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_CO] = KEYMAP( - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, - SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL -), - -/* - * QWERTY - * - * ,----------------------------------. ,----------------------------------. - * | Q | W | E | R | T | | Y | U | I | O | P | - * +------+------+------+------+------| +------+------+------+------+------| - * | A | S | D | F | G | | H | J | K | L | ; | - * +------+------+------+------+------| +------+------+------+------+------| - * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| - * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL -), - -/* - * Extend - * - * Ctrl+` is a keyboard shortcut for the program ConEmu, which brings up a dropdown console window. - * - * Also note that some dual-role keys are overridden here with their modifiers - * - * ,----------------------------------. ,----------------------------------. - * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | - * +------+------+------+------+------| +------+------+------+------+------| - * | Gui | Shift| Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | - * +------+------+------+------+------| +------+------+------+------+------| - * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| - * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| - * | | | | | | | | | | | Space|XXXXXX| | |PrntSc| - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_EX] = KEYMAP( /* Extend */ - _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, - KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, - _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR -), - -/* - * Numbers and symbols - * - * ,----------------------------------. ,----------------------------------. - * | ! | @ | { | } | & | | / | 7 | 8 | 9 | * | - * +------+------+------+------+------| +------+------+------+------+------| - * | # | $ | ( | ) | ~ | | | | 4 | 5 | 6 | - | - * +------+------+------+------+------| +------+------+------+------+------| - * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | - * +------+------+------+------+------| | | | | +------+------+------+------+------| - * | | _GA | | | | | | | | |XXXXXX| 0 | . | = | | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_NU] = KEYMAP( /* Numbers and symbols */ - KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, - _______, TG(_GA), _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ -), - -/* - * Functions - * - * ,----------------------------------. ,----------------------------------. - * | Caps | F9 | F10 | F11 | F12 | | _USER|Whl Up| MUp |Whl Dn| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | Vol ^| MLeft| MDown|MRight| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | ,------. ,------. | Vol v| | | | | - * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| - * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_FN] = KEYMAP( /* Functions */ - KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, - _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_VOLD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET -), - -/* - * Gaming - * - * ,----------------------------------. ,----------------------------------. - * | | | | | | | |Whl Up| MUp |Whl Dn| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | | | | | | | MLeft| MDown|MRight| | - * +------+------+------+------+------| +------+------+------+------+------| - * | Z | | | | | ,------. ,------. | | | | | | - * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| - * | | _GA | | Shift| Space| | | | | |LClick|MClick| | | | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_GA] = KEYMAP( /* Gaming */ - _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, - _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - KC_Z, _______, _______, _______, _______, _______, _______, KC_MS_D, _______, _______, - _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, KC_BTN3, _______, _______, _______ -)}; + /* + * Colemak-ModDH + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | R | S | T | G | | M | N | E | I | O | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_CO] = LAYOUT( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + ), + + /* + * QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + ), + + /* + * Extend + * + * Ctrl+` is a keyboard shortcut for the program ConEmu, which brings up a dropdown console window. + * + * Also note that some dual-role keys are overridden here with their modifiers + * + * ,----------------------------------. ,----------------------------------. + * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | + * +------+------+------+------+------| +------+------+------+------+------| + * | Gui | Shift| Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | + * +------+------+------+------+------| +------+------+------+------+------| + * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| + * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| + * | | | | | | | | | | | Space|XXXXXX| | |PrntSc| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_EX] = LAYOUT( /* Extend */ + _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, + _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR + ), + + /* + * Numbers and symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | { | } | & | | / | 7 | 8 | 9 | * | + * +------+------+------+------+------| +------+------+------+------+------| + * | # | $ | ( | ) | ~ | | | | 4 | 5 | 6 | - | + * +------+------+------+------+------| +------+------+------+------+------| + * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | _GA | | | | | | | | |XXXXXX| 0 | . | = | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_NU] = LAYOUT( /* Numbers and symbols */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, + _______, TG(_GA), _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ + ), + + /* + * Functions + * + * ,----------------------------------. ,----------------------------------. + * | Caps | F9 | F10 | F11 | F12 | | _USER|Whl Up| MUp |Whl Dn| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | Vol ^| MLeft| MDown|MRight| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | ,------. ,------. | Vol v| | | | | + * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| + * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_FN] = LAYOUT( /* Functions */ + KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET + ), + + /* + * Gaming + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | |Whl Up| MUp |Whl Dn| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | | | MLeft| MDown|MRight| | + * +------+------+------+------+------| +------+------+------+------+------| + * | Z | | | | | ,------. ,------. | | | | | | + * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| + * | | _GA | | Shift| Space| | | | | |LClick|MClick| | | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_GA] = LAYOUT( /* Gaming */ + _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + KC_Z, _______, _______, _______, _______, _______, _______, KC_MS_D, _______, _______, + _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, KC_BTN3, _______, _______, _______ + ) +}; /* * Template @@ -197,17 +197,16 @@ const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case _USER: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case _USER: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c index 9ac1138ec05..ed1f634cebe 100644 --- a/keyboards/atreus/keymaps/xk/keymap.c +++ b/keyboards/atreus/keymaps/xk/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.h" +#include QMK_KEYBOARD_H #define _COLEMAK 0 #define _KAMELOC 1 @@ -109,169 +109,170 @@ OSX, const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - TAP - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ X │ C │ D │ V │ Z ├────┐ ┌────┤ K │ H │ , │ . │ / │ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │SFTn│CTLn│ALTn│ROUS│SPC │BKSP│ │TAB │ENT │PGDN│ ' │ \ │ESC │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - HOLD - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ │ │ │ │ │ │ │ │ │ │ALT │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │CTL │ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │SFT │CTL │ALT │ROUS│L123│L OH│ │L OH│L123│L!@#│ │L FN│LESC│ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ - DOUBLETAP - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │ │ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │OSML│OSML│OSML│NADA│ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ + /* + TAP + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ X │ C │ D │ V │ Z ├────┐ ┌────┤ K │ H │ , │ . │ / │ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │SFTn│CTLn│ALTn│ROUS│SPC │BKSP│ │TAB │ENT │PGDN│ ' │ \ │ESC │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + HOLD + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ALT │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │CTL │ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │SFT │CTL │ALT │ROUS│L123│L OH│ │L OH│L123│L!@#│ │L FN│LESC│ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + DOUBLETAP + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │ │ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │OSML│OSML│OSML│NADA│ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + */ -// Colemak PB&J (Mod-DH) -[_COLEMAK] = KEYMAP( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, \ - KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, KC_COMM, SFT_IT, CTL_IT, \ - KYCTL, KYSFT, KYALT, TT(_MLAYER), XK_SPC, XK_TAB, XK_BSP, XK_ENT, XK_PGDN, XK_APO, PIPBOY, XK_ESC \ -), + // Colemak PB&J (Mod-DH) + [_COLEMAK] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, \ + KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, KC_COMM, SFT_IT, CTL_IT, \ + KYCTL, KYSFT, KYALT, TT(_MLAYER), XK_SPC, XK_TAB, XK_BSP, XK_ENT, XK_PGDN, XK_APO, PIPBOY, XK_ESC \ + ), -// useful for one-handed typing -[_KAMELOC] = KEYMAP( \ - KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, \ - KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, \ - KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, KC_Z, KC_V, KC_D, KC_C, KC_X, \ - XK_ESC, PIPBOY, TT(_MLAYER), KC_PGDN, KC_ENT, _______, _______, XK_SPC, KC_PGUP, KYALT, KYCTL, KYSFT \ -), + // useful for one-handed typing + [_KAMELOC] = LAYOUT( \ + KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, \ + KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, \ + KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, KC_Z, KC_V, KC_D, KC_C, KC_X, \ + XK_ESC, PIPBOY, TT(_MLAYER), KC_PGDN, KC_ENT, _______, _______, XK_SPC, KC_PGUP, KYALT, KYCTL, KYSFT \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ - │ = │ ` │GUI │UNDO├────┐ ┌────┤HOME│END │HOME│INS │ \ │ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │GUI │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ - │ = │ ` │GUI │UNDO├────┐ ┌────┤HOME│END │HOME│INS │ \ │ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │GUI │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + */ -[_IKAPILA] = KEYMAP( \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_MUTE, KC_VOLD, KC_VOLU, TD(MND), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), \ - KC_MINS, KC_EQL, KC_GRV, KC_LGUI, LCTL(KC_Z), TD(HND), KC_HOME, TD(HND), KC_INS, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, KYSFT \ -), + [_IKAPILA] = LAYOUT( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_MUTE, KC_VOLD, KC_VOLU, TD(MND), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), \ + KC_MINS, KC_EQL, KC_GRV, KC_LGUI, LCTL(KC_Z), TD(HND), KC_HOME, TD(HND), KC_INS, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, KYSFT \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │PSCR│ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ _ │ + │ ~ │HOME│END ├────┐ ┌────┤ {} │ () │ <> │ [ │ ] │ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │DEL │ │BKSP│ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │PSCR│ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ _ │ + │ ~ │HOME│END ├────┐ ┌────┤ {} │ () │ <> │ [ │ ] │ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │DEL │ │BKSP│ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + */ -[_IKASHFT] = KEYMAP( \ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(MND), KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, \ - KC_UNDS, KC_PLUS, KC_TILD, KC_HOME, KC_END, M(1), M(0), M(5), KC_LBRC, KC_RBRC, \ - _______, _______, _______, _______, _______, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______ \ -), + [_IKASHFT] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(MND), KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, \ + KC_UNDS, KC_PLUS, KC_TILD, KC_HOME, KC_END, M(1), M(0), M(5), KC_LBRC, KC_RBRC, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______ \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ F21│ F22│ F23│ F24│PAUS│ │ │SCLK│BOOT│ │NKRO│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │CAPS│ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ F21│ F22│ F23│ F24│PAUS│ │ │SCLK│BOOT│ │NKRO│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ ├────┐ ┌────┤ │ │ │ │CAPS│ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + */ -[_FNCTION] = KEYMAP( \ - TD(F11), TD(F12), TD(F13), TD(F14), TD(F15), TD(F16), TD(F17), TD(F18), TD(F19), TD(F20), \ - KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_SLCK, XXXXXXX, XXXXXXX, TGNKRO, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), + [_FNCTION] = LAYOUT( \ + TD(F11), TD(F12), TD(F13), TD(F14), TD(F15), TD(F16), TD(F17), TD(F18), TD(F19), TD(F20), \ + KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_SLCK, XXXXXXX, XXXXXXX, TGNKRO, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -[_GAMEQWERTY] = KEYMAP( \ - KC_P, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, \ - KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, \ - KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, TD(COD), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), + [_GAMEQWERTY] = LAYOUT( \ + KC_P, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, \ + KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, \ + KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, TD(COD), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │^HOM│^PGD│^UP │^PGU│^PGU│ │ │MW_L│ MU │MW_R│ AC2│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │^END│^LFT│^DWN│^RGT│^PGD│ │ │ ML │ MD │ MR │ AC1│ - ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ - │ M5 │ M2 │ M4 │ M3 │ M1 ├────┐ ┌────┤ │MW_D│MW_U│ │ AC0│ - ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │^HOM│^PGD│^UP │^PGU│^PGU│ │ │MW_L│ MU │MW_R│ AC2│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │^END│^LFT│^DWN│^RGT│^PGD│ │ │ ML │ MD │ MR │ AC1│ + ├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤ + │ M5 │ M2 │ M4 │ M3 │ M1 ├────┐ ┌────┤ │MW_D│MW_U│ │ AC0│ + ├────┼────┼────┼────┼────┤ │ │ ├────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + */ -[_MLAYER] = KEYMAP( \ - LALT(KC_ESC), KC_9, KC_8, KC_7, KC_6, M(1), M(0), KC_MS_U, M(0), M(2), \ - KC_0, KC_2, KC_3, KC_4, KC_5, M(5), KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL2, \ - KC_1, KC_0, XXXXXXX, XXXXXXX, KC_BTN5, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, M(5), \ - _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN2, KC_BTN1, KC_BTN2, _______, KC_ACL0, _______ \ -), + [_MLAYER] = LAYOUT( \ + LALT(KC_ESC), KC_9, KC_8, KC_7, KC_6, M(1), M(0), KC_MS_U, M(0), M(2), \ + KC_0, KC_2, KC_3, KC_4, KC_5, M(5), KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL2, \ + KC_1, KC_0, XXXXXXX, XXXXXXX, KC_BTN5, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, M(5), \ + _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN2, KC_BTN1, KC_BTN2, _______, KC_ACL0, _______ \ + ), -//one_ring=2__rule__them-all -[_GRVTABL] = KEYMAP( \ - LALT(KC_PSCR), M(4), KC_PWR, KC_POWER, RESET, RESET, KC_R, KC_E, KC_I, LALT(KC_PSCR), \ - TG(_NINEKEY), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), TG(_IKAPILA), KC_S, KC_U, KC_B, TG(_NINEKEY), \ - M(3), TG(_GAMEQWERTY), XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, KC_CALC, XXXXXXX, TG(_GAMEQWERTY), M(3), \ - TT(_GRVTABL), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), _______, _______, TG(_IKAPILA), TG(_IKASHFT), TG(_MLAYER), TG(_MLAYER), TG(_NINEKEY) \ -)}; + //one_ring=2__rule__them-all + [_GRVTABL] = LAYOUT( \ + LALT(KC_PSCR), M(4), KC_PWR, KC_POWER, RESET, RESET, KC_R, KC_E, KC_I, LALT(KC_PSCR), \ + TG(_NINEKEY), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), TG(_IKAPILA), KC_S, KC_U, KC_B, TG(_NINEKEY), \ + M(3), TG(_GAMEQWERTY), XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, KC_CALC, XXXXXXX, TG(_GAMEQWERTY), M(3), \ + TT(_GRVTABL), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), _______, _______, TG(_IKAPILA), TG(_IKASHFT), TG(_MLAYER), TG(_MLAYER), TG(_NINEKEY) \ + ), +}; qk_tap_dance_action_t tap_dance_actions[] = { - [VOM] = ACTION_TAP_DANCE_DOUBLE(KC_VOLD, KC_MUTE), - [PRN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), - [EGT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), - [HRD] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), - [DSH] = ACTION_TAP_DANCE_DOUBLE(KC_NDSH, KC_MDSH), - [ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(KC_F4)), - [EQE] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_ENT), - [UND] = ACTION_TAP_DANCE_DOUBLE(KC_Z, LCTL(KC_Z)), - [PGN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, KC_PGUP), - [HND] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), - [COD] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), - [MND] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), - [F11] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F11), - [F12] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F12), - [F13] = ACTION_TAP_DANCE_DOUBLE(KC_F3, KC_F13), - [F14] = ACTION_TAP_DANCE_DOUBLE(KC_F4, KC_F14), - [F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), - [F16] = ACTION_TAP_DANCE_DOUBLE(KC_F6, KC_F16), - [F17] = ACTION_TAP_DANCE_DOUBLE(KC_F7, KC_F17), - [F18] = ACTION_TAP_DANCE_DOUBLE(KC_F8, KC_F18), - [F19] = ACTION_TAP_DANCE_DOUBLE(KC_F9, KC_F19), - [F20] = ACTION_TAP_DANCE_DOUBLE(KC_F10, KC_F20), + [VOM] = ACTION_TAP_DANCE_DOUBLE(KC_VOLD, KC_MUTE), + [PRN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), + [EGT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), + [HRD] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + [DSH] = ACTION_TAP_DANCE_DOUBLE(KC_NDSH, KC_MDSH), + [ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(KC_F4)), + [EQE] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_ENT), + [UND] = ACTION_TAP_DANCE_DOUBLE(KC_Z, LCTL(KC_Z)), + [PGN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, KC_PGUP), + [HND] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), + [COD] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), + [MND] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + [F11] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F11), + [F12] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F12), + [F13] = ACTION_TAP_DANCE_DOUBLE(KC_F3, KC_F13), + [F14] = ACTION_TAP_DANCE_DOUBLE(KC_F4, KC_F14), + [F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), + [F16] = ACTION_TAP_DANCE_DOUBLE(KC_F6, KC_F16), + [F17] = ACTION_TAP_DANCE_DOUBLE(KC_F7, KC_F17), + [F18] = ACTION_TAP_DANCE_DOUBLE(KC_F8, KC_F18), + [F19] = ACTION_TAP_DANCE_DOUBLE(KC_F9, KC_F19), + [F20] = ACTION_TAP_DANCE_DOUBLE(KC_F10, KC_F20), }; void matrix_init_user(){ @@ -281,33 +282,33 @@ void matrix_init_user(){ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { if (record->event.pressed) { switch(id) { - case 0: - return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); - case 1: - return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); - case 2: - return MACRO( T(LBRC), T(RBRC), T(LEFT), END); - case 5: - return MACRO( D(LSFT), T(COMMA), U(LSFT), D(LSFT), T(DOT), U(LSFT), END ); - case 3: - clear_keyboard(); - return false; - break; - case 4: - return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); - case WINSH: - set_unicode_input_mode(UC_WIN); - return false; - break; - case WIN: - set_unicode_input_mode(UC_WINC); - return false; - break; - case OSX: - set_unicode_input_mode(UC_OSX); - return false; - break; - } + case 0: + return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); + case 1: + return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); + case 2: + return MACRO( T(LBRC), T(RBRC), T(LEFT), END); + case 5: + return MACRO( D(LSFT), T(COMMA), U(LSFT), D(LSFT), T(DOT), U(LSFT), END ); + case 3: + clear_keyboard(); + return false; + break; + case 4: + return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); + case WINSH: + set_unicode_input_mode(UC_WIN); + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + return false; + break; + } } - return MACRO_NONE; + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 347445ef6bc..fb0c5077f84 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -2,7 +2,7 @@ // Chris Gerber (@gerbercj), with the addition of persistent layers like the Planck and // Preonic keyboards by Jack Humbert. -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -43,7 +43,7 @@ enum planck_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak Layer + /* Dvorak Layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | |------+------+------+------+------| |------+------+------+------+------| @@ -53,14 +53,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' */ - [_DVORAK] = { - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S }, - {SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, SFTZED }, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS} - }, - -/* QWERTY Layer + [_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, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* QWERTY Layer ,----------------------------------. ,----------------------------------. | Q | W | E | R | T | | Y | U | I | O | P | |------+------+------+------+------| |------+------+------+------+------| @@ -70,14 +70,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' */ - [_QWERTY] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH}, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS} - }, - -/* Colemak Layer + [_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, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Colemak Layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | |------+------+------+------+------| |------+------+------+------+------| @@ -87,14 +87,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------'*/ - [_COLEMAK] = { - {KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_D, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O }, - {SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH}, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS} - }, - -/* Dvorak Layer with Command key on left thumb instead of Control + [_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, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Dvorak Layer with Command key on left thumb instead of Control ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | |------+------+------+------+------| |------+------+------+------+------| @@ -104,14 +104,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' */ - [_DVORMAC] = { - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S }, - {SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, SFTZED }, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS} - }, - -/* LOWER Layer + [_DVORMAC] = 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, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LGUI, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* LOWER Layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |------+------+------+------+------| |------+------+------+------+------| @@ -121,14 +121,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | ~ | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------'*/ - [_LOWER] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - {KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR}, - {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______}, - {KC_TILD, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______} - }, - -/* RAISE Layer + [_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_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_TILD, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______ + ), + + /* RAISE Layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |------+------+------+------+------| |------+------+------+------+------| @@ -138,14 +138,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------'*/ - [_RAISE] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0 }, - {KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC}, - {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______}, - {KC_GRV, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______} - }, - -/* ADJUST Layer + [_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_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______, + KC_GRV, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______ + ), + + /* ADJUST Layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |------+------+------+------+------| |------+------+------+------+------| @@ -155,13 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | | | | | |------'`------| | | | | RESET| `----------------------------------' `----------------------------------'*/ - [_ADJUST] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_F11, _______, _______, _______, _______, XXXXXXX, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12 }, - {_______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } - } - + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12 , + _______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { @@ -175,50 +174,50 @@ 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) { - 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 DVORMAC: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); - } - 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 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 true; + return false; + break; + case DVORMAC: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORMAC); + } + 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/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h index d0bf68adcc2..4bf7dabc7dc 100644 --- a/keyboards/atreus62/atreus62.h +++ b/keyboards/atreus62/atreus62.h @@ -8,7 +8,7 @@ void promicro_bootloader_jmp(bool program); // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define 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, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -24,7 +24,7 @@ void promicro_bootloader_jmp(bool program); } // Used to create a keymap using only KC_ prefixed keys. -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ 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, \ diff --git a/keyboards/atreus62/info.json b/keyboards/atreus62/info.json new file mode 100644 index 00000000000..af2201d5c7e --- /dev/null +++ b/keyboards/atreus62/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atreus62", + "url": "", + "maintainer": "qmk", + "width": 14.5, + "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":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}] + } + } +} \ No newline at end of file diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index 4adfb9e3c80..72bb886534d 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c @@ -1,4 +1,4 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H // Layers #define DVORAK 0 @@ -9,91 +9,97 @@ #define RESETL 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DVORAK] = KC_KEYMAP( + [DVORAK] = LAYOUT_kc( NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ NO, A, O, E, U, I, D, H, T, N, S, NO, \ NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ), + NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + ), -[QWERTY] = KC_KEYMAP( + [QWERTY] = LAYOUT_kc( NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ), + NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + ), -[RAISE] = KC_KEYMAP( + [RAISE] = LAYOUT_kc( NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \ NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO ), + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO + ), -[LOWER] = KC_KEYMAP( + [LOWER] = LAYOUT_kc( NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \ NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \ NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO ), + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO + ), -[BDO] = KC_KEYMAP( + [BDO] = LAYOUT_kc( NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \ NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ - NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO ), + NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO + ), -[RESETL] = KEYMAP( + [RESETL] = LAYOUT( KC_NO, RESET, 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, 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_FN3,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_FN3,KC_NO + ) }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer - [1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer - [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer - [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer + [0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer + [1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer + [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer + [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer }; -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; +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); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; static uint8_t qw_dv_swap_state = 0; bool process_record_user (uint16_t keycode, keyrecord_t *record) { - if (keycode == KC_LGUI) { - if (record->event.pressed) - qw_dv_swap_state |= 0b00000001; - else - qw_dv_swap_state &= ~(0b00000001); + if (keycode == KC_LGUI) { + if (record->event.pressed) { + qw_dv_swap_state |= 0b00000001; + } else { + qw_dv_swap_state &= ~(0b00000001); } - if (keycode == KC_LCTL) { - if (record->event.pressed) - qw_dv_swap_state |= 0b00000010; - else - qw_dv_swap_state &= ~(0b00000010); + } + if (keycode == KC_LCTL) { + if (record->event.pressed) { + qw_dv_swap_state |= 0b00000010; + } else { + qw_dv_swap_state &= ~(0b00000010); } + } - if (qw_dv_swap_state == 0b00000011) { - layer_invert(DVORAK); - } - return true; + if (qw_dv_swap_state == 0b00000011) { + layer_invert(DVORAK); + } + return true; } diff --git a/keyboards/atreus62/keymaps/default/keymap.c b/keyboards/atreus62/keymaps/default/keymap.c index 52802c77b7d..89ff7012ea0 100644 --- a/keyboards/atreus62/keymaps/default/keymap.c +++ b/keyboards/atreus62/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus62.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. @@ -12,40 +12,39 @@ #define _RESET 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DEFAULT] = { /* qwerty */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC }, - { KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, 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_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI } -}, + [_DEFAULT] = 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 , + KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC , + 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_LBRC , + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DELT, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI + ), -[_NAV] = { - { TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS }, - { TO(_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 } -}, + [_NAV] = LAYOUT( + TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS , + TO(_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 + ), -[_RESET] = { - { TO(_DEFAULT), 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 , 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 , RESET } -} + [_RESET] = LAYOUT( + TO(_DEFAULT), 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 , 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 , RESET + ) - -/* -[_TRNS] = { - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } -}, -*/ + /* + [_TRNS] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + */ }; @@ -54,18 +53,17 @@ 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; +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; }; diff --git a/keyboards/atreus62/keymaps/mfluid/keymap.c b/keyboards/atreus62/keymaps/mfluid/keymap.c index 26d1c5a608d..f19c02d8e6d 100644 --- a/keyboards/atreus62/keymaps/mfluid/keymap.c +++ b/keyboards/atreus62/keymaps/mfluid/keymap.c @@ -1,41 +1,41 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define OOOOOOO KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { - { 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_BSLS }, - { 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_BSPC, KC_ENT, KC_SPC, MO(2), KC_DEL, KC_EQL, KC_LBRC, KC_RBRC } -}, - -[1] = { - { _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______ }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______ }, - { _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN }, - { _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______ } -}, - -[2] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______ }, - { _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______ }, - { _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______ } -}, - -[3] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL }, - { _______, _______, _______, KC_PGDN, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ }, - { _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -} + [0] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_BSPC, KC_RCTL, KC_ENT, KC_SPC, MO(2), KC_DEL, KC_EQL, KC_LBRC, KC_RBRC + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP, + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN, + _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL, + _______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; @@ -44,19 +44,18 @@ 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; +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; }; diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 2627e024f94..299b0c96b1e 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -1,5 +1,5 @@ #include -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "led.h" #include "action_layer.h" #include "action_util.h" @@ -95,33 +95,29 @@ uint16_t kf_timers[12]; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = { - - { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, - { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, - { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, - { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, - { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,MO(SYM) ,KC_BSPC ,KC_ENT ,KC_SPC ,MO(SYM) ,KC_LEAD ,KC_LALT ,KC_LCTRL ,KC_HYP } - - }, - [NAV] = { - - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_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_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,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_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } - - }, - [SYM] = { - - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, - { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_CIRC ,KN_DLR ,KN_AMPR ,KN_PIPE ,KC_TRNS }, - { KC_TRNS ,KN_EUR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KN_SCLN ,KN_COLN ,KN_QUES ,KN_BSLS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS } - - } + [BASE] = LAYOUT( + M(KF_11), M(KF_1), M(KF_2), M(KF_3), M(KF_4), M(KF_5), M(KF_6), M(KF_7), M(KF_8), M(KF_9), M(KF_10), M(KF_12), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KN_AO, + OSM_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KN_OE, KN_AE, + OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KN_MINS, OSM_LSFT, + MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DELT, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP + ), + + [NAV] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_L, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU + ), + + [SYM] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TD(TD_EQ), TD(TD_FUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KN_LABK, KN_RABK, KN_LCBR, KN_RCBR, KN_PLUS, KN_AT, KN_DQT, KN_QUOT, KN_GRAV, KN_SLSH, KC_TRNS, + KC_TRNS, KN_EXLM, KN_EQL, KN_LPRN, KN_RPRN, KN_MINS, KN_UNDS, KN_CIRC, KN_DLR, KN_AMPR, KN_PIPE, KC_TRNS, + KC_TRNS, KN_EUR, KN_PERC, KN_LBRC, KN_RBRC, KN_ASTR, KN_HASH, KN_SCLN, KN_COLN, KN_QUES, KN_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; #define TAP_ONCE(code) \ @@ -244,8 +240,8 @@ void dance_fun (qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun) - ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) + [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun), + [TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) }; // Runs just one time when the keyboard initializes. diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c index 7ad033eee4b..49d3c908428 100644 --- a/keyboards/atreus62/keymaps/pcewing/keymap.c +++ b/keyboards/atreus62/keymaps/pcewing/keymap.c @@ -1,4 +1,4 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS #define FN MO(_FN) @@ -12,68 +12,68 @@ enum atreus62_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Default layer - * ,-----------------------------------------. ,-----------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G |,------.,------.| H | J | K | L | ; | " | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * |Shift | Z | X | C | V | B ||Delete||Enter || N | M | , | . | / |Shift | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | Ctrl | Win | Alt | ` | Fn | Bksp |`------'`------'|Space | Fn | | Alt | Win | Ctrl | - * `-----------------------------------------' `-----------------------------------------' - */ -[_DEFAULT] = { /* qwerty */ - { 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, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS }, - { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_ENT, KC_SPC, FN, TODO, KC_RALT, KC_RGUI, KC_RCTL } -}, + /* Default layer + * ,-----------------------------------------. ,-----------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G |,------.,------.| H | J | K | L | ; | " | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | Z | X | C | V | B ||Delete||Enter || N | M | , | . | / |Shift | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | Ctrl | Win | Alt | ` | Fn | Bksp |`------'`------'|Space | Fn | | Alt | Win | Ctrl | + * `-----------------------------------------' `-----------------------------------------' + */ + [_DEFAULT] = LAYOUT( /* qwerty */ + 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, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_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_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, FN, TODO, KC_RALT, KC_RGUI, KC_RCTL + ), -/* Function layer - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | F10 | F11 | F12 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Home | Up | End | PgUp | | | PrSc | F7 | F8 | F9 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Caps | Left | Down |Right | PgDn | |,------.,------.|Pause | F4 | F5 | F6 | | | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | | { | } | [ | ] | || || ||Insert| F1 | F2 | F3 | | | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | | | | | | |`------'`------'| | | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_FN] = { - { _______, _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, TO(_RESET) }, - { _______, KC_HOME, KC_UP, KC_END, KC_PGDN, _______, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, _______, _______ }, - { _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, _______, _______, KC_PAUS, KC_F4, KC_F5, KC_F6, _______, _______ }, - { _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, _______, KC_INS, KC_F1, KC_F2, KC_F3, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -}, + /* Function layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | F10 | F11 | F12 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Home | Up | End | PgUp | | | PrSc | F7 | F8 | F9 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | Left | Down |Right | PgDn | |,------.,------.|Pause | F4 | F5 | F6 | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | { | } | [ | ] | || || ||Insert| F1 | F2 | F3 | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | | | | | |`------'`------'| | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, TO(_RESET), + _______, KC_HOME, KC_UP, KC_END, KC_PGDN, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, _______, KC_PAUS, KC_F4, KC_F5, KC_F6, _______, _______, + _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, KC_INS, KC_F1, KC_F2, KC_F3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), -/* - * This layer makes it possible to reset the firmware; don't get rid of it and make sure there is a way to activate it. - */ -[_RESET] = { - { TO(_DEFAULT), 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 , 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 , RESET } -} + /* + * This layer makes it possible to reset the firmware; don't get rid of it and make sure there is a way to activate it. + */ + [_RESET] = LAYOUT( + TO(_DEFAULT), 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, 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, RESET + ) -/* -[_TRNS] = { - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } -}, -*/ + /* + [_TRNS] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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[] = { diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 67e66584a64..8cf4bc9a16e 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,7 +14,7 @@ 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. @@ -29,7 +29,7 @@ TODO: // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -59,59 +59,59 @@ enum atreus52_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DVORAK] = { /* 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 }, - { 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_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL } - }, - - [_QWERTY] = { /* 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_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_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL } - }, - - [_COLEMAK] = { /* 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 }, - { 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL} - }, - - [_WOW] = { /* 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_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } - }, - - [_LOWER] = { - { 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_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ } - }, - [_RAISE] = { - { 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_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ } - }, - [_ADJUST] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } - }, + [_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, + 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_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, + 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, + 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, + 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_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 + ), + + [_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_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + [_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_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h index f9b055c6399..8d545c1f99f 100644 --- a/keyboards/bananasplit/bananasplit.h +++ b/keyboards/bananasplit/bananasplit.h @@ -32,7 +32,7 @@ along with this program. If not, see . | K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | ------------------------------------------------------------------------------------------- */ -#define KEYMAP( \ +#define LAYOUT_base( \ 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, \ @@ -55,7 +55,7 @@ KEYMAP( \ ) */ -#define KEYMAP_HHKBANANA( \ +#define LAYOUT_hhkbanana( \ 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, \ @@ -69,7 +69,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ } -#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, K2C, \ @@ -83,7 +83,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ } -#define KEYMAP_ISO( \ +#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, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -110,7 +110,7 @@ KEYMAP( \ | K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | ------------------------------------------------------------------------------------------- */ -#define KEYMAP_ALL( \ +#define LAYOUT_all( \ 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, \ @@ -124,7 +124,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ } -#define KEYMAP_HHKB_ARROW( \ +#define LAYOUT_hhkb_arrow( \ 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/keyboards/bananasplit/info.json b/keyboards/bananasplit/info.json new file mode 100644 index 00000000000..6741c6cdb0c --- /dev/null +++ b/keyboards/bananasplit/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "bananasplit", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_base": { + "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":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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "LAYOUT_hhkbanana": { + "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":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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"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}] + }, + + "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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_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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "LAYOUT_hhkb_arrow": { + "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.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.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/0010/keymap.c b/keyboards/bananasplit/keymaps/0010/keymap.c index a1795a1ef49..617812149c1 100644 --- a/keyboards/bananasplit/keymaps/0010/keymap.c +++ b/keyboards/bananasplit/keymaps/0010/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define ______ KC_TRNS @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Ctrl | GUI | Alt | L1(Space) | LED | Space | Home | End | Left |Rght |Down | ------------------------------------------------------------------------------------------- */ -[0] = KEYMAP( \ +[0] = LAYOUT_base( \ 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, \ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | Reset | | | | | | ------------------------------------------------------------------------------------------- */ -[1] = KEYMAP( \ +[1] = LAYOUT_base( \ 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_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLEP, \ diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c index b5889aa19cc..275bfe32a14 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c +++ b/keyboards/bananasplit/keymaps/coloneljesus/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 "bananasplit.h" +#include QMK_KEYBOARD_H enum custom_keycodes { WIN_SWITCH_LAYOUT = SAFE_RANGE, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | ------------------------------------------------------------------------------------------- */ -[0] = KEYMAP( \ +[0] = LAYOUT_base( \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ 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, \ @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | TRNS | | | | | Reset | ------------------------------------------------------------------------------------------- */ -[1] = KEYMAP( \ +[1] = LAYOUT_base( \ _______, 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, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \ _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ @@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case WIN_SWITCH_LAYOUT: { - // Sends Alt+Shift on both key down and key up. + // Sends Alt+Shift on both key down and key up. // Designed to switch between two keyboard layouts on Windows using a locking switch. // Does nothing if right shift is pressed for easy resync. if (!(get_mods() & MOD_BIT(KC_RSFT))) diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c index f07278df9b0..dcef38bca15 100644 --- a/keyboards/bananasplit/keymaps/default/keymap.c +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -1,10 +1,10 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP( + [DEFAULT_LAYER] = LAYOUT_base( 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, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [LAYER_1] = KEYMAP( \ + [LAYER_1] = LAYOUT_base( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c index 10593de8dba..f2f829f93e3 100644 --- a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -1,10 +1,10 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + [DEFAULT_LAYER] = LAYOUT_hhkbanana( \ 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_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_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, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [LAYER_1] = KEYMAP_HHKBANANA( \ + [LAYER_1] = LAYOUT_hhkbanana( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c index ab49b871867..89e275daf7b 100644 --- a/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c +++ b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c @@ -7,7 +7,7 @@ Note that "Previous track" and "next track" might only work with Windows. */ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { Hm: Home MoL1: Mo(L1) */ - [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( + [DEFAULT_LAYER] = LAYOUT_hhkb_arrow( // row 1 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_GRV, \ KC_DEL, \ @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { VUp: Volume up www: Browser home page */ - [LAYER_1] = KEYMAP_HHKB_ARROW( + [LAYER_1] = LAYOUT_hhkb_arrow( // row 1 BL_TOGG, 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_INS, \ diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c b/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c index d73b4851b84..859944991b8 100644 --- a/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c +++ b/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c @@ -7,7 +7,7 @@ Note that "Previous track" and "next track" might only work with Windows. */ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { Hm: Home MoL1: Mo(L1) */ - [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( + [DEFAULT_LAYER] = LAYOUT_hhkb_arrow( // row 1 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_GRV, \ KC_DEL, \ @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { VUp: Volume up www: Browser home page */ - [LAYER_1] = KEYMAP_HHKB_ARROW( + [LAYER_1] = LAYOUT_hhkb_arrow( // row 1 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_TRNS, KC_INS, \ diff --git a/keyboards/bananasplit/keymaps/kamon/keymap.c b/keyboards/bananasplit/keymaps/kamon/keymap.c index d9dcafe11ea..34306e18305 100644 --- a/keyboards/bananasplit/keymaps/kamon/keymap.c +++ b/keyboards/bananasplit/keymaps/kamon/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 "bananasplit.h" +#include QMK_KEYBOARD_H #define ______ KC_TRNS @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl | ------------------------------------------------------------------------------------------- */ -[0] = KEYMAP( \ +[0] = LAYOUT_base( \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_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, \ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl | ------------------------------------------------------------------------------------------- */ -[1] = KEYMAP( \ +[1] = LAYOUT_base( \ 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_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -67,7 +67,7 @@ const uint16_t PROGMEM fn_actions[] = { const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case 0: - // Sends Alt+Shift on both key down and key up. + // Sends Alt+Shift on both key down and key up. // Fesigned to switch between two keyboard layouts on Windows using a locking switch. // Does nothing if right shift is pressed for easier resync. if (!(get_mods() & MOD_BIT(KC_RSFT))) diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c index f9794b5b10c..5ed1c65e999 100644 --- a/keyboards/bananasplit/keymaps/nic/keymap.c +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -1,4 +1,4 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define THUMB_LAYER 1 @@ -8,7 +8,7 @@ #define HYPER_TAB ALL_T(KC_TAB) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + [DEFAULT_LAYER] = LAYOUT_hhkb_arrow( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ HYPER_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, \ CTL_T(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_ENT, \ @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + [THUMB_LAYER] = LAYOUT_hhkb_arrow( \ MO(MOD_LAYER), 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, \ @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + [NORMAN_LAYER] = LAYOUT_hhkb_arrow( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, \ @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + [MOD_LAYER] = LAYOUT_hhkb_arrow( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/rask/keymap.c b/keyboards/bananasplit/keymaps/rask/keymap.c index e4b8e1cc793..6c7544cc8b5 100644 --- a/keyboards/bananasplit/keymaps/rask/keymap.c +++ b/keyboards/bananasplit/keymaps/rask/keymap.c @@ -1,4 +1,4 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H // rask's BananaSplit60 layout @@ -29,7 +29,7 @@ // Lock the keyboard, release to unlock const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [L_BASE] = KEYMAP_HHKB_ARROW( \ + [L_BASE] = LAYOUT_hhkb_arrow( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ MO(L_ONE), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTRL, KC_LGUI, KC_LALT, KC_BSPC, MO(L_BASE_ALT), KC_SPACE, KC_RALT, MO(L_LOCK), KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [L_BASE_ALT] = KEYMAP_HHKB_ARROW( \ + [L_BASE_ALT] = LAYOUT_hhkb_arrow( \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, KC_SPACE, ______, ______, ______, ______, ______, ______, ______ \ ), - [L_ONE] = KEYMAP_HHKB_ARROW( \ + [L_ONE] = LAYOUT_hhkb_arrow( \ 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_INS, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [L_TWO] = KEYMAP_HHKB_ARROW( \ + [L_TWO] = LAYOUT_hhkb_arrow( \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, \ KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, \ @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, KC_APP, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ ), - [L_LOCK] = KEYMAP_HHKB_ARROW( \ + [L_LOCK] = LAYOUT_hhkb_arrow( \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk index 3e8f70690d7..81570c493a5 100644 --- a/keyboards/bananasplit/rules.mk +++ b/keyboards/bananasplit/rules.mk @@ -62,3 +62,5 @@ BACKLIGHT_ENABLE = yes # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax + +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/bfake/bfake.h b/keyboards/bfake/bfake.h index fa5c8ee2984..a5b2d8078a6 100644 --- a/keyboards/bfake/bfake.h +++ b/keyboards/bfake/bfake.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#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, \ diff --git a/keyboards/bfake/info.json b/keyboards/bfake/info.json new file mode 100644 index 00000000000..541d1edaf19 --- /dev/null +++ b/keyboards/bfake/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "b.fake", + "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}] + } + } +} diff --git a/keyboards/bfake/keymaps/default/keymap.c b/keyboards/bfake/keymaps/default/keymap.c index 239fdf427f9..a237f8489e7 100644 --- a/keyboards/bfake/keymaps/default/keymap.c +++ b/keyboards/bfake/keymaps/default/keymap.c @@ -15,24 +15,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bfake.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [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] = KEYMAP( + [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] = KEYMAP( + [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, diff --git a/keyboards/bfake/keymaps/mechmerlin/keymap.c b/keyboards/bfake/keymaps/mechmerlin/keymap.c index 705339b9939..35b59e6a42f 100644 --- a/keyboards/bfake/keymaps/mechmerlin/keymap.c +++ b/keyboards/bfake/keymaps/mechmerlin/keymap.c @@ -15,24 +15,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bfake.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [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] = KEYMAP( + [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] = KEYMAP( + [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, @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT ), - [3] = KEYMAP( + [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, diff --git a/keyboards/bfo9000/bfo9000.c b/keyboards/bfo9000/bfo9000.c new file mode 100644 index 00000000000..2ae778e32b3 --- /dev/null +++ b/keyboards/bfo9000/bfo9000.c @@ -0,0 +1 @@ +#include "bfo9000.h" diff --git a/keyboards/bfo9000/bfo9000.h b/keyboards/bfo9000/bfo9000.h new file mode 100644 index 00000000000..c3bd2236cef --- /dev/null +++ b/keyboards/bfo9000/bfo9000.h @@ -0,0 +1,37 @@ +#ifndef BFO9000_H +#define BFO9000_H + +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, R08, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, R10, R11, 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, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, R30, R31, R32, R33, R34, R35, R36, R37, R38, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, R40, R41, R42, R43, R44, R45, R46, R47, R48, \ + L50, L51, L52, L53, L54, L55, L56, L57, L58, R50, R51, R52, R53, R54, R55, R56, R57, R58 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57, L58 }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38 }, \ + { R40, R41, R42, R43, R44, R45, R46, R47, R48 }, \ + { R50, R51, R52, R53, R54, R55, R56, R57, R58 } \ + } + +#endif diff --git a/keyboards/bfo9000/config.h b/keyboards/bfo9000/config.h new file mode 100644 index 00000000000..561d2d11468 --- /dev/null +++ b/keyboards/bfo9000/config.h @@ -0,0 +1,78 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1169 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT BFO-9000 +#define DESCRIPTION Really big split ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +// wiring of each half +#define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } + +/* 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 20 // Number of LEDs + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/bfo9000/i2c.c b/keyboards/bfo9000/i2c.c new file mode 100644 index 00000000000..084c890c405 --- /dev/null +++ b/keyboards/bfo9000/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/bfo9000/keymaps/default/config.h b/keyboards/bfo9000/keymaps/default/config.h new file mode 100644 index 00000000000..6b31e8d14ee --- /dev/null +++ b/keyboards/bfo9000/keymaps/default/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_common.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 + +#endif diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/bfo9000/keymaps/default/keymap.c new file mode 100644 index 00000000000..5de5e123e50 --- /dev/null +++ b/keyboards/bfo9000/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +#define _BASE 0 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT( \ + KC_ESC, KC_VOLU, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_HOME, KC_VOLD, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_END, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_PGUP, KC_CAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, \ + KC_PGDN, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, \ + KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ +) +}; diff --git a/keyboards/bfo9000/matrix.c b/keyboards/bfo9000/matrix.c new file mode 100644 index 00000000000..2ca5f4d87ab --- /dev/null +++ b/keyboards/bfo9000/matrix.c @@ -0,0 +1,342 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#ifdef USE_I2C +// provides memcpy for copying TWI slave buffer +// #include +#endif +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + + +__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) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matrix so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + /* + // read from TWI byte-by-byte into matrix_row_t memory space + size_t i; + for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) { + *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK); + } + // last byte to be read / end of chunk + *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK); + */ + + // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8) + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+0] = i2c_master_read(I2C_ACK); + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\ + | (matrix[slaveOffset+0]&0x40U)<<2; + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\ + | (matrix[slaveOffset+0]&0x80U)<<1; + // clear highest two bits on row 1, where the col9 bits were transported + matrix[slaveOffset+0] &= 0x3F; + + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnected, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + // SLAVE_BUFFER_SIZE is from i2c.h + // (MATRIX_ROWS/2*sizeof(matrix_row_t)) + // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t))); + + // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8) + i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\ + | (matrix[offset+1]&0x100U)>>2\ + | (matrix[offset+2]&0x100U)>>1; + i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]); + i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]); + // note: looks like a possible operator-precedence bug here, in last version? + /* + i2c_slave_buffer[1] = (uint8_t)matrix[offset+0]; + i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8); + i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8); + i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8); + i2c_slave_buffer[5] = (uint8_t)matrix[offset+2]; + */ +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/bfo9000/readme.md b/keyboards/bfo9000/readme.md new file mode 100644 index 00000000000..20c9b2ff793 --- /dev/null +++ b/keyboards/bfo9000/readme.md @@ -0,0 +1,18 @@ +BFO-9000 +======== + +A split full-size ortholinear keyboard made and sold by Keebio. Each half is a 6x9 arrangement, with breakable pieces to allow the number of rows to be customized between 4 to 6, and the number of columns to be between 7 to 9. [More info at Keebio](https://keeb.io). + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make bfo9000:default + +Example of flashing this keyboard: + + make bfo9000:default:avrdude + +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/bfo9000/rules.mk b/keyboards/bfo9000/rules.mk new file mode 100644 index 00000000000..8a7e56f462d --- /dev/null +++ b/keyboards/bfo9000/rules.mk @@ -0,0 +1,70 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# 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 = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 = 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 = 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 + +CUSTOM_MATRIX = yes diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c new file mode 100644 index 00000000000..4936e4249f0 --- /dev/null +++ b/keyboards/bfo9000/serial.c @@ -0,0 +1,230 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS)) + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +matrix_row_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +matrix_row_t serial_read_byte(void) { + matrix_row_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < MATRIX_COLS; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(matrix_row_t data) { + matrix_row_t b = MATRIX_COLS; + serial_output(); + while( b-- ) { + if(data & (1UL << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + matrix_row_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += ROW_MASK & serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + matrix_row_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += ROW_MASK & serial_master_buffer[i]; + } + matrix_row_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + matrix_row_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += ROW_MASK & serial_slave_buffer[i]; + } + matrix_row_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + matrix_row_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += ROW_MASK & serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/bfo9000/serial.h b/keyboards/bfo9000/serial.h new file mode 100644 index 00000000000..62761945721 --- /dev/null +++ b/keyboards/bfo9000/serial.h @@ -0,0 +1,27 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include "matrix.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/bfo9000/split_util.c b/keyboards/bfo9000/split_util.c new file mode 100644 index 00000000000..7f200e6c942 --- /dev/null +++ b/keyboards/bfo9000/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init(); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/bigseries/bigseries.c b/keyboards/bigseries/bigseries.c new file mode 100755 index 00000000000..0ef84478b31 --- /dev/null +++ b/keyboards/bigseries/bigseries.c @@ -0,0 +1,26 @@ +/* +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 "bigseries.h" + +void matrix_scan_kb(void) { + // Looping keyboard code goes here + // This runs every cycle (a lot) + matrix_scan_user(); +#ifdef BACKLIGHT_ENABLE + backlight_task(); +#endif +}; diff --git a/keyboards/bigseries/bigseries.h b/keyboards/bigseries/bigseries.h new file mode 100755 index 00000000000..4a8ac1116cd --- /dev/null +++ b/keyboards/bigseries/bigseries.h @@ -0,0 +1,28 @@ +/* +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 BIGSWITCH_H +#define BIGSWITCH_H + +#include "quantum.h" + +#define KEYMAP( \ + K00 \ +) { \ + { K00 } \ +} + +#endif diff --git a/keyboards/bigseries/config.h b/keyboards/bigseries/config.h new file mode 100755 index 00000000000..3c401f563ba --- /dev/null +++ b/keyboards/bigseries/config.h @@ -0,0 +1,59 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6071 +#define DEVICE_VER 0x0002 +#define MANUFACTURER WoodKeys.click +#define PRODUCT BigSeries Single Keyboard +#define DESCRIPTION Single key board for Novelkeys Big Series Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0 } +#define MATRIX_COL_PINS { B4 } +#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 5 +#endif + +#endif diff --git a/keyboards/bigseries/keymaps/8ball/keymap.c b/keyboards/bigseries/keymaps/8ball/keymap.c new file mode 100755 index 00000000000..df4e3dde8ba --- /dev/null +++ b/keyboards/bigseries/keymaps/8ball/keymap.c @@ -0,0 +1,144 @@ +/* +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 "../../bigseries.h" + +static const char * const ANSWERS[] = { +// "Yes" answers +"It is certain\n", +"It is decidedly so\n", +"Without a doubt\n", +"Yes definitely\n", +"You may rely on it\n", +"As I see it, yes\n", +"Most likely\n", +"Outlook good\n", +"Yes\n", +"Signs point to yes\n", +// Uncertain answers, index 10 +"Reply hazy try again\n", +"Ask again later\n", +"Better not tell you now\n", +"Cannot predict now\n", +"Concentrate and ask again\n", +// "No" answers, index 15 +"Don't count on it\n", +"My reply is no\n", +"My sources say no\n", +"Outlook not so good\n", +"Very doubtful\n" +}; + +#define UNCERTAIN_BREAK 10 +#define NO_BREAK 15 +#define NUM_ANSWERS 20 +// Timeout of answer color in ms +#define ANSWER_TIMEOUT 3000 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +KEYMAP( + KC_A), +}; + + +void reset_rgb(void); + +bool initialized = 0; +uint32_t lastTime = 0; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { + if (!initialized){ + dprintf("Initializing in matrix_scan_user"); + rgblight_enable(); + reset_rgb(); + initialized = 1; + } +} + +void matrix_scan_user(void) { + if (lastTime > 0 && timer_elapsed32(lastTime) > ANSWER_TIMEOUT) { + lastTime = 0; + reset_rgb(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A: + if (record->event.pressed) { + uint8_t num = rand() / (RAND_MAX / NUM_ANSWERS + 1); + rgblight_mode(1); + if (num < UNCERTAIN_BREAK) { + rgblight_setrgb_green(); + } else if (num < NO_BREAK) { + rgblight_setrgb_yellow(); + } else { + rgblight_setrgb_red(); + } + send_string(ANSWERS[num]); + lastTime = timer_read32(); + return false; + } + } + return true; +} + +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 { + + } + +} + +void reset_rgb(void) { + // This gets called on init and after the timeout for the answer color + // If you want to change the default color/mode, do it here + rgblight_sethsv_blue(); + rgblight_mode(7); +} diff --git a/keyboards/bigseries/keymaps/default/keymap.c b/keyboards/bigseries/keymaps/default/keymap.c new file mode 100755 index 00000000000..67cfb168c24 --- /dev/null +++ b/keyboards/bigseries/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* +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 "../../bigseries.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +KEYMAP( + KC_A), + + +}; + + +bool initialized = 0; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { + if (!initialized){ + dprintf("Initializing in matrix_scan_user"); + rgblight_enable(); + rgblight_mode(7); + rgblight_sethsv(0,255,255); + rgblight_setrgb(0x00, 0x00, 0xFF); + initialized = 1; + } +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A: + if (record->event.pressed) { + SEND_STRING("Howdy!!\n"); + rgblight_step(); + return false; + } + } + return true; +} + +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 { + + } + +} diff --git a/keyboards/bigseries/keymaps/leddance/config.h b/keyboards/bigseries/keymaps/leddance/config.h new file mode 100644 index 00000000000..57398fb996b --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/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 400 + +#endif diff --git a/keyboards/bigseries/keymaps/leddance/keymap.c b/keyboards/bigseries/keymaps/leddance/keymap.c new file mode 100755 index 00000000000..4cb57f4375a --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/keymap.c @@ -0,0 +1,127 @@ +/* +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 "../../bigseries.h" +#include "print.h" + +extern rgblight_config_t rgblight_config; + +enum custom_keycodes { + BL = SAFE_RANGE +}; + +enum custom_layers { + BASE = 0, + LED +}; + +//Tap Dance Declarations +enum { + TD_TOGGLE = 0 +}; + +void dance_toggle (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 2) { + println("Double tapped, switching layers"); + if (layer_state_is(LED)) { + layer_off(LED); + } else { + layer_on(LED); + } + } else { + print("Single tapped: "); + if (layer_state_is(LED)) { +#ifdef RGBLIGHT_ENABLE + if (!rgblight_config.enable) { + rgblight_enable(); + } + rgblight_step(); +#endif + } else { + println("Base layer, sending string"); + SEND_STRING("This thing is BIG!!\n"); + } + } +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_TOGGLE] = ACTION_TAP_DANCE_FN(dance_toggle) +// Other declarations would go here, separated by commas, if you have them +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = KEYMAP( + TD(TD_TOGGLE)), +[LED] = KEYMAP( + TD(TD_TOGGLE) + ) + + +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Nothing here, see dance_toggle + return true; +} + +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 { + + } + +} diff --git a/keyboards/bigseries/keymaps/leddance/rules.mk b/keyboards/bigseries/keymaps/leddance/rules.mk new file mode 100644 index 00000000000..1ba2fa8fbef --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/bigseries/readme.md b/keyboards/bigseries/readme.md new file mode 100644 index 00000000000..dfb41566898 --- /dev/null +++ b/keyboards/bigseries/readme.md @@ -0,0 +1,15 @@ +# Big Series Keyboard + +![Big Series 1-Key](https://woodkeys.click/wp-content/uploads/2017/12/woodkeys_419.jpg) + +A PCB for the Big Series Switch by [NovelKeys](https://novelkeys.xyz). Available in 1, 2, 3, and 4 switch versions from [Woodkeys.click](https://woodkeys.click/product-category/big-series/). + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click) +Hardware Supported: Big Series PCBs +Hardware Availability: [Woodkeys.click](https://woodkeys.click), [NovelKeys](https://novelkeys.xyz) + +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 diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk new file mode 100755 index 00000000000..4cac07f7253 --- /dev/null +++ b/keyboards/bigseries/rules.mk @@ -0,0 +1,59 @@ +#SRC += rgb_backlight.c + +# MCU name +MCU = atmega32u2 + +# 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 = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # 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 +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/ca66/ca66.h b/keyboards/ca66/ca66.h index 9e3638aac31..0f91a1238df 100644 --- a/keyboards/ca66/ca66.h +++ b/keyboards/ca66/ca66.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, K114, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ diff --git a/keyboards/ca66/info.json b/keyboards/ca66/info.json new file mode 100644 index 00000000000..906709ef1b8 --- /dev/null +++ b/keyboards/ca66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "CA66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "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":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":13, "y":0}, {"x":14, "y":0}, {"x":15.5, "y":0}, {"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}, {"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":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"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}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15.5, "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}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":15.5, "y":3}, {"x":14.25, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/ca66/keymaps/default/keymap.c b/keyboards/ca66/keymaps/default/keymap.c index 7feb0afb9f5..5a3c4c86231 100644 --- a/keyboards/ca66/keymaps/default/keymap.c +++ b/keyboards/ca66/keymaps/default/keymap.c @@ -1,15 +1,15 @@ -#include "ca66.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + 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_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, 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_PGUP, KC_LSFT, KC_GRV, 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, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - 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_DEL, KC_DEL, RGB_TOG, KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME, diff --git a/keyboards/chibios_test/teensy_lc_onekey/instructions.md b/keyboards/chibios_test/teensy_lc_onekey/instructions.md index 85698bd8418..66f73bf14b8 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/instructions.md +++ b/keyboards/chibios_test/teensy_lc_onekey/instructions.md @@ -15,7 +15,7 @@ Next, you'll need ChibiOS. For Teensies, you'll need code from two repositories: ### If you’re using git -Run `git submodule sync —recursive && git submodule update --init —recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory. +Run `git submodule sync --recursive && git submodule update --init --recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory. ### If you’re not using Git diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h new file mode 100644 index 00000000000..38fed297efb --- /dev/null +++ b/keyboards/ckeys/nakey/config.h @@ -0,0 +1,190 @@ +/* +Copyright 2018 James Underwood + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER cKeys +#define PRODUCT naKey +#define DESCRIPTION The cKeys through hole ten key pad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * 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 { F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3 } +#define UNUSED_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, B4, B5, B6, B7 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* 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/ckeys/nakey/info.json b/keyboards/ckeys/nakey/info.json new file mode 100644 index 00000000000..b44d0daf741 --- /dev/null +++ b/keyboards/ckeys/nakey/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "naKey", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + } + } +} diff --git a/keyboards/ckeys/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c new file mode 100644 index 00000000000..ebbb128bd27 --- /dev/null +++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2018 James Underwood + * + * 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_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, KC_PDOT \ +), +}; + +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/ckeys/nakey/keymaps/default/readme.md b/keyboards/ckeys/nakey/keymaps/default/readme.md new file mode 100644 index 00000000000..c842dc99a76 --- /dev/null +++ b/keyboards/ckeys/nakey/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for naKey diff --git a/keyboards/ckeys/nakey/nakey.c b/keyboards/ckeys/nakey/nakey.c new file mode 100644 index 00000000000..ba2fb90ebe4 --- /dev/null +++ b/keyboards/ckeys/nakey/nakey.c @@ -0,0 +1,42 @@ +/* Copyright 2018 James Underwood + * 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 "nakey.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/ckeys/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h new file mode 100644 index 00000000000..3cbfda844de --- /dev/null +++ b/keyboards/ckeys/nakey/nakey.h @@ -0,0 +1,40 @@ +/* Copyright 2018 James Underwood + * + * 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 NAKEY_H +#define NAKEY_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ + { k40, KC_NO, k41, KC_NO }, \ +} + +#endif diff --git a/keyboards/ckeys/nakey/readme.md b/keyboards/ckeys/nakey/readme.md new file mode 100644 index 00000000000..c7250cf5064 --- /dev/null +++ b/keyboards/ckeys/nakey/readme.md @@ -0,0 +1,49 @@ +# naKey + +Firmware for custom keyboard + +Keyboard Maintainer: [James Underwood](https://github.com/ju0) +Hardware Supported: naKey +Hardware Availability: [ckeys.org](https://ckeys.org) + +To build this keyboard, follow the [build guide](https://ckeys.org/tutorials/nakey-numpad-build-guide/). + +Make example for this keyboard (after setting up your build environment): + + make ckeys/nakey: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. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the root folder. Once your dev env is setup, you'll be able to type `make ckeys/nakey:default` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +(Note: replace naKey with the name of your keyboard.) + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make ckeys/nakey:default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder. Create a `readme.md` and a `keymap.c` file to complete your new keymap. When you are done your file tree should look like this: + +* `qmk_firmware/` + * `keyboard/` + * `keymaps/` + * `config.h` (optional) + * `keymap.c` + * `readme.md` + * `rules.mk` (optional) + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make naKey-[default|jack|] +``` diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk new file mode 100644 index 00000000000..a3571e8deb0 --- /dev/null +++ b/keyboards/ckeys/nakey/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=512 + + +# 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/obelus/config.h b/keyboards/ckeys/obelus/config.h similarity index 100% rename from keyboards/obelus/config.h rename to keyboards/ckeys/obelus/config.h diff --git a/keyboards/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h similarity index 100% rename from keyboards/obelus/keymaps/default/config.h rename to keyboards/ckeys/obelus/keymaps/default/config.h diff --git a/keyboards/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c similarity index 100% rename from keyboards/obelus/keymaps/default/keymap.c rename to keyboards/ckeys/obelus/keymaps/default/keymap.c diff --git a/keyboards/obelus/keymaps/default/readme.md b/keyboards/ckeys/obelus/keymaps/default/readme.md similarity index 100% rename from keyboards/obelus/keymaps/default/readme.md rename to keyboards/ckeys/obelus/keymaps/default/readme.md diff --git a/keyboards/obelus/obelus.c b/keyboards/ckeys/obelus/obelus.c similarity index 100% rename from keyboards/obelus/obelus.c rename to keyboards/ckeys/obelus/obelus.c diff --git a/keyboards/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h similarity index 100% rename from keyboards/obelus/obelus.h rename to keyboards/ckeys/obelus/obelus.h diff --git a/keyboards/obelus/readme.md b/keyboards/ckeys/obelus/readme.md similarity index 78% rename from keyboards/obelus/readme.md rename to keyboards/ckeys/obelus/readme.md index a9d67b00e86..6767956bf9b 100644 --- a/keyboards/obelus/readme.md +++ b/keyboards/ckeys/obelus/readme.md @@ -5,15 +5,15 @@ Obelus Keyboard Maintaintainers: [Ethan Madden](https://github.com/jetpacktuxedo), [James Underwood](https://github.com/ju0) Hardware Supported: Obelus -Hardware Availability: C-Keys soldering workshops, /u/MonkeyPlusPlus +Hardware Availability: [C-Keys soldering workshops](https://ckeys.org/workshops/), [/u/MonkeyPlusPlus](https://www.reddit.com/user/monkeyplusplus) Make example for this keyboard (after setting up your build environment): - make obelus:default + make ckeys/obelus:default Or to make and flash: - make obelus:default:dfu + make ckeys/obelus:default:dfu See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) and [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk similarity index 100% rename from keyboards/obelus/rules.mk rename to keyboards/ckeys/obelus/rules.mk diff --git a/keyboards/ckeys/readme.md b/keyboards/ckeys/readme.md new file mode 100644 index 00000000000..01991d9e3fe --- /dev/null +++ b/keyboards/ckeys/readme.md @@ -0,0 +1,9 @@ +# Ckeys.org + +[ckeys](https://ckeys.org/) is a mechanical keyboard based non profit, located in Seattle, Washington. + +In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. + +* Supported Hardware + * The Obelus - 4x4 Macropad + * naKey - Through hole numpad \ No newline at end of file diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index 0aff939701b..ea3c7a6e975 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -69,6 +69,13 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define RGB_DI_PIN C6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + /* 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). */ diff --git a/keyboards/clueboard/2x1800/info.json b/keyboards/clueboard/2x1800/info.json index 74afec8232e..81ff138d930 100644 --- a/keyboards/clueboard/2x1800/info.json +++ b/keyboards/clueboard/2x1800/info.json @@ -1,12 +1,1928 @@ { - "keyboard_name": "CB 2x1800", - "url": "", - "maintainer": "skullydazed", - "width": 24, - "height": 6.5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"Home", "x":0, "y":0}, {"label":"End", "x":1, "y":0}, {"label":"PgUp", "x":2, "y":0}, {"label":"PgDn", "x":3, "y":0}, {"label":"Esc", "x":4.75, "y":0}, {"label":"F1", "x":6.25, "y":0}, {"label":"F2", "x":7.25, "y":0}, {"label":"F3", "x":8.25, "y":0}, {"label":"F4", "x":9.25, "y":0}, {"label":"F5", "x":10.75, "y":0}, {"label":"F6", "x":11.75, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15.25, "y":0}, {"label":"F10", "x":16.25, "y":0}, {"label":"F11", "x":17.25, "y":0}, {"label":"F12", "x":18.25, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"Insert", "x":23, "y":0}, {"label":"-", "x":0, "y":1.25}, {"label":"Num Lock", "x":1, "y":1.25}, {"label":"/", "x":2, "y":1.25}, {"label":"*", "x":3, "y":1.25}, {"label":"~", "x":4.5, "y":1.25}, {"label":"!", "x":5.5, "y":1.25}, {"label":"@", "x":6.5, "y":1.25}, {"label":"#", "x":7.5, "y":1.25}, {"label":"$", "x":8.5, "y":1.25}, {"label":"%", "x":9.5, "y":1.25}, {"label":"^", "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}, {"label":")", "x":14.5, "y":1.25}, {"label":"_", "x":15.5, "y":1.25}, {"label":"+", "x":16.5, "y":1.25}, {"label":"Backspace", "x":17.5, "y":1.25, "w":2}, {"label":"Num Lock", "x":20, "y":1.25}, {"label":"/", "x":21, "y":1.25}, {"label":"*", "x":22, "y":1.25}, {"label":"-", "x":23, "y":1.25}, {"label":"+", "x":0, "y":2.25, "h":2}, {"label":"7", "x":1, "y":2.25}, {"label":"8", "x":2, "y":2.25}, {"label":"9", "x":3, "y":2.25}, {"label":"Tab", "x":4.5, "y":2.25, "w":1.5}, {"label":"Q", "x":6, "y":2.25}, {"label":"W", "x":7, "y":2.25}, {"label":"E", "x":8, "y":2.25}, {"label":"R", "x":9, "y":2.25}, {"label":"T", "x":10, "y":2.25}, {"label":"Y", "x":11, "y":2.25}, {"label":"U", "x":12, "y":2.25}, {"label":"I", "x":13, "y":2.25}, {"label":"O", "x":14, "y":2.25}, {"label":"P", "x":15, "y":2.25}, {"label":"{", "x":16, "y":2.25}, {"label":"}", "x":17, "y":2.25}, {"label":"|", "x":18, "y":2.25, "w":1.5}, {"label":"7", "x":20, "y":2.25}, {"label":"8", "x":21, "y":2.25}, {"label":"9", "x":22, "y":2.25}, {"label":"+", "x":23, "y":2.25, "h":2}, {"label":"4", "x":1, "y":3.25}, {"label":"5", "x":2, "y":3.25}, {"label":"6", "x":3, "y":3.25}, {"label":"Caps Lock", "x":4.5, "y":3.25, "w":1.75}, {"label":"A", "x":6.25, "y":3.25}, {"label":"S", "x":7.25, "y":3.25}, {"label":"D", "x":8.25, "y":3.25}, {"label":"F", "x":9.25, "y":3.25}, {"label":"G", "x":10.25, "y":3.25}, {"label":"H", "x":11.25, "y":3.25}, {"label":"J", "x":12.25, "y":3.25}, {"label":"K", "x":13.25, "y":3.25}, {"label":"L", "x":14.25, "y":3.25}, {"label":":", "x":15.25, "y":3.25}, {"label":"\"", "x":16.25, "y":3.25}, {"label":"Enter", "x":17.25, "y":3.25, "w":2.25}, {"label":"4", "x":20, "y":3.25}, {"label":"5", "x":21, "y":3.25}, {"label":"6", "x":22, "y":3.25}, {"label":"Enter", "x":0, "y":4.25, "h":2}, {"label":"1", "x":1, "y":4.25}, {"label":"2", "x":2, "y":4.25}, {"label":"3", "x":3, "y":4.25}, {"label":"\u2191", "x":4.25, "y":4.5}, {"label":"Shift", "x":5.5, "y":4.25, "w":1.25}, {"label":"Z", "x":6.75, "y":4.25}, {"label":"X", "x":7.75, "y":4.25}, {"label":"C", "x":8.75, "y":4.25}, {"label":"V", "x":9.75, "y":4.25}, {"label":"B", "x":10.75, "y":4.25}, {"label":"N", "x":11.75, "y":4.25}, {"label":"M", "x":12.75, "y":4.25}, {"label":"<", "x":13.75, "y":4.25}, {"label":">", "x":14.75, "y":4.25}, {"label":"?", "x":15.75, "y":4.25}, {"label":"Shift", "x":16.75, "y":4.25, "w":1.75}, {"label":"\u2191", "x":18.75, "y":4.5}, {"label":"1", "x":20, "y":4.25}, {"label":"2", "x":21, "y":4.25}, {"label":"3", "x":22, "y":4.25}, {"label":"Enter", "x":23, "y":4.25, "h":2}, {"label":"0", "x":1, "y":5.25}, {"label":".", "x":2, "y":5.25}, {"label":"\u2190", "x":3.25, "y":5.5}, {"label":"\u2193", "x":4.25, "y":5.5}, {"label":"\u2192", "x":5.25, "y":5.5}, {"label":"Ctrl", "x":6.5, "y":5.25}, {"label":"Win", "x":7.5, "y":5.25}, {"label":"Alt", "x":8.5, "y":5.25}, {"label":"7u", "x":8.5, "y":5.25, "w":7}, {"label":"1u", "x":9.5, "y":5.25}, {"label":"4u", "x":9.5, "y":5.25, "w":4}, {"label":"1u", "x":10.5, "y":5.25}, {"label":"1u", "x":11.5, "y":5.25}, {"label":"1u", "x":12.5, "y":5.25}, {"label":"Alt", "x":13.5, "y":5.25}, {"label":"Win", "x":14.5, "y":5.25}, {"label":"Menu", "x":15.5, "y":5.25}, {"label":"Ctrl", "x":16.5, "y":5.25}, {"label":"\u2190", "x":17.75, "y":5.5}, {"label":"\u2193", "x":18.75, "y":5.5}, {"label":"\u2192", "x":19.75, "y":5.5}, {"label":"0", "x":21, "y":5.25}, {"label":".", "x":22, "y":5.25}] + "keyboard_name": "CB 2x1800", + "url": "", + "maintainer": "skullydazed", + "width": 24, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Home", + "x": 0, + "y": 0 + }, + { + "label": "End", + "x": 1, + "y": 0 + }, + { + "label": "PgUp", + "x": 2, + "y": 0 + }, + { + "label": "PgDn", + "x": 3, + "y": 0 + }, + { + "label": "Esc", + "x": 4.75, + "y": 0 + }, + { + "label": "F1", + "x": 6.25, + "y": 0 + }, + { + "label": "F2", + "x": 7.25, + "y": 0 + }, + { + "label": "F3", + "x": 8.25, + "y": 0 + }, + { + "label": "F4", + "x": 9.25, + "y": 0 + }, + { + "label": "F5", + "x": 10.75, + "y": 0 + }, + { + "label": "F6", + "x": 11.75, + "y": 0 + }, + { + "label": "F7", + "x": 12.75, + "y": 0 + }, + { + "label": "F8", + "x": 13.75, + "y": 0 + }, + { + "label": "F9", + "x": 15.25, + "y": 0 + }, + { + "label": "F10", + "x": 16.25, + "y": 0 + }, + { + "label": "F11", + "x": 17.25, + "y": 0 + }, + { + "label": "F12", + "x": 18.25, + "y": 0 + }, + { + "label": "PrtSc", + "x": 20, + "y": 0 + }, + { + "label": "Scroll Lock", + "x": 21, + "y": 0 + }, + { + "label": "Pause", + "x": 22, + "y": 0 + }, + { + "label": "Insert", + "x": 23, + "y": 0 + }, + { + "label": "-", + "x": 0, + "y": 1.25 + }, + { + "label": "Num Lock", + "x": 1, + "y": 1.25 + }, + { + "label": "/", + "x": 2, + "y": 1.25 + }, + { + "label": "*", + "x": 3, + "y": 1.25 + }, + { + "label": "~", + "x": 4.5, + "y": 1.25 + }, + { + "label": "!", + "x": 5.5, + "y": 1.25 + }, + { + "label": "@", + "x": 6.5, + "y": 1.25 + }, + { + "label": "#", + "x": 7.5, + "y": 1.25 + }, + { + "label": "$", + "x": 8.5, + "y": 1.25 + }, + { + "label": "%", + "x": 9.5, + "y": 1.25 + }, + { + "label": "^", + "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 + }, + { + "label": ")", + "x": 14.5, + "y": 1.25 + }, + { + "label": "_", + "x": 15.5, + "y": 1.25 + }, + { + "label": "+", + "x": 16.5, + "y": 1.25 + }, + { + "label": "Backspace", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "Num Lock", + "x": 20, + "y": 1.25 + }, + { + "label": "/", + "x": 21, + "y": 1.25 + }, + { + "label": "*", + "x": 22, + "y": 1.25 + }, + { + "label": "-", + "x": 23, + "y": 1.25 + }, + { + "label": "+", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "7", + "x": 1, + "y": 2.25 + }, + { + "label": "8", + "x": 2, + "y": 2.25 + }, + { + "label": "9", + "x": 3, + "y": 2.25 + }, + { + "label": "Tab", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "Q", + "x": 6, + "y": 2.25 + }, + { + "label": "W", + "x": 7, + "y": 2.25 + }, + { + "label": "E", + "x": 8, + "y": 2.25 + }, + { + "label": "R", + "x": 9, + "y": 2.25 + }, + { + "label": "T", + "x": 10, + "y": 2.25 + }, + { + "label": "Y", + "x": 11, + "y": 2.25 + }, + { + "label": "U", + "x": 12, + "y": 2.25 + }, + { + "label": "I", + "x": 13, + "y": 2.25 + }, + { + "label": "O", + "x": 14, + "y": 2.25 + }, + { + "label": "P", + "x": 15, + "y": 2.25 + }, + { + "label": "{", + "x": 16, + "y": 2.25 + }, + { + "label": "}", + "x": 17, + "y": 2.25 + }, + { + "label": "|", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "7", + "x": 20, + "y": 2.25 + }, + { + "label": "8", + "x": 21, + "y": 2.25 + }, + { + "label": "9", + "x": 22, + "y": 2.25 + }, + { + "label": "+", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "4", + "x": 1, + "y": 3.25 + }, + { + "label": "5", + "x": 2, + "y": 3.25 + }, + { + "label": "6", + "x": 3, + "y": 3.25 + }, + { + "label": "Caps Lock", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "A", + "x": 6.25, + "y": 3.25 + }, + { + "label": "S", + "x": 7.25, + "y": 3.25 + }, + { + "label": "D", + "x": 8.25, + "y": 3.25 + }, + { + "label": "F", + "x": 9.25, + "y": 3.25 + }, + { + "label": "G", + "x": 10.25, + "y": 3.25 + }, + { + "label": "H", + "x": 11.25, + "y": 3.25 + }, + { + "label": "J", + "x": 12.25, + "y": 3.25 + }, + { + "label": "K", + "x": 13.25, + "y": 3.25 + }, + { + "label": "L", + "x": 14.25, + "y": 3.25 + }, + { + "label": ":", + "x": 15.25, + "y": 3.25 + }, + { + "label": "\"", + "x": 16.25, + "y": 3.25 + }, + { + "label": "Enter", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "4", + "x": 20, + "y": 3.25 + }, + { + "label": "5", + "x": 21, + "y": 3.25 + }, + { + "label": "6", + "x": 22, + "y": 3.25 + }, + { + "label": "Enter", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "1", + "x": 1, + "y": 4.25 + }, + { + "label": "2", + "x": 2, + "y": 4.25 + }, + { + "label": "3", + "x": 3, + "y": 4.25 + }, + { + "label": "\\u2191", + "x": 4.25, + "y": 4.5 + }, + { + "label": "Shift", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "Z", + "x": 6.75, + "y": 4.25 + }, + { + "label": "X", + "x": 7.75, + "y": 4.25 + }, + { + "label": "C", + "x": 8.75, + "y": 4.25 + }, + { + "label": "V", + "x": 9.75, + "y": 4.25 + }, + { + "label": "B", + "x": 10.75, + "y": 4.25 + }, + { + "label": "N", + "x": 11.75, + "y": 4.25 + }, + { + "label": "M", + "x": 12.75, + "y": 4.25 + }, + { + "label": "<", + "x": 13.75, + "y": 4.25 + }, + { + "label": ">", + "x": 14.75, + "y": 4.25 + }, + { + "label": "?", + "x": 15.75, + "y": 4.25 + }, + { + "label": "Shift", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "\\u2191", + "x": 18.75, + "y": 4.5 + }, + { + "label": "1", + "x": 20, + "y": 4.25 + }, + { + "label": "2", + "x": 21, + "y": 4.25 + }, + { + "label": "3", + "x": 22, + "y": 4.25 + }, + { + "label": "Enter", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "0", + "x": 1, + "y": 5.25 + }, + { + "label": ".", + "x": 2, + "y": 5.25 + }, + { + "label": "\\u2190", + "x": 3.25, + "y": 5.5 + }, + { + "label": "\\u2193", + "x": 4.25, + "y": 5.5 + }, + { + "label": "\\u2192", + "x": 5.25, + "y": 5.5 + }, + { + "label": "Ctrl", + "x": 6.5, + "y": 5.25 + }, + { + "label": "Win", + "x": 7.5, + "y": 5.25 + }, + { + "label": "Alt", + "x": 8.5, + "y": 5.25 + }, + { + "label": "7u", + "x": 8.5, + "y": 5.25, + "w": 7 + }, + { + "label": "1u", + "x": 9.5, + "y": 5.25 + }, + { + "label": "4u", + "x": 9.5, + "y": 5.25, + "w": 4 + }, + { + "label": "1u", + "x": 10.5, + "y": 5.25 + }, + { + "label": "1u", + "x": 11.5, + "y": 5.25 + }, + { + "label": "1u", + "x": 12.5, + "y": 5.25 + }, + { + "label": "Alt", + "x": 13.5, + "y": 5.25 + }, + { + "label": "Win", + "x": 14.5, + "y": 5.25 + }, + { + "label": "Menu", + "x": 15.5, + "y": 5.25 + }, + { + "label": "Ctrl", + "x": 16.5, + "y": 5.25 + }, + { + "label": "\\u2190", + "x": 17.75, + "y": 5.5 + }, + { + "label": "\\u2193", + "x": 18.75, + "y": 5.5 + }, + { + "label": "\\u2192", + "x": 19.75, + "y": 5.5 + }, + { + "label": "0", + "x": 21, + "y": 5.25 + }, + { + "label": ".", + "x": 22, + "y": 5.25 } + ] + }, + "LAYOUT_7U_SPACE": { + "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.75, + "y": 0 + }, + { + "label": "k06", + "x": 6.25, + "y": 0 + }, + { + "label": "k07", + "x": 7.25, + "y": 0 + }, + { + "label": "k08", + "x": 8.25, + "y": 0 + }, + { + "label": "k09", + "x": 9.25, + "y": 0 + }, + { + "label": "k0a", + "x": 10.75, + "y": 0 + }, + { + "label": "k60", + "x": 11.75, + "y": 0 + }, + { + "label": "k61", + "x": 12.75, + "y": 0 + }, + { + "label": "k62", + "x": 13.75, + "y": 0 + }, + { + "label": "k63", + "x": 15.25, + "y": 0 + }, + { + "label": "k64", + "x": 16.25, + "y": 0 + }, + { + "label": "k65", + "x": 17.25, + "y": 0 + }, + { + "label": "k66", + "x": 18.25, + "y": 0 + }, + { + "label": "k67", + "x": 20, + "y": 0 + }, + { + "label": "k68", + "x": 21, + "y": 0 + }, + { + "label": "k69", + "x": 22, + "y": 0 + }, + { + "label": "k6a", + "x": 23, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1.25 + }, + { + "label": "k11", + "x": 1, + "y": 1.25 + }, + { + "label": "k12", + "x": 2, + "y": 1.25 + }, + { + "label": "k13", + "x": 3, + "y": 1.25 + }, + { + "label": "k14", + "x": 4.5, + "y": 1.25 + }, + { + "label": "k15", + "x": 5.5, + "y": 1.25 + }, + { + "label": "k16", + "x": 6.5, + "y": 1.25 + }, + { + "label": "k17", + "x": 7.5, + "y": 1.25 + }, + { + "label": "k18", + "x": 8.5, + "y": 1.25 + }, + { + "label": "k19", + "x": 9.5, + "y": 1.25 + }, + { + "label": "k0a", + "x": 10.5, + "y": 1.25 + }, + { + "label": "k70", + "x": 11.5, + "y": 1.25 + }, + { + "label": "k71", + "x": 12.5, + "y": 1.25 + }, + { + "label": "k72", + "x": 13.5, + "y": 1.25 + }, + { + "label": "k73", + "x": 14.5, + "y": 1.25 + }, + { + "label": "k74", + "x": 15.5, + "y": 1.25 + }, + { + "label": "k75", + "x": 16.5, + "y": 1.25 + }, + { + "label": "k76", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "k77", + "x": 20, + "y": 1.25 + }, + { + "label": "k78", + "x": 21, + "y": 1.25 + }, + { + "label": "k79", + "x": 22, + "y": 1.25 + }, + { + "label": "k7a", + "x": 23, + "y": 1.25 + }, + { + "label": "k20", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "k21", + "x": 1, + "y": 2.25 + }, + { + "label": "k22", + "x": 2, + "y": 2.25 + }, + { + "label": "k23", + "x": 3, + "y": 2.25 + }, + { + "label": "k24", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k25", + "x": 6, + "y": 2.25 + }, + { + "label": "k26", + "x": 7, + "y": 2.25 + }, + { + "label": "k27", + "x": 8, + "y": 2.25 + }, + { + "label": "k28", + "x": 9, + "y": 2.25 + }, + { + "label": "k29", + "x": 10, + "y": 2.25 + }, + { + "label": "k2a", + "x": 11, + "y": 2.25 + }, + { + "label": "k80", + "x": 12, + "y": 2.25 + }, + { + "label": "k81", + "x": 13, + "y": 2.25 + }, + { + "label": "k82", + "x": 14, + "y": 2.25 + }, + { + "label": "k83", + "x": 15, + "y": 2.25 + }, + { + "label": "k84", + "x": 16, + "y": 2.25 + }, + { + "label": "k85", + "x": 17, + "y": 2.25 + }, + { + "label": "k86", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k87", + "x": 20, + "y": 2.25 + }, + { + "label": "k88", + "x": 21, + "y": 2.25 + }, + { + "label": "k89", + "x": 22, + "y": 2.25 + }, + { + "label": "k8a", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "k31", + "x": 1, + "y": 3.25 + }, + { + "label": "k32", + "x": 2, + "y": 3.25 + }, + { + "label": "k33", + "x": 3, + "y": 3.25 + }, + { + "label": "k34", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "k35", + "x": 6.25, + "y": 3.25 + }, + { + "label": "k36", + "x": 7.25, + "y": 3.25 + }, + { + "label": "k37", + "x": 8.25, + "y": 3.25 + }, + { + "label": "k38", + "x": 9.25, + "y": 3.25 + }, + { + "label": "k39", + "x": 10.25, + "y": 3.25 + }, + { + "label": "k3a", + "x": 11.25, + "y": 3.25 + }, + { + "label": "k90", + "x": 12.25, + "y": 3.25 + }, + { + "label": "k91", + "x": 13.25, + "y": 3.25 + }, + { + "label": "k92", + "x": 14.25, + "y": 3.25 + }, + { + "label": "k93", + "x": 15.25, + "y": 3.25 + }, + { + "label": "k94", + "x": 16.25, + "y": 3.25 + }, + { + "label": "k95", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "k97", + "x": 20, + "y": 3.25 + }, + { + "label": "k98", + "x": 21, + "y": 3.25 + }, + { + "label": "k99", + "x": 22, + "y": 3.25 + }, + { + "label": "k40", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "k41", + "x": 1, + "y": 4.25 + }, + { + "label": "k42", + "x": 2, + "y": 4.25 + }, + { + "label": "k43", + "x": 3, + "y": 4.25 + }, + { + "label": "k45", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "k46", + "x": 6.75, + "y": 4.25 + }, + { + "label": "k47", + "x": 7.75, + "y": 4.25 + }, + { + "label": "k48", + "x": 8.75, + "y": 4.25 + }, + { + "label": "k49", + "x": 9.75, + "y": 4.25 + }, + { + "label": "k4a", + "x": 10.75, + "y": 4.25 + }, + { + "label": "ka0", + "x": 11.75, + "y": 4.25 + }, + { + "label": "ka1", + "x": 12.75, + "y": 4.25 + }, + { + "label": "ka2", + "x": 13.75, + "y": 4.25 + }, + { + "label": "ka3", + "x": 14.75, + "y": 4.25 + }, + { + "label": "ka4", + "x": 15.75, + "y": 4.25 + }, + { + "label": "ka5", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "ka7", + "x": 20, + "y": 4.25 + }, + { + "label": "ka8", + "x": 21, + "y": 4.25 + }, + { + "label": "ka9", + "x": 22, + "y": 4.25 + }, + { + "label": "kaa", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "k44", + "x": 4.25, + "y": 4.5 + }, + { + "label": "k96", + "x": 18.75, + "y": 4.5 + }, + { + "label": "k51", + "x": 1, + "y": 5.25 + }, + { + "label": "k52", + "x": 2, + "y": 5.25 + }, + { + "label": "k56", + "x": 6.5, + "y": 5.25 + }, + { + "label": "k57", + "x": 7.5, + "y": 5.25 + }, + { + "label": "kb0", + "x": 8.5, + "y": 5.25, + "w": 7 + }, + { + "label": "kb4", + "x": 15.5, + "y": 5.25 + }, + { + "label": "kb5", + "x": 16.5, + "y": 5.25 + }, + { + "label": "kb8", + "x": 21, + "y": 5.25 + }, + { + "label": "kb9", + "x": 22, + "y": 5.25 + }, + { + "label": "k53", + "x": 3.25, + "y": 5.5 + }, + { + "label": "k54", + "x": 4.25, + "y": 5.5 + }, + { + "label": "k55", + "x": 5.25, + "y": 5.5 + }, + { + "label": "ka6", + "x": 17.75, + "y": 5.5 + }, + { + "label": "kb6", + "x": 18.75, + "y": 5.5 + }, + { + "label": "kb7", + "x": 19.75, + "y": 5.5 + } + ] + }, + "LAYOUT_4U_SPACE": { + "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.75, + "y": 0 + }, + { + "label": "k06", + "x": 6.25, + "y": 0 + }, + { + "label": "k07", + "x": 7.25, + "y": 0 + }, + { + "label": "k08", + "x": 8.25, + "y": 0 + }, + { + "label": "k09", + "x": 9.25, + "y": 0 + }, + { + "label": "k0a", + "x": 10.75, + "y": 0 + }, + { + "label": "k60", + "x": 11.75, + "y": 0 + }, + { + "label": "k61", + "x": 12.75, + "y": 0 + }, + { + "label": "k62", + "x": 13.75, + "y": 0 + }, + { + "label": "k63", + "x": 15.25, + "y": 0 + }, + { + "label": "k64", + "x": 16.25, + "y": 0 + }, + { + "label": "k65", + "x": 17.25, + "y": 0 + }, + { + "label": "k66", + "x": 18.25, + "y": 0 + }, + { + "label": "k67", + "x": 20, + "y": 0 + }, + { + "label": "k68", + "x": 21, + "y": 0 + }, + { + "label": "k69", + "x": 22, + "y": 0 + }, + { + "label": "k6a", + "x": 23, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1.25 + }, + { + "label": "k11", + "x": 1, + "y": 1.25 + }, + { + "label": "k12", + "x": 2, + "y": 1.25 + }, + { + "label": "k13", + "x": 3, + "y": 1.25 + }, + { + "label": "k14", + "x": 4.5, + "y": 1.25 + }, + { + "label": "k15", + "x": 5.5, + "y": 1.25 + }, + { + "label": "k16", + "x": 6.5, + "y": 1.25 + }, + { + "label": "k17", + "x": 7.5, + "y": 1.25 + }, + { + "label": "k18", + "x": 8.5, + "y": 1.25 + }, + { + "label": "k19", + "x": 9.5, + "y": 1.25 + }, + { + "label": "k0a", + "x": 10.5, + "y": 1.25 + }, + { + "label": "k70", + "x": 11.5, + "y": 1.25 + }, + { + "label": "k71", + "x": 12.5, + "y": 1.25 + }, + { + "label": "k72", + "x": 13.5, + "y": 1.25 + }, + { + "label": "k73", + "x": 14.5, + "y": 1.25 + }, + { + "label": "k74", + "x": 15.5, + "y": 1.25 + }, + { + "label": "k75", + "x": 16.5, + "y": 1.25 + }, + { + "label": "k76", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "k77", + "x": 20, + "y": 1.25 + }, + { + "label": "k78", + "x": 21, + "y": 1.25 + }, + { + "label": "k79", + "x": 22, + "y": 1.25 + }, + { + "label": "k7a", + "x": 23, + "y": 1.25 + }, + { + "label": "k20", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "k21", + "x": 1, + "y": 2.25 + }, + { + "label": "k22", + "x": 2, + "y": 2.25 + }, + { + "label": "k23", + "x": 3, + "y": 2.25 + }, + { + "label": "k24", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k25", + "x": 6, + "y": 2.25 + }, + { + "label": "k26", + "x": 7, + "y": 2.25 + }, + { + "label": "k27", + "x": 8, + "y": 2.25 + }, + { + "label": "k28", + "x": 9, + "y": 2.25 + }, + { + "label": "k29", + "x": 10, + "y": 2.25 + }, + { + "label": "k2a", + "x": 11, + "y": 2.25 + }, + { + "label": "k80", + "x": 12, + "y": 2.25 + }, + { + "label": "k81", + "x": 13, + "y": 2.25 + }, + { + "label": "k82", + "x": 14, + "y": 2.25 + }, + { + "label": "k83", + "x": 15, + "y": 2.25 + }, + { + "label": "k84", + "x": 16, + "y": 2.25 + }, + { + "label": "k85", + "x": 17, + "y": 2.25 + }, + { + "label": "k86", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k87", + "x": 20, + "y": 2.25 + }, + { + "label": "k88", + "x": 21, + "y": 2.25 + }, + { + "label": "k89", + "x": 22, + "y": 2.25 + }, + { + "label": "k8a", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "k31", + "x": 1, + "y": 3.25 + }, + { + "label": "k32", + "x": 2, + "y": 3.25 + }, + { + "label": "k33", + "x": 3, + "y": 3.25 + }, + { + "label": "k34", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "k35", + "x": 6.25, + "y": 3.25 + }, + { + "label": "k36", + "x": 7.25, + "y": 3.25 + }, + { + "label": "k37", + "x": 8.25, + "y": 3.25 + }, + { + "label": "k38", + "x": 9.25, + "y": 3.25 + }, + { + "label": "k39", + "x": 10.25, + "y": 3.25 + }, + { + "label": "k3a", + "x": 11.25, + "y": 3.25 + }, + { + "label": "k90", + "x": 12.25, + "y": 3.25 + }, + { + "label": "k91", + "x": 13.25, + "y": 3.25 + }, + { + "label": "k92", + "x": 14.25, + "y": 3.25 + }, + { + "label": "k93", + "x": 15.25, + "y": 3.25 + }, + { + "label": "k94", + "x": 16.25, + "y": 3.25 + }, + { + "label": "k95", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "k97", + "x": 20, + "y": 3.25 + }, + { + "label": "k98", + "x": 21, + "y": 3.25 + }, + { + "label": "k99", + "x": 22, + "y": 3.25 + }, + { + "label": "k40", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "k41", + "x": 1, + "y": 4.25 + }, + { + "label": "k42", + "x": 2, + "y": 4.25 + }, + { + "label": "k43", + "x": 3, + "y": 4.25 + }, + { + "label": "k45", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "k46", + "x": 6.75, + "y": 4.25 + }, + { + "label": "k47", + "x": 7.75, + "y": 4.25 + }, + { + "label": "k48", + "x": 8.75, + "y": 4.25 + }, + { + "label": "k49", + "x": 9.75, + "y": 4.25 + }, + { + "label": "k4a", + "x": 10.75, + "y": 4.25 + }, + { + "label": "ka0", + "x": 11.75, + "y": 4.25 + }, + { + "label": "ka1", + "x": 12.75, + "y": 4.25 + }, + { + "label": "ka2", + "x": 13.75, + "y": 4.25 + }, + { + "label": "ka3", + "x": 14.75, + "y": 4.25 + }, + { + "label": "ka4", + "x": 15.75, + "y": 4.25 + }, + { + "label": "ka5", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "ka7", + "x": 20, + "y": 4.25 + }, + { + "label": "ka8", + "x": 21, + "y": 4.25 + }, + { + "label": "ka9", + "x": 22, + "y": 4.25 + }, + { + "label": "kaa", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "k44", + "x": 4.25, + "y": 4.5 + }, + { + "label": "k96", + "x": 18.75, + "y": 4.5 + }, + { + "label": "k51", + "x": 1, + "y": 5.25 + }, + { + "label": "k52", + "x": 2, + "y": 5.25 + }, + { + "label": "k56", + "x": 6.5, + "y": 5.25 + }, + { + "label": "k57", + "x": 7.5, + "y": 5.25 + }, + { + "label": "k58", + "x": 8.5, + "y": 5.25 + }, + { + "label": "kb0", + "x": 9.5, + "y": 5.25, + "w": 4 + }, + { + "label": "kb2", + "x": 13.5, + "y": 5.25 + }, + { + "label": "kb3", + "x": 14.5, + "y": 5.25 + }, + { + "label": "kb4", + "x": 15.5, + "y": 5.25 + }, + { + "label": "kb5", + "x": 16.5, + "y": 5.25 + }, + { + "label": "kb8", + "x": 21, + "y": 5.25 + }, + { + "label": "kb9", + "x": 22, + "y": 5.25 + }, + { + "label": "k53", + "x": 3.25, + "y": 5.5 + }, + { + "label": "k54", + "x": 4.25, + "y": 5.5 + }, + { + "label": "k55", + "x": 5.25, + "y": 5.5 + }, + { + "label": "ka6", + "x": 17.75, + "y": 5.5 + }, + { + "label": "kb6", + "x": 18.75, + "y": 5.5 + }, + { + "label": "kb7", + "x": 19.75, + "y": 5.5 + } + ] } + } } diff --git a/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c b/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c index 5df6fe0fbf6..74a35c27b5b 100644 --- a/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c @@ -17,12 +17,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_7U_SPACE( - KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_INS, \ + KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_DEL, \ \ KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_PPLS, KC_P7, KC_P8, KC_P9, 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_P7, KC_P8, KC_P9, KC_PSLS, \ KC_P4, KC_P5, KC_P6, 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_P4, KC_P5, KC_P6, \ - KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, 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_P1, KC_P2, KC_P3, KC_PENT, \ KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ ) }; + + +#ifdef AUDIO_ENABLE + float song_one_up[][2] = SONG(ONE_UP_SOUND); +#endif + +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) > 500) { + runonce = false; +#ifdef AUDIO_ENABLE + PLAY_SONG(song_one_up); +#endif + } +} diff --git a/keyboards/clueboard/2x1800/rules.mk b/keyboards/clueboard/2x1800/rules.mk index 2f09f9b9ca6..516a536f6b1 100644 --- a/keyboards/clueboard/2x1800/rules.mk +++ b/keyboards/clueboard/2x1800/rules.mk @@ -59,5 +59,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode -AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = no # RGB on port C6 +AUDIO_ENABLE = no # Audio output on port C4 and B7 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/converter/ibm_terminal/matrix.c b/keyboards/converter/ibm_terminal/matrix.c index 9d717b61f53..caa0a380510 100644 --- a/keyboards/converter/ibm_terminal/matrix.c +++ b/keyboards/converter/ibm_terminal/matrix.c @@ -108,7 +108,7 @@ uint8_t matrix_scan(void) state = RESET; } break; - // after reset receive keyboad ID(2 bytes) + // after reset receive keyboard ID(2 bytes) case KBD_ID0: if (code) { state = KBD_ID1; diff --git a/keyboards/cu75/cu75.h b/keyboards/cu75/cu75.h index 250217d9db0..eaa22a3866c 100644 --- a/keyboards/cu75/cu75.h +++ b/keyboards/cu75/cu75.h @@ -110,8 +110,8 @@ void click(uint16_t freq, uint16_t duration); #define LAYOUT_iso( \ k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k3D, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2E, k3F, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ ) { \ diff --git a/keyboards/dilly/keymaps/pletcher/config.h b/keyboards/dilly/keymaps/pletcher/config.h new file mode 100644 index 00000000000..805bef41881 --- /dev/null +++ b/keyboards/dilly/keymaps/pletcher/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define AUTO_SHIFT_TIMEOUT 150 +#define NO_AUTO_SHIFT_SPECIAL +#define NO_AUTO_SHIFT_NUMERIC +#define USB_MAX_POWER_CONSUMPTION 50 + +#endif diff --git a/keyboards/dilly/keymaps/pletcher/keymap.c b/keyboards/dilly/keymaps/pletcher/keymap.c new file mode 100644 index 00000000000..f91dabee76a --- /dev/null +++ b/keyboards/dilly/keymaps/pletcher/keymap.c @@ -0,0 +1,97 @@ +#include "dilly.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 +#define _FN4 4 +#define _FN5 5 + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +// Tap-Hold keys +#define KC_F_L3 LT(_FN3, KC_F) +#define KC_ZCTL MT(MOD_LCTL, KC_Z) +#define KC_XALT MT(MOD_LALT, KC_X) +#define KC_CGUI MT(MOD_LGUI, KC_C) +#define KC_V_L4 LT(_FN4, KC_V) +#define KC_SPL2 LT(_FN2, KC_SPC) +#define KC_B_L1 LT(_FN1, KC_B) +#define KC_N_L5 LT(_FN5, KC_N) +#define KC_MALT MT(MOD_RALT, KC_M) +#define KC_BSCT MT(MOD_RCTL, KC_BSPC) +#define KC_ENTS MT(MOD_RSFT, KC_ENT) +#define KC_ESCS MT(MOD_RSFT, KC_ESC) + +#define KC_GUIC LGUI(KC_C) + +#define KC_RST RESET +#define KC_DBUG DEBUG + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + Q , W , E , R , T , Y , U , I , O , P , + //|----+----+----+----+----+----+----+----+----+----| + A , S , D ,F_L3, G , H , J , K , L ,ESCS, + //|----+----+----+----+----+----+----+----+----+----| + ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , + //|----+----+----+----+----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, + //|----+----+----+----+----+----+----+----+----+----| + F11 ,F12 , , , , , , , ,GRV , + //|----+----+----+----+----+----+----+----+----+----| + , , , ,TAB , DEL, , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN3] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT, + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN4] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , , LT , GT ,QUES,COLN,DQUO, + //|----+----+----+----+----+----+----+----+----+----| + , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN5] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----. + , , ,RST , , ,MSTP,VOLD,VOLU,MPLY, + //|----+----+----+----+----+----+----+----+----+----| + , ,DBUG, , , , ,ASDN,ASUP,ASRP, + //|----+----+----+----+----+----+----+----+----+----| + , ,GUIC, , , , , , ,ASTG + //`----+----+----+----+----+----+----+----+----+----' + ) + +}; diff --git a/keyboards/dilly/keymaps/pletcher/rules.mk b/keyboards/dilly/keymaps/pletcher/rules.mk new file mode 100644 index 00000000000..9b9dd8341b6 --- /dev/null +++ b/keyboards/dilly/keymaps/pletcher/rules.mk @@ -0,0 +1,2 @@ +AUTO_SHIFT_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 0ebf8d212e4..b86e5fb8da1 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -77,5 +77,19 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } +#define 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index b39bdb000f1..c5c6182bfc6 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -23,6 +23,10 @@ "LAYOUT_directional": { "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":"Del", "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}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "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_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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "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}] } } } diff --git a/keyboards/dz60/keymaps/256k_HHKB/README.md b/keyboards/dz60/keymaps/256k_HHKB/README.md index cd045a40d64..4241ca1ba7c 100644 --- a/keyboards/dz60/keymaps/256k_HHKB/README.md +++ b/keyboards/dz60/keymaps/256k_HHKB/README.md @@ -3,6 +3,21 @@ this is my personal layer that i use on my Tina-C HHKB layout board with a DZ60 PCB. --- +UPDATE (4-20-2018): +=== +after a week of using this layout i reazlied that having the ALT button on the right side and the ALTFN layer trigger on the left isn't ideal...i still wanted to change the default HHKB style CROSS arrow cluster into a reversed T cluster since im more used to that so i swapped the ALTFN layer to the right side and the normal ALT layer is back on the left side. so now i can use the arrow cluster (which i shifted one key over to the right) with 1 hand. + +it feels more nataural to me this way. + +also i decided to change the mouse scroll keys on the mouse layer to mouse movement keys... the scrolling wasn't working out as well as i'd hoped. again, this is merely an experimental layer just to play around with mouse control. + + + + +--- + +Walkthrough: +--- there is 1 base layer and 4 modifyer layers: @@ -21,7 +36,7 @@ BASE: * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | * |-----------------------------------------------------------------------------------------+ - * | Win | Alt | Space | Alt | LIGHTS | + * | Win | Alt | Space | ALTFN | LIGHTS | * `-----------------------------------------------------------------------------------------' */ ``` @@ -37,9 +52,9 @@ BASE: * ,--------------------------------------------------------------------------------------------------------------------- * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | UP | MUTE | V_DEC | V_INC | DEL | + * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | UP | V_DEC | V_INC | DEL | * |---------------------------------------------------------------------------------------------------------------------+ - * | CTRL | _ | _ | _ | _ | _ | _ | HOME | LEFT | DOWN | RIGHT | END | _ | + * | CTRL | _ | _ | _ | _ | _ | _ | HOME | END | LEFT | DOWN | RIGHT | _ | * |---------------------------------------------------------------------------------------------------------------------+ * | Shift | _ | _ | _ | _ | _ | _ | _ | PREV | NEXT | PLAY | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ @@ -61,14 +76,14 @@ also another benefit is that a lot of mice do not have horizontal control button (This layer is still experimental so i might change it later or modify it but so far i enjoy it) ``` -/* MOUSEFN LAYER + /* MOUSEFN LAYER * * ,--------------------------------------------------------------------------------------------------------------------- * | | ACC_1 | ACC_2 | ACC_3 | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ | _ | + * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CTRL | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ | _ | + * | CTRL | _ | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ | * |---------------------------------------------------------------------------------------------------------------------+ * | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ @@ -110,4 +125,4 @@ also another benefit is that a lot of mice do not have horizontal control button */ ``` - \ No newline at end of file + diff --git a/keyboards/dz60/keymaps/256k_HHKB/keymap.c b/keyboards/dz60/keymaps/256k_HHKB/keymap.c index 42b9f88639d..e870a688d4f 100644 --- a/keyboards/dz60/keymaps/256k_HHKB/keymap.c +++ b/keyboards/dz60/keymaps/256k_HHKB/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), - KC_LGUI, MO(_ALTFN), KC_SPC, KC_RALT, MO(_LIGHTS)), + KC_LGUI, KC_LALT, KC_SPC, MO(_ALTFN), MO(_LIGHTS)), @@ -46,9 +46,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------------------------------------------------------------------------- * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | UP | MUTE | V_DEC | V_INC | DEL | + * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | UP | V_DEC | V_INC | DEL | * |---------------------------------------------------------------------------------------------------------------------+ - * | CTRL | _ | _ | _ | _ | _ | _ | HOME | LEFT | DOWN | RIGHT | END | _ | + * | CTRL | _ | _ | _ | _ | _ | _ | HOME | END | LEFT | DOWN | RIGHT | _ | * |---------------------------------------------------------------------------------------------------------------------+ * | Shift | _ | _ | _ | _ | _ | _ | _ | PREV | NEXT | PLAY | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ @@ -59,8 +59,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ALTFN] = LAYOUT_hhkb( MO(_MOUSEFN), 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_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, - ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ______, + KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, KC_VOLD, KC_VOLU, KC_DEL, + ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______, ______, ______, ______, ______, ______), @@ -75,9 +75,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------------------------------------------------------------------------- * | | ACC_1 | ACC_2 | ACC_3 | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ | _ | + * | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ - * | CTRL | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ | _ | + * | CTRL | _ | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ | * |---------------------------------------------------------------------------------------------------------------------+ * | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | * |---------------------------------------------------------------------------------------------------------------------+ @@ -89,8 +89,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSEFN] = LAYOUT_hhkb( ______, KC_ACL0, KC_ACL1, KC_ACL2, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_WH_U, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, KC_WH_L, KC_WH_D, KC_WH_R, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_UP, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/README.md b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/README.md new file mode 100644 index 00000000000..3a4218a7c21 --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/README.md @@ -0,0 +1,33 @@ +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Cmd | Alt | Space | RAlt | FN | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 FN Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | +|-----------------------------------------------------------------------------------------+ +| | BL T| BL M| BL+ | BL- | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +`FN`+`ESC`=backtick +`Shift`+`ESC`=`˜` diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c new file mode 100644 index 00000000000..76804670c87 --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c @@ -0,0 +1,86 @@ +#include QMK_KEYBOARD_H + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Cmd | Alt | Space | RAlt | FN | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_2_shifts( + 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, + 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | BL T| BL M| BL+ | BL- | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + 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, RESET, + ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, + ______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ), +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/dz60/keymaps/default/keymap.c b/keyboards/dz60/keymaps/default/keymap.c index ed91cc37739..8d5d1ecb397 100644 --- a/keyboards/dz60/keymaps/default/keymap.c +++ b/keyboards/dz60/keymaps/default/keymap.c @@ -59,3 +59,11 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { break; } } + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } +} diff --git a/keyboards/dz60/keymaps/eric/keymap.c b/keyboards/dz60/keymaps/eric/keymap.c new file mode 100644 index 00000000000..56abcc25fe8 --- /dev/null +++ b/keyboards/dz60/keymaps/eric/keymap.c @@ -0,0 +1,92 @@ +#include "dz60.h" + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Layer 0 +* ,-----------------------------------------------------------------------------------------. +* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ~ | +* |-----------------------------------------------------------------------------------------+ +* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc | +* |-----------------------------------------------------------------------------------------+ +* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +* |-----------------------------------------------------------------------------------------+ +* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn | +* |-----------------------------------------------------------------------------------------+ +* | Caps | GUI | Alt | Space | Alt | GUI | Ctrl | +* `-----------------------------------------------------------------------------------------' +*/ + + 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_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_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_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL), + + + + /* Layer 1 +* ,-----------------------------------------------------------------------------------------. +* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INS | Del | +* |-----------------------------------------------------------------------------------------+ +* | | PGUP | UP | PGDN | HOME | & | ~ | | | | Prnt | UP | Del | Bkspc | +* |-----------------------------------------------------------------------------------------+ +* | | LEFT | DWN | RGHT | END | * | | | PGUP | HOME | LEFT | RGHT | | +* |-----------------------------------------------------------------------------------------+ +* | | _ | + | ( | ) | | | | | PGDN | END | DWN | | | +* |-----------------------------------------------------------------------------------------+ +* | | | | | | | | +* `-----------------------------------------------------------------------------------------' +*/ + + + LAYOUT( + KC_CAPS, 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_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + RESET, KC_A, 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, 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), +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC) +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/README.md b/keyboards/dz60/keymaps/iso_vim_arrow/README.md new file mode 100644 index 00000000000..7e4ea7e6cc1 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow/README.md @@ -0,0 +1,6 @@ +# ISO layout with VIM style arrow cluster + +This layout is ISO-DE and similar to a standard 60 ISO layout. There are vim style arrow keys on the function layer and in the bottom right corner of the main layer. + +![Layout](https://i.imgur.com/Wu8VT43.png) + diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c new file mode 100644 index 00000000000..4cdb505607a --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* ISO VIM arrow +* ,-----------------------------------------------------------------------------------------. +* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | +* |-----------------------------------------------------------------------------------------+ +* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | +* |-------------------------------------------------------------------------------------| + +* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | +* |-----------------------------------------------------------------------------------------+ +* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | +* |-----------------------------------------------------------------------------------------+ +* | LCtrl | LGUI | LAlt | Space | RAlt | Left | Down | Up | Right | +* `-----------------------------------------------------------------------------------------' +*/ + 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_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, + 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_NUBS, 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, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + + + 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_NO, KC_DEL, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_DEL, KC_NO, + KC_LSFT, BL_TOGG, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_BSPC, KC_BSPC, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END), + +}; + +enum function_id { + SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk b/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk new file mode 100644 index 00000000000..b5f45d7aa89 --- /dev/null +++ b/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk @@ -0,0 +1,15 @@ +# Build Options +# comment out to disable the options. +# +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 +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 = no +AUTO_SHIFT_ENABLE = no # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted +TAP_DANCE_ENABLE = no diff --git a/keyboards/dz60/keymaps/model42/readme.md b/keyboards/dz60/keymaps/model42/readme.md index af840750684..04fa11aad57 100644 --- a/keyboards/dz60/keymaps/model42/readme.md +++ b/keyboards/dz60/keymaps/model42/readme.md @@ -4,7 +4,7 @@ ### Layer 0 -![layer 0](https://imgur.com/bOiQI69.png) +![layer 0](https://imgur.com/gELh7Se.png) Conventional ANSI layout. Except: - Backspace has been replaced with 2 keys @@ -27,7 +27,7 @@ RGB underglow and backlight controls, Reset ### Layer 2 -![layer 1](https://imgur.com/gELh7Se.png) +![layer 2](https://imgur.com/bOiQI69.png) F1-F12, PGUP -> HOME, PGDN -> END ### Layer 3 diff --git a/keyboards/eagle_viper/v2/v2.h b/keyboards/eagle_viper/v2/v2.h index 63e52690fa6..ce8ca028f19 100644 --- a/keyboards/eagle_viper/v2/v2.h +++ b/keyboards/eagle_viper/v2/v2.h @@ -32,7 +32,7 @@ { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O } \ } -#define LAYOUT_eagle( \ +#define LAYOUT_60_ansi( \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2O, \ @@ -74,3 +74,5 @@ { KC_NO, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, KC_NO, KC_NO, K0M, K0N, KC_NO } \ } #endif + +#define LAYOUT_eagle LAYOUT_60_ansi diff --git a/keyboards/ergo42/keymaps/default-macOS/config.h b/keyboards/ergo42/keymaps/biacco-macOS/config.h similarity index 100% rename from keyboards/ergo42/keymaps/default-macOS/config.h rename to keyboards/ergo42/keymaps/biacco-macOS/config.h diff --git a/keyboards/ergo42/keymaps/default-macOS/keymap.c b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c similarity index 100% rename from keyboards/ergo42/keymaps/default-macOS/keymap.c rename to keyboards/ergo42/keymaps/biacco-macOS/keymap.c diff --git a/keyboards/ergo42/keymaps/default-macOS/rules.mk b/keyboards/ergo42/keymaps/biacco-macOS/rules.mk similarity index 100% rename from keyboards/ergo42/keymaps/default-macOS/rules.mk rename to keyboards/ergo42/keymaps/biacco-macOS/rules.mk diff --git a/keyboards/ergo42/keymaps/biacco/config.h b/keyboards/ergo42/keymaps/biacco/config.h new file mode 100644 index 00000000000..5a6261c4f7c --- /dev/null +++ b/keyboards/ergo42/keymaps/biacco/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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#endif diff --git a/keyboards/ergo42/keymaps/biacco/keymap.c b/keyboards/ergo42/keymaps/biacco/keymap.c new file mode 100644 index 00000000000..704cd47e1fe --- /dev/null +++ b/keyboards/ergo42/keymaps/biacco/keymap.c @@ -0,0 +1,98 @@ +#include "ergo42.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define BASE 0 +#define META 1 +#define SYMB 2 +#define GAME 3 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* BASE + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + +[BASE] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ +), + +/* META + * ,------------------------------------------------. ,------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + +[META] = KEYMAP( \ + 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ +), + +/* SYMB + * ,------------------------------------------------. ,------------------------------------------------. + * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | | | | | | ( | | ) | | | | | + | * | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | | | | | | { | | } | | | < | > | ? | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + +[SYMB] = KEYMAP( \ + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* GAME + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | | | | | |Space | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ +[GAME] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ +) + +}; + diff --git a/keyboards/ergo42/keymaps/biacco/rules.mk b/keyboards/ergo42/keymaps/biacco/rules.mk new file mode 100644 index 00000000000..457a3d01d4a --- /dev/null +++ b/keyboards/ergo42/keymaps/biacco/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index 704cd47e1fe..c06cda5db6a 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -17,82 +17,59 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * | ESC | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | Bksp | * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * | Del | RCtrl| A | S | D | F | G | | H | J | K | L | ; | ] | Enter| * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * | SYMB | LSft | Z | X | C | V | B | | N | M | , | . | / | UP | RSft | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| * `------------------------------------------------' `------------------------------------------------' */ [BASE] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + 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_BSPC, \ + KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ + MO(SYMB), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ + MO(META), KC_LCTL, KC_GRV, KC_BSLS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_QUOT, KC_MINS, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* META * ,------------------------------------------------. ,------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | + * | Reset| 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | + * | Del | F1 | |Muhen | Henk | | | | Left | Down | Up |Right | | | Enter| * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | + * | SYMB | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | | | | * `------------------------------------------------' `------------------------------------------------' */ [META] = KEYMAP( \ - 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_LBRC), S(KC_RBRC), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX \ ), /* SYMB * ,------------------------------------------------. ,------------------------------------------------. - * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | + * | ESC | ! | @ | # | $ | % | [ | | ] | ^ | & | * | ( | ) | Bksp | * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | | | | | | ( | | ) | | | | | + | * | + * | Del | | | | | | ( | | ) | | | | | | Enter| * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | | | | | | { | | } | | | < | > | ? | \ | + * | SYMB | | | | | | { | | } | | | | | UP | Sft | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| * `------------------------------------------------' `------------------------------------------------' */ [SYMB] = KEYMAP( \ - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* GAME - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | | | | | |Space | | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ -[GAME] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), KC_LBRC, KC_RBRC, S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_9), S(KC_0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_LBRC), S(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) - }; diff --git a/keyboards/ergo42/keymaps/hdbx/config.h b/keyboards/ergo42/keymaps/hdbx/config.h new file mode 100644 index 00000000000..39be7526ae7 --- /dev/null +++ b/keyboards/ergo42/keymaps/hdbx/config.h @@ -0,0 +1,48 @@ +/* +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 120 +#define TAPPING_TOGGLE 3 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c new file mode 100644 index 00000000000..8b3df3f4aba --- /dev/null +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -0,0 +1,192 @@ +// WindowsでJIS配列として認識しているときに、US配列として使うためのキーマップ +// @leopard_gecko さんがPlanck用に作成されたキーマップをかなり参考にしています。 + +#include "ergo42.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "keymap_jp.h" // qmk_firmware-master/quantum/keymap_extras/keymap_jp.h 日本語キーボード設定用 +#include // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避 + +extern keymap_config_t keymap_config; + +// レイヤー +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _GAME 3 +#define _ADJUST 4 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, // デフォルトレイヤー用 + MCR1, // マクロ1 + MCR2, // マクロ2 + MCR3, // マクロ3 + DYNAMIC_MACRO_RANGE, // ダイナミックマクロ + WN_SCLN, // タップでJISの「:」 シフトでJISの「;」 (Windows) +}; + +// Use Dynamic macro +#include "dynamic_macro.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_LOWR LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower +#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 CTL_ZH CTL_T(KC_ZKHK) // タップで半角/全角 ホールドで左Control (Windows) +#define KC_ALPS LALT(KC_PSCR) // Alt + PrintScreen + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 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| 無変換| | | | | | 変換 | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + +[_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 \ +), + +/* LOWER + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * |Tab/Alt| 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | O | = | BSPC | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |ZH/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 | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + +[_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, _______, _______, _______, _______ \ +), + +/* RAISE + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * |Tab/Alt| ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| BSPC | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |ZH/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 | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + +[_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, _______, _______, _______, _______, _______, _______ \ +), + +/* 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 | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ +[_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 \ +), + +/* 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 | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ +[_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 \ +), + +}; + +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) { + static bool lshift = false; + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case WN_SCLN: // コロン「;:」 + if (record->event.pressed) { + lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); + if (lshift) { + unregister_code(KC_LSFT); + register_code(JP_SCLN); + unregister_code(JP_SCLN); + } else { + register_code(JP_COLN); + unregister_code(JP_COLN); + } + } + return false; + break; + case MCR1: + if (record->event.pressed) { + SEND_STRING("hogehoge"); // 送信文字列 + } + return false; + break; + case MCR2: + if (record->event.pressed) { + SEND_STRING("hogehogehoge"SS_TAP(X_ENTER)); // 送信文字列 + } + return false; + break; + case MCR3: + if (record->event.pressed) { + SEND_STRING("hoge@hoge.co.jp"); // 送信文字列 + } + return false; + break; + } + return true; +} diff --git a/keyboards/ergo42/keymaps/hdbx/readme.md b/keyboards/ergo42/keymaps/hdbx/readme.md new file mode 100644 index 00000000000..fe76fc7cf76 --- /dev/null +++ b/keyboards/ergo42/keymaps/hdbx/readme.md @@ -0,0 +1,67 @@ +# hdbx + +Designed for Japanese Keyboardists using JIS on the Ergo42. + +## Layer + +```` +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| –³•ÏŠ·| | | | | | •ÏŠ· | | | | | +`-------------------------------------------------------' `-------------------------------------------------------' + +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 | +`-------------------------------------------------------' `-------------------------------------------------------' + +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 | +`-------------------------------------------------------' `-------------------------------------------------------' + +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 | +`-------------------------------------------------------' `-------------------------------------------------------' +```` + +## Notes + +Supports RGB Underglow and Dynamic Macros. diff --git a/keyboards/ergo42/keymaps/hdbx/rules.mk b/keyboards/ergo42/keymaps/hdbx/rules.mk new file mode 100644 index 00000000000..1e576127880 --- /dev/null +++ b/keyboards/ergo42/keymaps/hdbx/rules.mk @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index 51cff095c7c..1a674a85862 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER /* define tapping term */ -#define TAPPING_TERM 120 +#define TAPPING_TERM 100 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ergodone/ergodone.h b/keyboards/ergodone/ergodone.h index 0826e95216a..c63afe838b8 100644 --- a/keyboards/ergodone/ergodone.h +++ b/keyboards/ergodone/ergodone.h @@ -99,6 +99,28 @@ 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 KEYMAP_PRETTY( \ + /* 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, \ + L54, R52, \ + 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,KC_NO,KC_NO, KC_NO,KC_NO,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 #endif diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json new file mode 100644 index 00000000000..64ab0fe66ec --- /dev/null +++ b/keyboards/ergodone/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Ergodone", + "maintainer": "Yu He", + "width": 19.5, + "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}] + } + } +} diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index d6fa30bb20c..eda6d767cf2 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -250,5 +250,7 @@ inline void ergodox_led_all_set(uint8_t n) #define LAYOUT_ergodox KEYMAP #define LAYOUT_ergodox_pretty KEYMAP_PRETTY +#define LAYOUT_ergodox_80 KEYMAP_80 +#define LAYOUT_ergodox_pretty_80 KEYMAP_PRETTY_80 #endif diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index 6fdbca23624..fc39c78485f 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,9 +1,10 @@ { - "keyboard_name": "ErgoDox EZ", - "url": "ergodox-ez.com", - "maintainer": "erez", - "width": 19.5, - "height": 9.375, + "keyboard_name": "ErgoDox EZ", + "url": "ergodox-ez.com", + "maintainer": "erez", + "width": 19.5, + "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}] @@ -11,10 +12,10 @@ "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}] }, - "KEYMAP_80": { + "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}] }, - "KEYMAP_PRETTY_80": { + "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}] } } diff --git a/keyboards/ergodox_ez/readme.md b/keyboards/ergodox_ez/readme.md index ffde65c88b7..bce8ff3c6ff 100644 --- a/keyboards/ergodox_ez/readme.md +++ b/keyboards/ergodox_ez/readme.md @@ -10,7 +10,8 @@ Linux page]. Some distributions provide a binary, maybe called To flash the firmware: - - Build the firmware with `make keymapname`, for example `make default` + - Build the firmware with `make :`, for example `make ergodox_ez:default` + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. `ergodox_ez_default.hex` @@ -19,10 +20,12 @@ To flash the firmware: - Load the .hex file into it. - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. + in the top right corner. - Click the button in the Teensy app to download the firmware. +See also [video demonstration](https://www.youtube.com/watch?v=9PyiGUO9_KQ) using Teensy in auto mode. + To flash with ´teensy-loader-cli´: - Build the firmware with `make keymapname`, for example `make default` diff --git a/keyboards/ergodox_infinity/ergodox_infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h index 25249c714a0..d551fde511a 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.h +++ b/keyboards/ergodox_infinity/ergodox_infinity.h @@ -118,6 +118,40 @@ inline void ergodox_led_all_set(uint8_t n) { { B80, B81, B82, B83, B84 } \ } +#define KEYMAP_PRETTY( \ + /* left hand, spatial positions */ /* right hand, spatial positions */ \ + A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ + A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ + A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ + A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ + A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ + A13, A03, B03, B13, \ + A04, B04, \ + A34, A24, A14, B14, B24, B34 ) \ + \ + /* matrix positions */ \ + { \ + { KC_NO, KC_NO, KC_NO, A03, A04 }, \ + { KC_NO, KC_NO, KC_NO, A13, A14 }, \ + { A20, A21, KC_NO, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { KC_NO, KC_NO, KC_NO, B03, B04 }, \ + { KC_NO, KC_NO, KC_NO, B13, B14 }, \ + { B20, B21, KC_NO, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ +} + #define LAYOUT_ergodox KEYMAP +#define LAYOUT_ergodox_pretty KEYMAP_PRETTY #endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */ diff --git a/keyboards/ergodox_infinity/info.json b/keyboards/ergodox_infinity/info.json index 5cd0fd7baa7..1022a740e2f 100644 --- a/keyboards/ergodox_infinity/info.json +++ b/keyboards/ergodox_infinity/info.json @@ -3,8 +3,11 @@ "width": 19.5, "height": 9.375, "layouts": { - "KEYMAP": { + "LAYOUT_ergodox": { "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_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}] } - } + } } diff --git a/keyboards/ergodox_infinity/keymaps/input_club/README.md b/keyboards/ergodox_infinity/keymaps/input_club/README.md new file mode 100644 index 00000000000..31ae23ac403 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/input_club/README.md @@ -0,0 +1,23 @@ +# Input Club ErgoDox Infinity Layout + +A basic ErgoDox layout that duplicates the default Input Club layout + +## Features + +Base Layers + +- QWERTY +- Function Keys +- Numpad + +## Building and flashing + +1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware +2. Flash left half: + ```bash + make ergodox_infinity:input_club:dfu-util + ``` +3. Flash right half: + ```bash + make ergodox_infinity:input_club:dfu-util MASTER=right + ``` diff --git a/keyboards/ergodox_infinity/keymaps/input_club/keymap.c b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c new file mode 100644 index 00000000000..e77319d2c8f --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/input_club/keymap.c @@ -0,0 +1,267 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define L0 0 // default layer +#define L1 1 +#define L2 2 + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[L0] = LAYOUT_ergodox( // layer 0 : default +/* + * left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | = | 0 | 2 | 3 | 4 | 5 | ESC | + * +-------+-----+-----+-----+-----+-----+-----+ + * | \ | Q | W | E | R | T |LCK-1| + * +-------+-----+-----+-----+-----+-----+ | + * | TAB | A | S | D | F | G +-----+ + * +-------+-----+-----+-----+-----+-----+ f1 | + * | LSHIFT| Z | X | C | V | B | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * |LGUI | ` | \ |LEFT |RIGHT| + * +-----+-----+-----+-----+-----+ +-----+-----+ + * |LCTRL| LALT| + * +-----+-----+-----+ + * | | | HOME| + * |BKSPC| DEL +-----+ + * | | | END | + * +-----+-----+-----+ + */ + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(L1), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(L1), + KC_LGUI, KC_GRV, KC_BSLS, KC_LEFT, KC_RGHT, + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC, KC_DELT, KC_END, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * |LCK-2| 6 | 7 | 8 | 9 | 0 | - | + * +-----+-----+-----+-----+-----+-----+-------+ + * | [ | Y | U | I | O | P | ] | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ H | J | K | L | ; | ' | + * | f1 +-----+-----+-----+-----+-----+-------+ + * | | N | M | , | . | / | RSHIFT| + * +-----+-----+-----+-----+-----+-----+-----+-+ + * |LEFT |DOWN | UP |RIGHT| RGUI| + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | RALT|RCTRL| + * +-----+-----+-----+ + * | PGUP| | | + * +-----+ ENT | SPC | + * | PGDN| | | + * +-----+-----+-----+ + */ + TG(L2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(L1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), + +[L1] = LAYOUT_ergodox( // layer 1 : function layers +/* left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | | f1 | f2 | f3 | f4 | f5 | f11 | + * +-------+-----+-----+-----+-----+-----+-----+ + * | | | | | | | | + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | +-----+ + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * | | | | | | + * +-----+-----+-----+-----+-----+ +-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * | | +-----+ + * | | | | + * +-----+-----+-----+ + */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * | f12 | f6 | f7 | f8 | f9 | f10 | | + * +-----+-----+-----+-----+-----+-----+-------+ + * | | | | | | | | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ | | | | | | + * | +-----+-----+-----+-----+-----+-------+ + * | | | | | | | | + * +-----+-----+-----+-----+-----+-----+-----+-+ + * | | | | | | + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * +-----+ | | + * | | | | + * +-----+-----+-----+ + */ + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +[L2] = LAYOUT_ergodox( +/* Left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | FLASH | | | | | | | + * +-------+-----+-----+-----+-----+-----+-----+ + * | | | | | | | | + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | +-----+ + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * | | | | | | + * +-----+-----+-----+-----+-----+ +-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * | | +-----+ + * | | | | + * +-----+-----+-----+ + */ + 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, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * | | |NMLCK| P/ | P* | P- | | + * +-----+-----+-----+-----+-----+-----+-------+ + * | | | P7 | P8 | P9 | P+ | | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ | P4 | P5 | P6 | P+ | | + * | +-----+-----+-----+-----+-----+-------+ + * | | | P1 | P2 | P3 |PENT | | + * +-----+-----+-----+-----+-----+-----+-----+-+ + * | | | P. |PENT | | + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * +-----+ | P0 | + * | | | | + * +-----+-----+-----+ + */ + KC_TRNS, KC_TRNS, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_0 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(L1) // FN1 - Momentary Layer 1 (Function) +}; + +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) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// 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) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/fc660c/fc660c.h b/keyboards/fc660c/fc660c.h index 6139dee015d..63c4029c0dd 100644 --- a/keyboards/fc660c/fc660c.h +++ b/keyboards/fc660c/fc660c.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K13, K10, K11, K12, K14, K16, K17, K15, K1B, K18, K19, K1A, K1C, K1E, K1F, \ K03, K00, K01, K02, K04, K06, K07, K05, K0B, K08, K09, K0A, K0C, K0E, K0F, \ K43, K40, K41, K42, K44, K46, K47, K45, K4B, K48, K49, K4A, K4E, \ diff --git a/keyboards/fc660c/info.json b/keyboards/fc660c/info.json new file mode 100644 index 00000000000..9ed48aad153 --- /dev/null +++ b/keyboards/fc660c/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "fc660c", + "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":"Backspace", "x":13, "y":0, "w":2}, {"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}, {"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.25}, {"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.25}, {"x":3.75, "y":4, "w":6}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"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/fc660c/keymaps/default/keymap.c b/keyboards/fc660c/keymaps/default/keymap.c index 02f57532ba8..eae07c08b17 100644 --- a/keyboards/fc660c/keymaps/default/keymap.c +++ b/keyboards/fc660c/keymaps/default/keymap.c @@ -14,17 +14,17 @@ 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 "fc660c.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = 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_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_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_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT ), - [1] = KEYMAP( + [1] = 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_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, diff --git a/keyboards/fc980c/fc980c.h b/keyboards/fc980c/fc980c.h index c3992bbed8f..74c46806131 100644 --- a/keyboards/fc980c/fc980c.h +++ b/keyboards/fc980c/fc980c.h @@ -37,33 +37,35 @@ along with this program. If not, see . ---------------------------------------------------------------------------------------------------------------------- */ -#define KEYMAP( \ - K0D, K2D,K5D,K3D,K6D,K7D,K7F,K7E,K7C,K72,K71,K70,K73, K74,K76,K77,K75, \ - K0A,K69,K59,K58,K5B,K6F,K5F,K5E,K6C,K5C,K52,K51,K50,K55, K54,K56,K57,K65, \ - K6A,K39,K68,K6B,K3B,K3F,K6E,K3E,K3C,K62,K61,K60,K33,K53, K64,K66,K67,K25, \ - K3A,K29,K38,K28,K2B,K2F,K2E,K2C,K1C,K32,K31,K20, K63, K24,K26,K27, \ - K2A, K18,K08,K1B,K0B,K1F,K1E,K0E,K22,K11,K21, K30, K34, K14,K16,K17,K15, \ - K1A,K09,K19, K0F, K02,K01,K10, K00,K04,K06, K07,K05 \ -) { \ - { K00, K01, K02, KC_NO,K04, K05, K06, K07 , \ - K08, K09, K0A, K0B, KC_NO,K0D, K0E, K0F }, \ - { K10, K11, KC_NO,KC_NO,K14, K15, K16, K17 , \ - K18, K19, K1A, K1B, K1C, KC_NO,K1E, K1F }, \ - { K20, K21, K22, KC_NO,K24, K25, K26, K27 , \ - K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, KC_NO,KC_NO,KC_NO , \ - K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { 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 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 , \ - K58, K59, KC_NO,K5B, K5C, K5D, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 , \ - K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 , \ - KC_NO,KC_NO,KC_NO,KC_NO,K7C, K7D, K7E, K7F } \ -} +#define LAYOUT( \ + K0D, K2D, K5D, K3D, K6D, K7D, K7F, K7E, K7C, K72, K71, K70, K73, K74, K76, K77, K75, \ + K0A, K69, K59, K58, K5B, K6F, K5F, K5E, K6C, K5C, K52, K51, K50, K55, K54, K56, K57, K65, \ + K6A, K39, K68, K6B, K3B, K3F, K6E, K3E, K3C, K62, K61, K60, K33, K53, K64, K66, K67, K25, \ + K3A, K29, K38, K28, K2B, K2F, K2E, K2C, K1C, K32, K31, K20, K63, K24, K26, K27, \ + K2A, K18, K08, K1B, K0B, K1F, K1E, K0E, K22, K11, K21, K30, K34, K14, K16, K17, K15, \ + K1A, K09, K19, K0F, K02, K01, K10, K00, K04, K06, K07, K05) \ + { \ + {K00, K01, K02, KC_NO, K04, K05, K06, K07, \ + K08, K09, K0A, K0B, KC_NO, K0D, K0E, K0F}, \ + {K10, K11, KC_NO, KC_NO, K14, K15, K16, K17, \ + K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F}, \ + {K20, K21, K22, KC_NO, K24, K25, K26, K27, \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F}, \ + {K30, K31, K32, K33, K34, KC_NO, KC_NO, KC_NO, \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F}, \ + {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}, \ + {K50, K51, K52, K53, K54, K55, K56, K57, \ + K58, K59, KC_NO, K5B, K5C, K5D, K5E, K5F}, \ + {K60, K61, K62, K63, K64, K65, K66, K67, \ + K68, K69, K6A, K6B, K6C, K6D, K6E, K6F}, \ + { \ + K70, K71, K72, K73, K74, K75, K76, K77, \ + KC_NO, KC_NO, KC_NO, KC_NO, K7C, K7D, K7E, K7F \ + } \ + } /* -KEYMAP( +LAYOUT( _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, diff --git a/keyboards/fc980c/info.json b/keyboards/fc980c/info.json new file mode 100644 index 00000000000..f3007f2f848 --- /dev/null +++ b/keyboards/fc980c/info.json @@ -0,0 +1,111 @@ +{ + "keyboard_name": "fc980c", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.75, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "Delete", "x": 15.5, "y": 0 }, + { "label": "Insert", "x": 16.5, "y": 0 }, + { "label": "Pg Up", "x": 17.5, "y": 0 }, + { "label": "Pg Dn", "x": 18.5, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Num Lock", "x": 15.5, "y": 1.5 }, + { "label": "/", "x": 16.5, "y": 1.5 }, + { "label": "*", "x": 17.5, "y": 1.5 }, + { "label": "-", "x": 18.5, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "7", "x": 15.5, "y": 2.5 }, + { "label": "8", "x": 16.5, "y": 2.5 }, + { "label": "9", "x": 17.5, "y": 2.5 }, + { "label": "+", "x": 18.5, "y": 2.5, "h": 2 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "4", "x": 15.5, "y": 3.5 }, + { "label": "5", "x": 16.5, "y": 3.5 }, + { "label": "6", "x": 17.5, "y": 3.5 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 1.75 }, + { "label": "1", "x": 15.5, "y": 4.5 }, + { "label": "2", "x": 16.5, "y": 4.5 }, + { "label": "3", "x": 17.5, "y": 4.5 }, + { "label": "Enter", "x": 18.5, "y": 4.5, "h": 2 }, + { "label": "\u2191", "x": 14.25, "y": 4.75 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5 }, + { "label": "Alt", "x": 2.25, "y": 5.5, "w": 1.25 }, + { "x": 3.5, "y": 5.5, "w": 6 }, + { "label": "Alt", "x": 9.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 10.75, "y": 5.5 }, + { "label": "Fn", "x": 11.75, "y": 5.5, "w": 1.25 }, + { "label": "0", "x": 16.5, "y": 5.5 }, + { "label": ".", "x": 17.5, "y": 5.5 }, + { "label": "\u2190", "x": 13.25, "y": 5.75 }, + { "label": "\u2193", "x": 14.25, "y": 5.75 }, + { "label": "\u2192", "x": 15.25, "y": 5.75 } + ] + } + } +} diff --git a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c index dcecd86b967..ac993ae6baa 100644 --- a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c +++ b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c @@ -14,10 +14,11 @@ 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 "fc980c.h" +#include QMK_KEYBOARD_H #include "actuation_point.h" -enum custom_keycodes { +enum custom_keycodes +{ AP_UP = SAFE_RANGE, // Higher actuation point, more sensitive AP_DN, // Lower actuation point, less sensitive AP_READ_RDAC, // Prints current RDAC value to console @@ -25,53 +26,59 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - 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_DEL, KC_INS, KC_PGUP,KC_PGDN, - 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_NLCK,KC_PSLS,KC_PAST,KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PPLS, - 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_P4, KC_P5, KC_P6, - 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT - ), - [1] = KEYMAP( - _______, _______,_______,_______,_______,_______,_______, _______, _______,AP_READ_RDAC,AP_READ_EEPROM,AP_DN,AP_UP, _______,_______,KC_HOME,KC_END, - _______,_______,_______,_______,_______,_______,_______,_______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______, - KC_CAPS,KC_MPRV,KC_VOLU,KC_MNXT,KC_PGUP,KC_INS,KC_HOME, LCTL(KC_LEFT),LCTL(KC_RGHT),KC_END, KC_PSCR,KC_SLCK,KC_PAUS,_______, _______,_______,_______,_______, - _______,KC_MUTE,KC_VOLD,KC_MPLY,KC_PGDN,KC_DEL,KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,_______,_______, _______, _______,_______,_______, - _______, _______,_______,_______,_______,_______,LCTL(KC_BSPC),LCTL(KC_DEL), _______,_______,_______, _______, KC_PGUP, _______,_______,_______,_______, - _______,_______,_______, _______, _______,KC_APP, _______, KC_HOME,KC_PGDN,KC_END, _______,_______ - ), + [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_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, AP_READ_RDAC, AP_READ_EEPROM, AP_DN, AP_UP, _______, _______, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, + _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; -void matrix_init_user(void) { -}; +void matrix_init_user(void){}; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case AP_UP: { - actuation_point_up(); - return false; - } - case AP_DN: { - actuation_point_down(); - return false; - } - case AP_READ_RDAC: { - xprintf("RDAC: %d", read_rdac()); - return false; - } - case AP_READ_EEPROM: { - xprintf("EEPROM: %d", read_eeprom()); - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (record->event.pressed) + { + switch (keycode) + { + case AP_UP: + { + actuation_point_up(); + return false; + } + case AP_DN: + { + actuation_point_down(); + return false; + } + case AP_READ_RDAC: + { + xprintf("RDAC: %d", read_rdac()); + return false; + } + case AP_READ_EEPROM: + { + xprintf("EEPROM: %d", read_eeprom()); + return false; + } - default: return true; + default: + return true; } - } else { + } + else + { return true; } }; -const uint16_t PROGMEM fn_actions[] = { -}; +const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/fc980c/keymaps/coloneljesus/keymap.c b/keyboards/fc980c/keymaps/coloneljesus/keymap.c index d82a616ebb1..26d476ab614 100644 --- a/keyboards/fc980c/keymaps/coloneljesus/keymap.c +++ b/keyboards/fc980c/keymaps/coloneljesus/keymap.c @@ -14,26 +14,23 @@ 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 "fc980c.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - 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_DEL, KC_INS, KC_PGUP,KC_PGDN, - 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_NLCK,KC_PSLS,KC_PAST,KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PPLS, - 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_P4, KC_P5, KC_P6, - 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT - ), - [1] = KEYMAP( - _______, _______,_______,_______,_______,_______,_______, _______, _______,_______,_______,_______,_______, _______,_______,KC_HOME,KC_END, - _______,_______,_______,_______,_______,_______,_______,_______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______, - KC_CAPS,KC_MPRV,KC_VOLU,KC_MNXT,KC_PGUP,KC_INS,KC_HOME, LCTL(KC_LEFT),LCTL(KC_RGHT),KC_END, KC_PSCR,KC_SLCK,KC_PAUS,_______, _______,_______,_______,_______, - _______,KC_MUTE,KC_VOLD,KC_MPLY,KC_PGDN,KC_DEL,KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,_______,_______, _______, _______,_______,_______, - _______, _______,_______,_______,_______,_______,LCTL(KC_BSPC),LCTL(KC_DEL), _______,_______,_______, _______, KC_PGUP, _______,_______,_______,_______, - _______,_______,_______, _______, _______,KC_APP, _______, KC_HOME,KC_PGDN,KC_END, _______,_______ - ), + [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_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, + _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; -const uint16_t PROGMEM fn_actions[] = { -}; +const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/fc980c/keymaps/default/keymap.c b/keyboards/fc980c/keymaps/default/keymap.c index 4a1872ad0b4..b3f7bb7b114 100644 --- a/keyboards/fc980c/keymaps/default/keymap.c +++ b/keyboards/fc980c/keymaps/default/keymap.c @@ -14,26 +14,23 @@ 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 "fc980c.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - 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_DEL, KC_INS, KC_PGUP,KC_PGDN, - 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_NLCK,KC_PSLS,KC_PAST,KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PPLS, - 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_P4, KC_P5, KC_P6, - 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT - ), - [1] = KEYMAP( - _______, _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______,_______, _______,_______,KC_HOME,KC_END, - _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______,_______, _______,_______,_______,_______, - _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR, KC_SLCK, KC_PAUS, _______,_______,_______, _______,_______,_______,_______, - _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______,_______,_______,_______, - _______,_______,_______, _______, _______,KC_APP, _______, KC_HOME,KC_PGDN,KC_END, _______,_______ - ), + [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_DEL, KC_INS, KC_PGUP, KC_PGDN, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; -const uint16_t PROGMEM fn_actions[] = { -}; +const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/fc980c/matrix.c b/keyboards/fc980c/matrix.c index bde0f3c139e..1126f3047ae 100644 --- a/keyboards/fc980c/matrix.c +++ b/keyboards/fc980c/matrix.c @@ -28,7 +28,7 @@ along with this program. If not, see . #include "timer.h" #include "matrix.h" #include "led.h" -// #include "fc980c.h" +// #include QMK_KEYBOARD_H // Timer resolution check diff --git a/keyboards/four_banger/keymaps/default/keymap.c b/keyboards/four_banger/keymaps/default/keymap.c index 24515538164..6c5f7c8a55f 100644 --- a/keyboards/four_banger/keymaps/default/keymap.c +++ b/keyboards/four_banger/keymaps/default/keymap.c @@ -6,7 +6,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_2x2( - KC_1, KC_U, + KC_1, KC_U, KC_P, UP_URL ), }; @@ -15,10 +15,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case UP_URL: if (record->event.pressed) { - SEND_STRING("http://1upkeyboads.com"); + SEND_STRING("http://1upkeyboards.com"); } return false; break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/frosty_flake/keymaps/nikchi/keymap.c b/keyboards/frosty_flake/keymaps/nikchi/keymap.c index fbabb482a5c..bf7c5e58837 100644 --- a/keyboards/frosty_flake/keymaps/nikchi/keymap.c +++ b/keyboards/frosty_flake/keymaps/nikchi/keymap.c @@ -6,15 +6,16 @@ #include "quantum.h" #define _______ KC_TRNS -#define EMOJIBLOCK 5 +#define MAXEMOJITAPS 80 //declarations for tap dancing emojis void register_hex32(uint32_t hex); void cycleEmojis(qk_tap_dance_state_t *state, void *user_data); void cycleAnimals(qk_tap_dance_state_t *state, void *user_data); -void cycleHands(qk_tap_dance_state_t *state, void *user_data); -void cycleMemes(qk_tap_dance_state_t *state, void *user_data); +void cycleFoods(qk_tap_dance_state_t *state, void *user_data); +void cycleEtc(qk_tap_dance_state_t *state, void *user_data); +void cycleAll(qk_tap_dance_state_t *state, void *user_data); void tap(uint16_t keycode){ register_code(keycode); @@ -27,36 +28,21 @@ enum taps{ EMOJIS, ANIMAL, HAND, - MEMES + MEMES, + COPA, + ALLS }; -enum unicode_name { // split every five emojis - THINK = 1, // thinking face 🤔 - GRIN, // grinning face 😊 - SMRK, // smirk 😏 - WEARY, // good shit 😩 - UNAMU, // unamused 😒 - - SNEK, // snke 🐍 - PENGUIN, // 🐧 - DRAGON, // 🐉 - MONKEY, // 🐒 - CHICK, // 🐥 - - OKOK, // 👌 - EFFU, // 🖕 - INUP, // 👆 - THUP, // 👍 - THDN, // 👎 - - BBB, // dat B 🅱 - POO, // poop 💩 - HUNDR, // 100 💯 - EGGPL, // EGGPLANT 🍆 - WATER, // wet 💦 - - LIT // fire 🔥 - +enum unicode_name { + EMOTIS = 1,//80, //1F60x - 1F64x + ANIMALS, //64, //1F40x - 1F43x + SYMBOLS,// = 45, //1F300 - 1F32C + FOODS,// = 87 , //1F32D - + ETC,// = 192, //1F44x -1F4Fx + VEHICLES,// = 83, //1F68x - 1F6Dx + SUPPLEMENT,// = 32, //1F91x-1F92x + ALCHEMY,// = 116 //1F70x - 1F773 + }; enum my_macros { @@ -71,10 +57,15 @@ enum my_macros { qk_tap_dance_action_t tap_dance_actions[] = { // Tap once for CTRL, twice for Caps Lock [TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS), + [COPA] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), LCTL(KC_V)), [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEmojis, NULL, NULL, 800), [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAnimals, NULL, NULL, 800), - [HAND] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleHands, NULL, NULL, 800), - [MEMES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleMemes, NULL, NULL, 800) + //[SYMBOLS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleSymbols, NULL, NULL, 800), + [FOODS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleFoods, NULL, NULL, 800), + [ETC] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEtc, NULL, NULL, 800), + //[VEHICLES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleVehicles, NULL, NULL, 800), + //[SUPPLEMENT] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleSupplement, NULL, NULL, 800), + [ALLS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAll, NULL, NULL, 800) // Other declarations would go here, separated by commas, if you have them }; @@ -105,29 +96,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; + // emojis in unicode const uint32_t PROGMEM unicode_map[] = { - [THINK] = 0x1F914, - [GRIN] = 0x1F600, - [BBB] = 0x1F171, - [POO] = 0x1F4A9, - [HUNDR] = 0x1F4AF, - [SMRK] = 0x1F60F, - [WEARY] = 0x1F629, - [EGGPL] = 0x1F346, - [WATER] = 0x1F4A6, - [LIT] = 0x1F525, - [UNAMU] = 0x1F612, - [SNEK] = 0x1F40D, - [PENGUIN] = 0x1F427, - [MONKEY] = 0x1F412, - [CHICK] = 0x1F425, - [DRAGON] = 0x1F409, - [OKOK] = 0x1F44C, - [EFFU] = 0x1F595, - [INUP] = 0x1F446, - [THDN] = 0x1F44E, - [THUP] = 0x1F44D + [EMOTIS] = 0x1F600, + [ANIMALS] = 0x1F400, + [SYMBOLS] = 0x1F300, + [FOODS] = 0x1F32D, + [ETC] = 0x1F440, + [VEHICLES] = 0x1F680, + [SUPPLEMENT] = 0x1F910, + [ALCHEMY] = 0x1F700 }; // Layouts const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -139,11 +118,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSPO,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \ TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), [1] = KEYMAP(\ - 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, \ - TD(EMOJIS),TD(ANIMAL),TD(HAND),TD(MEMES),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ - KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \ - KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \ - KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \ + TD(ALLS), 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, TD(EMOJIS),TD(ANIMAL),TD(ETC),TD(FOODS), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ + KC_TAB, KC_Q, M(0), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \ + KC_LCTL, M(1), M(3), M(2), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \ KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2),_______ , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT), [2] = KEYMAP(\ 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, \ @@ -151,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \ KC_LCTL, KC_D, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ 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_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \ - KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, _______, _______, KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT), + KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2) , KC_NO , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT), }; LEADER_EXTERNS(); @@ -167,12 +146,6 @@ void matrix_scan_user(void) { tap(KC_C); unregister_code(KC_LCTL); } - SEQ_THREE_KEYS(KC_L,KC_I,KC_T) { // 🔥🔥 - unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[LIT])); - unicode_input_finish(); - } - } } @@ -181,17 +154,31 @@ void matrix_init_user(void) { set_unicode_input_mode(UC_WINC); }; +void cycleAll(qk_tap_dance_state_t *state, void *user_data) { + if(state->count == 1) { + unicode_input_start(); + register_hex32(pgm_read_dword(&unicode_map[EMOTIS])); + unicode_input_finish(); + } + else if(state->count <= 1642) { + tap(KC_BSPC); + unicode_input_start(); + register_hex32(pgm_read_dword(&unicode_map[1])+state->count); + unicode_input_finish(); + } +}; + void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) { if(state->count == 1) { unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count])); + register_hex32(pgm_read_dword(&unicode_map[EMOTIS])); unicode_input_finish(); } - else if(state->count <= EMOJIBLOCK) { + else if(state->count <= 80) { tap(KC_BSPC); unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count])); + register_hex32(pgm_read_dword(&unicode_map[EMOTIS])+state->count); unicode_input_finish(); } }; @@ -199,43 +186,43 @@ void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) { void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) { if(state->count == 1) { unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+5])); + register_hex32(pgm_read_dword(&unicode_map[ANIMALS])); unicode_input_finish(); } - else if(state->count <= EMOJIBLOCK) { + else if(state->count <= MAXEMOJITAPS) { tap(KC_BSPC); unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+5])); + register_hex32(pgm_read_dword(&unicode_map[ANIMALS])+state->count); unicode_input_finish(); } }; -void cycleHands(qk_tap_dance_state_t *state, void *user_data) { +void cycleFoods(qk_tap_dance_state_t *state, void *user_data) { if(state->count == 1) { unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+10])); + register_hex32(pgm_read_dword(&unicode_map[FOODS])); unicode_input_finish(); } - else if(state->count <= EMOJIBLOCK) { + else if(state->count <= 87) { tap(KC_BSPC); unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+10])); + register_hex32(pgm_read_dword(&unicode_map[FOODS])+state->count); unicode_input_finish(); } }; -void cycleMemes(qk_tap_dance_state_t *state, void *user_data) { + +void cycleEtc(qk_tap_dance_state_t *state, void *user_data) { if(state->count == 1) { unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+15])); + register_hex32(pgm_read_dword(&unicode_map[ETC])); unicode_input_finish(); } - else if(state->count <= EMOJIBLOCK) { + else if(state->count <= MAXEMOJITAPS) { tap(KC_BSPC); unicode_input_start(); - register_hex32(pgm_read_dword(&unicode_map[state->count+15])); + register_hex32(pgm_read_dword(&unicode_map[ETC])+state->count); unicode_input_finish(); } }; - diff --git a/keyboards/gh60/keymaps/chaser/README.md b/keyboards/gh60/keymaps/chaser/README.md new file mode 100644 index 00000000000..e6ec9e82bed --- /dev/null +++ b/keyboards/gh60/keymaps/chaser/README.md @@ -0,0 +1,96 @@ +# [dragonchasers](https://github.com/dragonchaser) GH60 layout + +Layout derived from the default GH60 keymap. + +![Photo of the keyboard](https://pbs.twimg.com/media/DQzlD0yX0AA8spX.jpg) + +## Layers + +### Base Layer +``` +,-----------------------------------------------------------. +|Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | +|-----------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | +|-----------------------------------------------------------| +|FN | A| S| D| F| G| H| J| K| L| ;| '|Return | +|-----------------------------------------------------------| +|Shift | Z| X| C| V| B| N| M| ,| .| /| Up |FN | +|-----------------------------------------------------------| +|Ctrl|Gui |Alt | Space |Alt |Left |Down|Right| +`-----------------------------------------------------------' + +Note: right FN triggers function layer, + left FN(CAPS) is a one-shot button for the macro layer +``` + +### Function Layer +``` +,-----------------------------------------------------------. +|GRV|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | +|-----------------------------------------------------------| +| MB3|MB2|MUP|MB1|MWU| | | |INS| |RST| | |Print| +|-----------------------------------------------------------| +| | ML|MDN|MR |MWD| | | | | | | | +|-----------------------------------------------------------| +|CAPS | | | | | | | | | | |PGUP| | +|-----------------------------------------------------------| +| | | | |Ctrl|HOME|PGD |END | +`-----------------------------------------------------------' +``` + +### Macro Layer +``` +,-----------------------------------------------------------. +|DEF| |DUE| | | | | | | | | |GAM| ARR| +|-----------------------------------------------------------| +| |MAG|CLO|DUT|RBS|TIG| | | |COU|PSH| | | | +|-----------------------------------------------------------| +| |ADD|STS|DFF|FTC|PLL| | |LOG| | | | +|-----------------------------------------------------------| +| | | |COM| |BRN| | | | |MUT|VOL+|PLPA| +|-----------------------------------------------------------| +| | | | |APP |PREV|VOL-|NEXT| +`-----------------------------------------------------------' + +Abbreviations: +-------------- +DEF - return to default layer +DUE - enable git duet mode +GAM - backlight WASD +ARR - backlight arrows +- +MAG - git submodule sync --recursive \ + && git submodule update --init --recursive \ + && git submodule foreach --recursive "git co . \ + && git reset --hard && git clean -dffx" +CLO - git clone +DUT - git duet (when in duet mode) +RBS - git rebase +TIG - tig +COU - git checkout +PSH - git push +- +ADD - git add +STS - git status +DFF - git diff +FTC - git fetch +PLL - git pull +LOG - git log +- +COM - git commit (or git duet commit if in duet mode) +BRN - git branch +MUT - audio mute +VOL+ - increase volume +PLPA - play/pause +- +APP - application (windows menu key) +PREV - previous song +VOL- - decrease volume +NEXT - next song + +Note: git commands are SEND_STRING macros sent to the + currently focused window Make sure it is your terminal :) + ``` + +**NOTE:** an outdated version of this keymap is also present for the Satan keyboard, which is no longer maintained since I could not get my hands on a properly working PCB. diff --git a/keyboards/gh60/keymaps/chaser/keymap.c b/keyboards/gh60/keymaps/chaser/keymap.c new file mode 100644 index 00000000000..cc32859161d --- /dev/null +++ b/keyboards/gh60/keymaps/chaser/keymap.c @@ -0,0 +1,331 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" +#include + + +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 _QW 0 +#define _FL 1 +#define _MC 2 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +bool git_duet = false; +bool backlight_arrows = false; +bool backlight_gaming = false; +enum custom_keycodes { + /* GIT related keycodes */ + G_ADD = SAFE_RANGE, G_BRN, G_COM, G_COU, G_CLO, + G_DFF, G_DUE, G_DUT, G_FTC, G_LOG, G_MAG, G_MRG, + G_MRT, G_PSH, G_PLL, G_RBS, G_STH, G_STS, G_TIG, + + /* Multi-media related keycodes */ + A_MUTE, A_NEXT, A_PLPA, A_PREV, A_VOUP, A_VDWN, + + /* System related shortcuts */ + F_BTN, M_WAPP, K_ARR, K_WASD, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |FN | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Up |FN | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |Left |Down|Right| + * `-----------------------------------------------------------' + * + * Note: right FN triggers function layer, + * left FN is a one-shot button for the macro layer + */ +[_QW] = { /* Layer 0: 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}, + {OSL(_MC), 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, F_BTN, KC_UP}, + {KC_LCTL , KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT} +},\ + +/* + * ,-----------------------------------------------------------. + * |GRV|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | + * |-----------------------------------------------------------| + * | MB3|MB2|MUP|MB1|MWU| | | |INS| |RST| | |Print| + * |-----------------------------------------------------------| + * | | ML|MDN|MR |MWD| | | | | | | | + * |-----------------------------------------------------------| + * |CAPS | | | | | | | | | | |PGUP| | + * |-----------------------------------------------------------| + * | | | | |Ctrl|HOME|PGD |END | + * `-----------------------------------------------------------' + */ +[_FL] = { /* Layer 1: Functions */ + {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_MS_BTN3 , KC_MS_BTN2 ,KC_MS_UP ,KC_MS_BTN1 , KC_MS_WH_UP , _______, _______, _______, KC_INS , _______, RESET , _______, _______ , KC_PSCREEN}, + {KC_CAPS , KC_MS_LEFT ,KC_MS_DOWN ,KC_MS_RIGHT, KC_MS_WH_DOWN, _______, _______, _______, _______, _______, _______ , XXXXXXX, KC_TILDE}, + {_______ , XXXXXXX , _______ , _______ , _______ , _______, _______, _______, _______, _______, _______ , _______, _______ , KC_PGUP}, + {_______ , _______ , _______ , XXXXXXX , XXXXXXX , _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RCTRL, KC_HOME, KC_PGDOWN, KC_END} +}, + +/* + * ,-----------------------------------------------------------. + * |DEF| |DUE| | | | | | | | | |GAM| ARR| + * |-----------------------------------------------------------| + * | |MAG|CLO|DUT|RBS|TIG|MRT| | |COU|PSH| | | | + * |-----------------------------------------------------------| + * | |ADD|STS|DFF|FTC|PLL|MRG| |STH|LOG| | | F_OFF| + * |-----------------------------------------------------------| + * | | | |COM| |BRN| | | | |MUT|VOL+|PLPA| + * |-----------------------------------------------------------| + * | | | | |APP |PREV|VOL-|NEXT| + * `-----------------------------------------------------------' + * + * Abbreviations: + * -------------- + * DEF - return to default layer + * DUE - enable git duet mode + * CLO - git clone + * DUT - git duet (when in duet mode) + * RBS - git rebase + * MAG - git submodule sync --recursive && git submodule update --init --recursive && git submodule foreach --recursive "git co . && git reset --hard && git clean -dffx" + * TIG - tig + * MRG - git merge + * MRT - git mergetool + * COU - git checkout + * PSH - git push + * ADD - git add + * STS - git status + * DFF - git diff + * FTC - git fetch + * PLL - git pull + * STH - git stash + * LOG - git log + * COM - git commit (or git duet commit if in duet mode) + * BRN - git branch + * APP - application (windows menu key) + * MUT - audio mute + * VOL+ - increase volume + * VOL- - decrease volume + * PLPA - play/pause + * PREV - previous song + * NEXT - next song + * ARR - backlight arrow keys + * GAM - backlight WASD + * + * Note: git commands are SEND_STRING macros sent to the + * currently focused window Make sure it is your terminal :) + */ +[_MC] = { /* Layer 2: Macros (Git & Multimedia) */ + {TO(_QW), XXXXXXX,G_DUE , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , XXXXXXX, K_WASD , K_ARR }, + {XXXXXXX, G_MAG ,G_CLO , G_DUT , G_RBS , G_TIG , G_MRT , XXXXXXX, XXXXXXX, G_COU , G_PSH , XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, G_ADD ,G_STS , G_DFF , G_FTC , G_PLL , G_MRG , XXXXXXX, G_STH , G_LOG , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, G_COM , XXXXXXX, G_BRN , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX , A_MUTE, A_PLPA, A_VOUP}, + {XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_WAPP , A_PREV, A_VDWN, A_NEXT} +}, + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + /* + * Begin git layer + */ + case G_ADD: + SEND_STRING("git add "); + layer_off(_MC); + return false;break; + case G_BRN: + SEND_STRING("git branch\n"); + layer_off(_MC); + return false;break; + case G_CLO: + SEND_STRING("git clone "); + layer_off(_MC); + return false;break; + case G_COM: + if(git_duet) { + SEND_STRING("git duet-commit "); + } else { + SEND_STRING("git commit "); + } + layer_off(_MC); + return false;break; + case G_COU: + SEND_STRING("git checkout "); + layer_off(_MC); + return false;break; + case G_DFF: + SEND_STRING("git diff\n"); + layer_off(_MC); + return false;break; + case G_DUE: + git_duet = !git_duet; + if(git_duet) { + gh60_esc_led_on(); + } else { + gh60_esc_led_off(); + } + layer_off(_MC); + return false;break; + case G_DUT: + if(git_duet) { + SEND_STRING("git duet "); + } + layer_off(_MC); + return false; break; + case G_FTC: + SEND_STRING("git fetch "); + layer_off(_MC); + return false;break; + case G_LOG: + SEND_STRING("git log --graph\n"); + layer_off(_MC); + return false;break; + case G_MAG: + // This is some git-magic to resync recursive submodule structures inside git projects (thx to https://github.com/jimmykarily) + SEND_STRING("git submodule sync --recursive && git submodule update --init --recursive && git submodule foreach --recursive \" git co . && git reset --hard && git clean -dffx \" \n"); + layer_off(_MC); + return false; break; + case G_MRG: + SEND_STRING("git merge "); + layer_off(_MC); + return false;break; + case G_MRT: + SEND_STRING("git mergetool "); + layer_off(_MC); + return false;break; + case G_PLL: + SEND_STRING("git pull "); + layer_off(_MC); + return false;break; + case G_PSH: + SEND_STRING("git push "); + layer_off(_MC); + return false;break; + case G_RBS: + SEND_STRING("git rebase "); + layer_off(_MC); + return false;break; + case G_STH: + SEND_STRING("git stash "); + layer_off(_MC); + return false;break; + case G_STS: + SEND_STRING("git status\n"); + layer_off(_MC); + return false;break; + case G_TIG: + SEND_STRING("tig\n"); + layer_off(_MC); + return false;break; + /* + * End git layer + */ + + /* + * Begin multimedia keys + */ + case A_MUTE: + register_code(KC_AUDIO_MUTE); + unregister_code(KC_AUDIO_MUTE); + layer_off(_MC); + return false;break; + case A_PLPA: + register_code(KC_MEDIA_PLAY_PAUSE); + unregister_code(KC_MEDIA_PLAY_PAUSE); + layer_off(_MC); + return false;break; + case A_VOUP: + register_code(KC_AUDIO_VOL_UP); + return false;break; + case A_VDWN: + register_code(KC_AUDIO_VOL_DOWN); + return false;break; + case A_PREV: + register_code(KC_MEDIA_PREV_TRACK); + unregister_code(KC_MEDIA_PREV_TRACK); + layer_off(_MC); + return false;break; + case A_NEXT: + register_code(KC_MEDIA_NEXT_TRACK); + unregister_code(KC_MEDIA_NEXT_TRACK); + layer_off(_MC); + return false;break; + /* + * End multimedia keys + */ + + // Tap dance to get the app button mapped + case M_WAPP: + register_code(KC_APP); + unregister_code(KC_APP); + layer_off(_MC); + return false;break; + + /* + * Begin multimedia keys + */ + case K_ARR: + backlight_arrows = !backlight_arrows; + if(backlight_arrows) { + gh60_poker_leds_on(); + } else { + gh60_poker_leds_off(); + } + layer_off(_MC); + return false;break; + case K_WASD: + backlight_gaming = !backlight_gaming; + if(backlight_gaming) { + gh60_wasd_leds_on(); + } else { + gh60_wasd_leds_off(); + } + layer_off(_MC); + return false; break; + case F_BTN: + gh60_fn_led_on(); + layer_on(_FL); + return false;break; + } + /* + * End multimedia keys + */ + + } else { + switch(keycode) { + /* + * Oneshots that will switch back to the default layer on KEY_UP + */ + case A_VOUP: + unregister_code(KC_AUDIO_VOL_UP); + layer_off(_MC); + return false;break; + case A_VDWN: + unregister_code(KC_AUDIO_VOL_DOWN); + layer_off(_MC); + return false;break; + case F_BTN: + layer_off(_FL); + gh60_fn_led_off(); + return false;break; + } + } + return true; +}; diff --git a/keyboards/gh60/keymaps/maartenwut/keymap.c b/keyboards/gh60/keymaps/maartenwut/keymap.c new file mode 100755 index 00000000000..825a4033671 --- /dev/null +++ b/keyboards/gh60/keymaps/maartenwut/keymap.c @@ -0,0 +1,47 @@ +#include "gh60.h" +#include "action_layer.h" + +#define _MA 0 +#define _GA 1 +#define _FL 2 +#define _AR 3 + +#define TRNS KC_TRNS +#define trigger_time 400 + +#define LSHIFT OSM(MOD_LSFT) +#define SPACE LT(_AR, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Main Layer +[_MA] = KEYMAP_HHKB( + 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_NO, + 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, + LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, SPACE, KC_NO, KC_RALT, MO(_FL), KC_RCTRL), + +//Function Layer +[_FL] = KEYMAP_HHKB( + 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, RESET, KC_NO, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_PSCR, + TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, KC_MPLY, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + +//Arrow keys layer (space bar) +[_AR] = KEYMAP_HHKB( + 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, KC_NO, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_PGUP, KC_UP, KC_PGDN, TRNS, TRNS, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_LEFT, KC_DOWN, KC_RGHT, TRNS, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), +//Game layer (fn + g) +[_GA] = KEYMAP_HHKB( + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_NO, + 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, + KC_LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, + TRNS, TRNS, TRNS, KC_SPC, TRNS, TRNS, MO(_FL), TRNS), + +}; diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 8129b0a6703..a990cc72080 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -30,12 +30,15 @@ along with this program. If not, see . #define PRODUCT Dactyl #define DESCRIPTION An ortholinear, split, 3D-curved keyboard with thumb clusters. -/* key matrix size - * At this time, "row" in the dactyl's code actually means "column" on the - * physical keyboard. It's confusing. I'm sorry. Blame Jack Humbert :P - */ -#define MATRIX_ROWS 12 -#define MATRIX_COLS 6 +#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 +#define COL_EXPANDED { true, true, true, true, true, true, false, false, false, false, false, false} +#define MATRIX_ONBOARD_ROW_PINS { F0, F1, F4, F5, F6, F7 } +#define MATRIX_ONBOARD_COL_PINS { 0, 0, 0, 0, 0, 0, B1, B2, B3, D2, D3, C6 } +#define EXPANDER_COL_REGISTER 0 +#define MATRIX_EXPANDER_COL_PINS {0, 1, 2, 3, 4, 5} +#define MATRIX_EXPANDER_ROW_PINS {0, 1, 2, 3, 4, 5} #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 diff --git a/keyboards/handwired/dactyl/dactyl.c b/keyboards/handwired/dactyl/dactyl.c index abe3d9d603b..81b9dce0f93 100644 --- a/keyboards/handwired/dactyl/dactyl.c +++ b/keyboards/handwired/dactyl/dactyl.c @@ -1,80 +1,15 @@ #include "dactyl.h" #include "i2cmaster.h" - -bool i2c_initialized = 0; -uint8_t mcp23018_status = 0x20; - -void matrix_init_kb(void) { - DDRB &= ~(1<<4); // set B(4) as input - PORTB &= ~(1<<4); // set B(4) internal pull-up disabled - - // unused pins - C7, D4, D5, D7, E6 - // set as input with internal pull-up enabled - DDRC &= ~(1<<7); - DDRD &= ~(1<<5 | 1<<4); - DDRE &= ~(1<<6); - PORTC |= (1<<7); - PORTD |= (1<<5 | 1<<4); - PORTE |= (1<<6); - - matrix_init_user(); -} - -uint8_t init_mcp23018(void) { - mcp23018_status = 0x20; - - // I2C subsystem - - if (i2c_initialized == 0) { - i2c_init(); // on pins D(1,0) - i2c_initialized = true; - _delay_ms(1000); - } - - // set pin direction - // - unused : input : 1 - // - input : input : 1 - // - driving : output : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - i2c_stop(); - - // set pull-up - // - unused : on : 1 - // - input : on : 1 - // - driving : off : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - -out: - i2c_stop(); - - return mcp23018_status; -} - #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,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, - {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, - {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, - {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, - {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, - {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, - - /* Right hand, matrix positions */ - {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, - {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, - {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, - {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, - {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, - {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, + {{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}}, + {{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}}, + {{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}}, + {{3,11}, {3,13}, {3,9}, {3,8}, {3,7}, {3,6}, {3,5}, {3,4}, {3,3}, {3,2}, {3,1}, {3,0}}, + {{4,11}, {4,14}, {4,9}, {4,8}, {4,7}, {4,6}, {4,5}, {4,4}, {4,3}, {4,2}, {4,1}, {4,0}}, + {{5,11}, {5,15}, {5,9}, {5,8}, {5,7}, {5,6}, {5,5}, {5,4}, {5,3}, {5,2}, {5,1}, {5,0}}, }; #endif diff --git a/keyboards/handwired/dactyl/dactyl.h b/keyboards/handwired/dactyl/dactyl.h index aa573ebd2ab..3e33930e32a 100644 --- a/keyboards/handwired/dactyl/dactyl.h +++ b/keyboards/handwired/dactyl/dactyl.h @@ -10,7 +10,6 @@ #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) #define CPU_16MHz 0x00 -// I2C aliases and register addresses (see "mcp23018.md") #define I2C_ADDR 0b0100000 #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) #define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) @@ -23,52 +22,46 @@ #define OLATA 0x14 // output latch register #define OLATB 0x15 -extern uint8_t mcp23018_status; +extern uint8_t expander_status; +extern uint8_t expander_input_pin_mask; +extern bool i2c_initialized; void init_dactyl(void); -uint8_t init_mcp23018(void); +void init_expander(void); -#define KEYMAP( \ - \ - /* left hand, spatial positions */ \ - k00,k01,k02,k03,k04,k05, \ - k10,k11,k12,k13,k14,k15, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35, \ - k40,k41,k42,k43,k44, \ - k55,k50, \ - k54, \ - k53,k52,k51, \ - \ - /* right hand, spatial positions */ \ - k06,k07,k08,k09,k0A,k0B, \ - k16,k17,k18,k19,k1A,k1B, \ - k26,k27,k28,k29,k2A,k2B, \ - k36,k37,k38,k39,k3A,k3B, \ - k47,k48,k49,k4A,k4B, \ - k5B,k56, \ - k57, \ - k5A,k59,k58 ) \ - \ - /* matrix positions */ \ - { \ - { k00, k10, k20, k30, k40, k50 }, \ - { k01, k11, k21, k31, k41, k51 }, \ - { k02, k12, k22, k32, k42, k52 }, \ - { k03, k13, k23, k33, k43, k53 }, \ - { k04, k14, k24, k34, k44, k54 }, \ - { k05, k15, k25, k35, KC_NO, k55 }, \ - \ - { k06, k16, k26, k36, KC_NO, k56 }, \ - { k07, k17, k27, k37, k47, k57 }, \ - { k08, k18, k28, k38, k48, k58 }, \ - { k09, k19, k29, k39, k49, k59 }, \ - { k0A, k1A, k2A, k3A, k4A, k5A }, \ - { k0B, k1B, k2B, k3B, k4B, k5B } \ +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05, \ + k10,k11,k12,k13,k14,k15, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35, \ + k40,k41,k42,k43,k44, \ + k55,k50, \ + k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k06,k07,k08,k09,k0A,k0B, \ + k16,k17,k18,k19,k1A,k1B, \ + k26,k27,k28,k29,k2A,k2B, \ + k36,k37,k38,k39,k3A,k3B, \ + k47,k48,k49,k4A,k4B, \ + k5B,k56, \ + k57, \ + k5A,k59,k58 ) \ + \ + /* matrix positions */ \ + { \ + { 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 }, \ + { k40, k41, k42, k43, k44, KC_NO, KC_NO, k47, k48, k49, k4A, k4B }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B }, \ } - #define LAYOUT_dactyl KEYMAP #endif diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index 0626f93d7f6..52c76fadd49 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -1,5 +1,4 @@ /* - Copyright 2013 Oleg Kostyuk Copyright 2017 Erin Call @@ -16,10 +15,6 @@ 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 . */ - -/* - * scan matrix - */ #include #include #include @@ -31,47 +26,66 @@ along with this program. If not, see . #include "matrix.h" #include "dactyl.h" #include "i2cmaster.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" +#include "timer.h" + + +/* Set 0 if debouncing isn't needed */ + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif -/* - * This constant define not debouncing time in msecs, but amount of matrix - * scan loops which should be made to get stable debounced results. - * - * On the Dactyl, the matrix scan rate is relatively low, because - * communicating with the left hand's I/O expander is slower than simply - * selecting local pins. - * Now it's only 317 scans/second, or about 3.15 msec/scan. - * According to Cherry specs, debouncing time is 5 msec. - * - * And so, there is no sense to have DEBOUNCE higher than 2. - */ - -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const uint8_t onboard_row_pins[MATRIX_ROWS] = MATRIX_ONBOARD_ROW_PINS; +static const uint8_t onboard_col_pins[MATRIX_COLS] = MATRIX_ONBOARD_COL_PINS; +static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED; +static const uint8_t expander_row_pins[MATRIX_ROWS] = MATRIX_EXPANDER_ROW_PINS; +static const uint8_t expander_col_pins[MATRIX_COLS] = MATRIX_EXPANDER_COL_PINS; #endif /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; -// Debouncing: store for each key the number of scans until it's eligible to -// change. When scanning the matrix, ignore any changes in keys that have -// already changed in the last DEBOUNCE scans. -static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; - -static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void select_col(uint8_t col); + static void unselect_col(uint8_t col); +#endif -static uint8_t mcp23018_reset_loop; +static uint8_t expander_reset_loop; +uint8_t expander_status; +uint8_t expander_input_pin_mask; +bool i2c_initialized = false; #ifdef DEBUG_MATRIX_SCAN_RATE uint32_t matrix_timer; uint32_t matrix_scan_count; #endif +#define ROW_SHIFTER ((matrix_row_t)1) +#if (DIODE_DIRECTION == COL2ROW) +// bitmask to ensure the row state from the expander only applies to its columns +#define EXPANDER_MASK ((matrix_row_t)0b00111111) +#endif __attribute__ ((weak)) void matrix_init_user(void) {} @@ -103,20 +117,20 @@ uint8_t matrix_cols(void) void matrix_init(void) { - // initialize row and col - - mcp23018_status = init_mcp23018(); - + init_expander(); +#if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); +#elif (DIODE_DIRECTION == ROW2COL) + unselect_cols(); + init_rows(); +#endif // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; - for (uint8_t j=0; j < MATRIX_COLS; ++j) { - debounce_matrix[i * MATRIX_COLS + j] = 0; - } + matrix_debouncing[i] = 0; } #ifdef DEBUG_MATRIX_SCAN_RATE @@ -125,59 +139,100 @@ void matrix_init(void) #endif matrix_init_quantum(); - } -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); +void init_expander(void) { + if (! i2c_initialized) { + i2c_init(); + wait_us(1000000); + } - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; + if (! expander_input_pin_mask) { +#if (DIODE_DIRECTION == COL2ROW) + for (int col = 0; col < MATRIX_COLS; col++) { + if (col_expanded[col]) { + expander_input_pin_mask |= (1 << expander_col_pins[col]); + } + } +#elif (DIODE_DIRECTION == ROW2COL) + for (int row = 0; row < MATRIX_ROWS; row++) { + expander_input_pin_mask |= (1 << expander_row_pins[row]); + } +#endif } -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(IODIRA); if (expander_status) goto out; + + /* + Pin direction and pull-up depends on both the diode direction + and on whether the column register is 0 ("A") or 1 ("B"): + +-------+---------------+---------------+ + | | ROW2COL | COL2ROW | + +-------+---------------+---------------+ + | Reg 0 | input, output | output, input | + +-------+---------------+---------------+ + | Reg 1 | output, input | input, output | + +-------+---------------+---------------+ + */ + +#if (EXPANDER_COLUMN_REGISTER == 0) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; + expander_status = i2c_write(0); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(0); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; +# endif +#elif (EXPANDER_COLUMN_REGISTER == 1) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(0); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; + expander_status = i2c_write(0); if (expander_status) goto out; +# endif #endif -} -// Returns a matrix_row_t whose bits are set if the corresponding key should be -// eligible to change in this scan. -matrix_row_t debounce_mask(uint8_t row) { - matrix_row_t result = 0; - for (uint8_t j=0; j < MATRIX_COLS; ++j) { - if (debounce_matrix[row * MATRIX_COLS + j]) { - --debounce_matrix[row * MATRIX_COLS + j]; - } else { - result |= (1 << j); - } - } - return result; -} + i2c_stop(); + + // set pull-up + // - unused : off : 0 + // - input : on : 1 + // - driving : off : 0 + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(GPPUA); if (expander_status) goto out; +#if (EXPANDER_COLUMN_REGISTER == 0) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; + expander_status = i2c_write(0); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(0); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; +# endif +#elif (EXPANDER_COLUMN_REGISTER == 1) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(0); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; + expander_status = i2c_write(0); if (expander_status) goto out; +# endif +#endif -// Report changed keys in the given row. Resets the debounce countdowns -// corresponding to each set bit in 'change' to DEBOUNCE. -void debounce_report(matrix_row_t change, uint8_t row) { - for (uint8_t i = 0; i < MATRIX_COLS; ++i) { - if (change & (1 << i)) { - debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; - } - } +out: + i2c_stop(); } uint8_t matrix_scan(void) { - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + if (expander_status) { // if there was an error + if (++expander_reset_loop == 0) { + // since expander_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { + print("trying to reset expander\n"); + init_expander(); + if (expander_status) { print("left side not responding\n"); } else { print("left side attached\n"); @@ -199,37 +254,71 @@ uint8_t matrix_scan(void) } #endif - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t mask = debounce_mask(i); - matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask); - debounce_report(cols ^ matrix[i], i); - matrix[i] = cols; - - unselect_rows(); +#if (DIODE_DIRECTION == COL2ROW) + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_cols_on_row(matrix, current_row); +# endif } - matrix_scan_quantum(); +#elif (DIODE_DIRECTION == ROW2COL) + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix, current_col); +# endif + + } +#endif +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + debouncing = false; + } +# endif + + matrix_scan_quantum(); return 1; } bool matrix_is_modified(void) // deprecated and evidently not called. { +#if (DEBOUNCING_DELAY > 0) + if (debouncing) return false; +#endif return true; } inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } + } } -static matrix_row_t read_cols(uint8_t row) -{ - if (row < 6) { - if (mcp23018_status) { // if there was an error - return 0; - } else { - uint8_t data = 0; - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out; - mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out; - data = i2c_readNak(); - data = ~data; +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selection to stabilize + select_row(current_row); + wait_us(30); + + // Read columns from expander, unless it's in an error state + if (! expander_status) { + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(GPIOA); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_READ); if (expander_status) goto out; + + current_matrix[current_row] |= (~i2c_readNak()) & EXPANDER_MASK; + out: i2c_stop(); - return data; + } + + // Read columns from onboard pins + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + if (! col_expanded[col_index]) { + uint8_t pin = onboard_col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } - } else { - // read from teensy - return - (PINF&(1<<0) ? 0 : (1<<0)) | - (PINF&(1<<1) ? 0 : (1<<1)) | - (PINF&(1<<4) ? 0 : (1<<2)) | - (PINF&(1<<5) ? 0 : (1<<3)) | - (PINF&(1<<6) ? 0 : (1<<4)) | - (PINF&(1<<7) ? 0 : (1<<5)) ; } + + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); } -/* Row pin configuration - * - * Teensy - * row: 6 7 8 9 10 11 - * pin: B1 B2 B3 D2 D3 C6 - * - * MCP23018 - * row: 0 1 2 3 4 5 - * pin: A0 A1 A2 A3 A4 A5 - */ -static void unselect_rows(void) -{ - // unselect on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing - } else { - // set all rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF); if (mcp23018_status) goto out; +static void select_row(uint8_t row) { + // select on expander, unless it's in an error state + if (! expander_status) { + // set active row low : 0 + // set other rows hi-Z : 1 + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(GPIOB); if (expander_status) goto out; + expander_status = i2c_write(0xFF & ~(1<> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + // No need to explicitly unselect expander pins--their I/O state is + // set simultaneously, with a single bitmask sent to i2c_write. When + // select_row selects a single pin, it implicitly unselects all the + // other ones. + // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1<<1 | 1<<2 | 1<<3); - PORTB &= ~(1<<1 | 1<<2 | 1<<3); - DDRD &= ~(1<<2 | 1<<3); - PORTD &= ~(1<<2 | 1<<3); - DDRC &= ~(1<<6); - PORTC &= ~(1<<6); + uint8_t pin = onboard_row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // LOW +} + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + unselect_row(x); + } } -/* Row pin configuration - * - * Teensy - * row: 6 7 8 9 10 11 - * pin: B1 B2 B3 D2 D3 C6 - * - * MCP23018 - * row: 0 1 2 3 4 5 - * pin: A0 A1 A2 A3 A4 A5 - */ -static void select_row(uint8_t row) +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) { - if (row < 6) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = onboard_row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + uint8_t column_state = 0; + + //select col and wait for selection to stabilize + select_col(current_col); + wait_us(30); + + if (current_col < 6) { + // read rows from expander + if (expander_status) { + // it's already in an error state; nothing we can do + return false; + } + + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(GPIOB); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_READ); if (expander_status) goto out; + column_state = i2c_readNak(); + + out: + i2c_stop(); + + column_state = ~column_state; + } else { + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + if ((_SFR_IO8(onboard_row_pins[current_row] >> 4) & _BV(onboard_row_pins[current_row] & 0xF)) == 0) { + column_state |= (1 << current_row); + } + } + } + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + if (column_state & (1 << current_row)) { + // key closed; set state bit in matrix + current_matrix[current_row] |= (ROW_SHIFTER << current_col); + } else { + // key open; clear state bit in matrix + current_matrix[current_row] &= ~(ROW_SHIFTER << current_col); + } + + // Determine whether the matrix changed state + if ((last_row_value != current_matrix[current_row]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + if (col_expanded[col]) { + // select on expander + if (expander_status) { // if there was an error // do nothing } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(1<> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + } +} + +static void unselect_col(uint8_t col) +{ + if (col_expanded[col]) { + // No need to explicitly unselect expander pins--their I/O state is + // set simultaneously, with a single bitmask sent to i2c_write. When + // select_col selects a single pin, it implicitly unselects all the + // other ones. + } else { + // unselect on teensy + uint8_t pin = onboard_col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + unselect_col(x); + } +} +#endif diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index 5905627760f..e8ad1b9bed3 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_TIMER -#define RGBLED_NUM 12 // Number of LEDs +//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h #define ws2812_PORTREG PORTD #define ws2812_DDRREG DDRD diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 53ff0b3ca81..66c9b9e8bdc 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -36,11 +36,14 @@ along with this program. If not, see . // #define EE_HANDS // Helix keyboard OLED support -//#define SSD1306OLED +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif /* Select rows configuration */ // Rows are 4 or 5 -#define HELIX_ROWS 5 +// #define HELIX_ROWS 5 see ./rules.mk /* key matrix size */ // Rows are doubled-up @@ -62,12 +65,19 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 +// Helix keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#ifdef RGBLED_BACK + #if HELIX_ROWS == 4 + #define RGBLED_NUM 25 + #elif HELIX_ROWS == 5 + #define RGBLED_NUM 32 + #endif +#else + #define RGBLED_NUM 6 +#endif -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no -// Helix keyboard : RGBLED_NUM 6 or 32 -#define RGBLED_NUM 6 #if RGBLED_NUM <= 6 #define RGBLIGHT_LIMIT_VAL 255 #else diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md index 02888855b81..307e5c30b93 100644 --- a/keyboards/helix/rev2/keymaps/default/readme.md +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -1,25 +1,141 @@ -SSD1306 OLED Display via I2C -====== +# The Default Helix Layout +## Layout -Features --------- +### Qwerty -Some features supported by the firmware: +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | 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 | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` +### Colemak +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` -* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this - requires pull-up resistors on the data and clock lines. -* OLED display will connect from either side +### Dvorak +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` +## Layers -Wiring ------- +|Priority|number|name|description| +| ---- | ---- | --- | --- | +|high|16|Adjust|Functions| +||4|Raise|Numeric charactors| +||3|Lower|Other charactors| +||2|Dvorak|Dvorak leyout| +||1|Colemak|Colemak leyout| +|low|0|Qwerty|QWERTY leyout(base)| +### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-------------------------------------------------------------------------------------------------' +``` -Work in progress... +### Raise +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-------------------------------------------------------------------------------------------------' +``` +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | Reset|RGBRST| | | | | | | | | | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + `-------------------------------------------------------------------------------------------------' +``` -OLED Configuration -------------------------------- +## Customize + +see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` + +``` +# Helix keyboard customize +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make helix:default +``` + +flash to keyboard +``` +$ make helix:default:avrdude +``` + +## Link +* more detail wrote in Japanese [helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md) +* [Helix top](https://github.com/MakotoKurauchi/helix) -Work in progress... diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md new file mode 100644 index 00000000000..88ffc02ff37 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md @@ -0,0 +1,98 @@ +# The Default Helix Layout +## 配列 + +### Qwerty配列 + +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | 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 | + |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + `-------------------------------------------------------------------------------------------------' +``` + +他の配列(Colemak,Dvorak)は、[readme.md](readme.md) を参照 + +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make helix:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 + +``` +$ make helix:default:avrdude +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make helix:default:clean +``` + +## カスタマイズ + +Helix キーボードを4行版として製作したり、オプションの OLED をつけたり、 +RGB バックライトまたは、RGB Underglow をつけた場合は、 +`qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` の以下の部分を編集して機能を有効化してください。 + +``` +# Helix keyboard customize +# you can edit follows 5 Variables +# jp: 以下の5つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +``` + +## 4行版Helix に対応する + +rules.mk の下記の部分を編集して 5 を 4 に変更してください。 + +``` +HELIX_ROWS = 4 # Helix Rows is 4 or 5 +``` + +## RGB バックライトを有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 + +``` +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +``` + +## RGB Underglow を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +``` + +## OLEDを有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +OLED_ENABLE = yes # OLED_ENABLE +``` + +## リンク + +* さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 +* [Helix top](https://github.com/MakotoKurauchi/helix) diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index dc4187c0838..d407dfb5eb9 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -14,14 +14,75 @@ 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 -# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32 -# Helix keyboard : RGBLIGHT_ENABLE = no or yes RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SWAP_HANDS_ENABLE = no # Enable one-hand typing +define HELIX_CUSTOMISE_MSG + $(info Helix customize) + $(info - OLED_ENABLE=$(OLED_ENABLE)) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) +endef + +# Helix keyboard customize +# you can edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +# Uncomment these for checking +# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 +# $(eval $(call HELIX_CUSTOMISE_MSG)) +# $(info ) + +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile endif + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 67344f94f03..53a581ec256 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -27,9 +27,10 @@ define HELIX_CUSTOMISE_MSG endef # Helix keyboard customize -# you can edit follows 5 Variables -# jp: 以下の5つの変数を必要に応じて編集します。 +# you can edit follows 6 Variables +# jp: 以下の6つの変数を必要に応じて編集します。 OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations @@ -97,6 +98,10 @@ ifeq ($(strip $(OLED_ENABLE)), yes) OPT_DEFS += -DOLED_ENABLE endif +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/helix/ssd1306.c b/keyboards/helix/ssd1306.c index 80efc3d1668..b13060ef733 100644 --- a/keyboards/helix/ssd1306.c +++ b/keyboards/helix/ssd1306.c @@ -4,7 +4,11 @@ #include "i2c.h" #include #include "print.h" +#ifndef LOCAL_GLCDFONT #include "common/glcdfont.c" +#else +#include +#endif #ifdef ADAFRUIT_BLE_ENABLE #include "adafruit_ble.h" #endif diff --git a/keyboards/hhkb/hhkb.h b/keyboards/hhkb/hhkb.h index e95125efcb2..30dc039a4c1 100644 --- a/keyboards/hhkb/hhkb.h +++ b/keyboards/hhkb/hhkb.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ @@ -22,7 +22,7 @@ } -#define KEYMAP_JP( \ +#define LAYOUT_JP( \ K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ K06, K66, K26, K16, K56, K76, KA6, K96, K86, KB6, KE6, KF6, KD6, KC6, \ diff --git a/keyboards/hhkb/info.json b/keyboards/hhkb/info.json new file mode 100644 index 00000000000..3beaff83da9 --- /dev/null +++ b/keyboards/hhkb/info.json @@ -0,0 +1,147 @@ +{ + "keyboard_name": "hhkb", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "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": "Return", "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": "", "x": 1.5, "y": 4 }, + { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, + { "x": 4, "y": 4, "w": 6 }, + { "label": "", "x": 10, "y": 4, "w": 1.5 }, + { "label": "", "x": 11.5, "y": 4 } + ] + }, + + "LAYOUT_JP": { + "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": "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": "Enter", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "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": "}", "x": 12.75, "y": 2 }, + { "label": "Shift", "x": 0, "y": 3, "w": 2 }, + { "label": "Z", "x": 2, "y": 3 }, + { "label": "X", "x": 3, "y": 3 }, + { "label": "C", "x": 4, "y": 3 }, + { "label": "V", "x": 5, "y": 3 }, + { "label": "B", "x": 6, "y": 3 }, + { "label": "N", "x": 7, "y": 3 }, + { "label": "M", "x": 8, "y": 3 }, + { "label": "<", "x": 9, "y": 3 }, + { "label": ">", "x": 10, "y": 3 }, + { "label": "?", "x": 11, "y": 3 }, + { "label": "_", "x": 12, "y": 3 }, + { "label": "\u2191", "x": 13, "y": 3 }, + { "label": "Shift", "x": 14, "y": 3 }, + { "label": "Fn", "x": 0, "y": 4 }, + { "label": "HH", "x": 1.25, "y": 4 }, + { "label": "\u2662", "x": 2.25, "y": 4 }, + { "label": "", "x": 3.25, "y": 4 }, + { "label": "NN", "x": 4.25, "y": 4 }, + { "x": 5.25, "y": 4, "w": 2.5 }, + { "label": "\u25cc", "x": 7.75, "y": 4 }, + { "label": "Kana", "x": 8.75, "y": 4 }, + { "label": "", "x": 9.75, "y": 4 }, + { "label": "Fn", "x": 10.75, "y": 4 }, + { "label": "\u2190", "x": 12, "y": 4 }, + { "label": "\u2193", "x": 13, "y": 4 }, + { "label": "\u2192", "x": 14, "y": 4 } + ] + } + } +} diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/keymaps/blakedietz/keymap.c index ef29a5c80df..a9146a4a08e 100644 --- a/keyboards/hhkb/keymaps/blakedietz/keymap.c +++ b/keyboards/hhkb/keymaps/blakedietz/keymap.c @@ -1,4 +1,4 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H // Layer names #define BASE 0 @@ -27,12 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [BASE] = KEYMAP( // default layer - 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_LEAD, \ - 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, \ - ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), \ - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), \ - TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), + [BASE] = LAYOUT( // default layer + 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_LEAD, + 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, + ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), + TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), /* Layer DEV: DEV mode (DEV Fn) TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging @@ -51,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+----------------------+------+------+ */ - [DEV] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, 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_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [DEV] = 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, 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_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), /* Layer MOUSE: MOUSE mode (MOUSE Fn) |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| @@ -74,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+----------------------+------+------+ */ - [MOUSE] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [MOUSE] = 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), /* Layer MEDIA: mode (Hold Semi-colon) |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| @@ -98,25 +98,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [MEDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) -}; + [MEDIA] = 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + 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) { - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/keymaps/cinaeco/keymap.c index 0b204600d15..f50f90a8437 100644 --- a/keyboards/hhkb/keymaps/cinaeco/keymap.c +++ b/keyboards/hhkb/keymaps/cinaeco/keymap.c @@ -1,7 +1,7 @@ /* -*- eval: (turn-on-orgtbl); -*- * cinaeco's HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H // Layers. #define QWER 0 @@ -14,15 +14,15 @@ // Easier-to-read Layer Arrays. #define ____ KC_TRNS -enum hhkb_keycodes { - DYNAMIC_MACRO_RANGE = SAFE_RANGE, +enum hhkb_keycodes +{ + DYNAMIC_MACRO_RANGE = SAFE_RANGE, }; #include "dynamic_macro.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* QWER Layer: Qwerty Default * * ,--------------------------------------------------------------. @@ -39,13 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - [QWER] = 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_EQL, KC_BSLS, KC_GRV, \ - KC_TAB, LT(MREC, 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, CTL_T(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, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - + [QWER] = 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_TAB, LT(MREC, 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, CTL_T(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, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), /* COLE Layer: Colemak * @@ -63,13 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - [COLE] = 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_EQL, KC_BSLS, KC_GRV, \ - KC_TAB, LT(MREC, 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_BSPC, \ - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), \ - KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - + [COLE] = 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_TAB, LT(MREC, 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_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), /* DVOR Layer: Dvorak * @@ -87,13 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - [DVOR] = KEYMAP( - KC_ESC, 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_BSLS, KC_GRV, \ - KC_TAB, LT(MREC, 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_BSPC, \ - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), \ - KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - + [DVOR] = LAYOUT( + KC_ESC, 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_BSLS, KC_GRV, + KC_TAB, LT(MREC, 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_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), /* HHKB Layer: HHKB mode (HHKB Fn) * @@ -110,13 +107,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------' */ - [HHKB] = KEYMAP( - 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_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, \ - ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ - ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, \ - ____, ____, ____, KC_MSTP, ____), - + [HHKB] = 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, + KC_CAPS, KC_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, + ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, + ____, ____, ____, KC_MSTP, ____), /* UTIL Layer: Extra utilities * @@ -134,13 +130,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - [UTIL] = KEYMAP( - RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, \ - ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, \ - ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, \ - ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____), - + [UTIL] = LAYOUT( + RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, + ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, + ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, + ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____), /* MREC Layer: Record macros with `q` * @@ -158,29 +153,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - [MREC] = KEYMAP( - ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____) + [MREC] = LAYOUT( + ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____) }; - - const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; }; // For Dynamic Macros. -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - return true; +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (!process_record_dynamic_macro(keycode, record)) + { + return false; + } + return true; } diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index 91faea942cc..666471a03b3 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -1,18 +1,20 @@ /* * dbroqua HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H -enum planck_layers { - _DEFAULT, - _ALTERNATE, - _FN, - _ADJUST +enum planck_layers +{ + _DEFAULT, + _ALTERNATE, + _FN, + _ADJUST }; -enum planck_keycodes { - DEF = SAFE_RANGE, - ALT +enum planck_keycodes +{ + DEF = SAFE_RANGE, + ALT }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -29,13 +31,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Alt | Gui | Space | Gui | Alt | * `----------------------------------------------------------------´ */ - [_DEFAULT] = 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_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(_FN), \ - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT - ), + [_DEFAULT] = 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_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(_FN), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), /* Alternamte layer: swap alt/gui * ,-----------------------------------------------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | @@ -49,13 +50,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Gui | Alt | Space | AltGr | RGui| * `----------------------------------------------------------------´ */ - [_ALTERNATE] = 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_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(_FN), \ - KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI - ), + [_ALTERNATE] = 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_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(_FN), + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI), /* FN Layer * ,-----------------------------------------------------------------------------------------. @@ -70,13 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Adjust | Stop | | * `----------------------------------------------------------------´ */ - [_FN] = KEYMAP( - 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_TRNS, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, TG(_ADJUST), KC_MSTP, KC_TRNS - ), + [_FN] = 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, + 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_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, TG(_ADJUST), KC_MSTP, KC_TRNS), /* SWITCH LAYOUT * ,-----------------------------------------------------------------------------------------. @@ -91,14 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * `----------------------------------------------------------------´ */ - [_ADJUST] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - DEF, ALT, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; + [_ADJUST] = 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + DEF, ALT, KC_TRNS, KC_TRNS, KC_TRNS)}; const uint16_t PROGMEM fn_actions[] = { @@ -106,35 +103,42 @@ 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { case DEF: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_DEFAULT); - } - return false; - break; + if (record->event.pressed) + { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_DEFAULT); + } + return false; + break; case ALT: - if (record->event.pressed) { - set_single_persistent_default_layer(_ALTERNATE); - } - return false; - break; - } - return true; + if (record->event.pressed) + { + set_single_persistent_default_layer(_ALTERNATE); + } + return false; + break; + } + return true; } diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/keymaps/dbroqua/readme.md index 0afebc84c87..05ae9ff4276 100644 --- a/keyboards/hhkb/keymaps/dbroqua/readme.md +++ b/keyboards/hhkb/keymaps/dbroqua/readme.md @@ -1,9 +1,11 @@ # Dbroqua Layout -* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 # Programming Instructions: + Enter into programming mode and run the following command. + +``` +$ sudo LAYOUT=dbroqua make dfu ``` -$ sudo KEYMAP=dbroqua make dfu -``` \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/keymaps/default/keymap.c index bd5dd8372d5..3a01fd80205 100644 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ b/keyboards/hhkb/keymaps/default/keymap.c @@ -1,7 +1,7 @@ /* -*- eval: (turn-on-orgtbl); -*- * default HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define BASE 0 #define HHKB 1 @@ -24,14 +24,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [BASE] = KEYMAP( // 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), - - + [BASE] = LAYOUT( // 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) |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| @@ -50,13 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [HHKB] = KEYMAP( - 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)}; - + [HHKB] = 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, + 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)}; const uint16_t PROGMEM fn_actions[] = { @@ -64,15 +61,19 @@ 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/keymaps/enoch_jp/keymap.c index 4068e579c9e..60bf832a741 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/keymaps/enoch_jp/keymap.c @@ -1,7 +1,6 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS - /* Layer 0: HHKB JP * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| @@ -31,29 +30,27 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP_JP( - 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_GRAVE, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, 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_BSLS, - KC_BSPC, KC_ZKHK, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, KC_RSFT, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), + [0] = LAYOUT_JP( + 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_GRAVE, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, 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_BSLS, + KC_BSPC, KC_ZKHK, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, KC_RSFT, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - [1] = KEYMAP_JP( - _______, 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_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______ - ) -}; + [1] = LAYOUT_JP( + _______, 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_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; }; /*void matrix_scan_user(void) { diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/keymaps/eric/keymap.c new file mode 100644 index 00000000000..46dcd95c03a --- /dev/null +++ b/keyboards/hhkb/keymaps/eric/keymap.c @@ -0,0 +1,77 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#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( // 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_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI), + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | PgU | Up | PgD | Hm | & | ~ | | | | Psc | Up | Del | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | Lef | Dow | Rig | En | * | | | PgU | Hom | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | _ | + | ( | ) | | | | | PgD | End | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [HHKB] = LAYOUT( + KC_CAPS, 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_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, 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; +}; diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/keymaps/jp/keymap.c index 8525adce59d..24e4a04a53d 100644 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ b/keyboards/hhkb/keymaps/jp/keymap.c @@ -1,8 +1,7 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS - /* Layer 0: HHKB JP * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| @@ -32,25 +31,23 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP_JP( - 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, - MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = KEYMAP_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______ - ) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { - return MACRO_NONE; + [0] = LAYOUT_JP( + 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, + MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; } const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/keymaps/jp_mac/keymap.c index e08bf33df11..326f22cd123 100644 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ b/keyboards/hhkb/keymaps/jp_mac/keymap.c @@ -1,8 +1,7 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS - /* Layer 0: HHKB JP * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| @@ -32,25 +31,23 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP_JP( - 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, - MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = KEYMAP_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, KC_DEL, _______, _______ - ) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { - return MACRO_NONE; + [0] = LAYOUT_JP( + 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, + MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; } const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/keymaps/krusli/config.h new file mode 100644 index 00000000000..af2fb9d8a52 --- /dev/null +++ b/keyboards/hhkb/keymaps/krusli/config.h @@ -0,0 +1 @@ +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/keymaps/krusli/keymap.c new file mode 100644 index 00000000000..3a01fd80205 --- /dev/null +++ b/keyboards/hhkb/keymaps/krusli/keymap.c @@ -0,0 +1,79 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#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( // 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( + 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)}; + +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; +}; diff --git a/keyboards/hhkb/keymaps/lxol/keymap.c b/keyboards/hhkb/keymaps/lxol/keymap.c index ccf1e07042f..3e3b3d2ed0c 100644 --- a/keyboards/hhkb/keymaps/lxol/keymap.c +++ b/keyboards/hhkb/keymaps/lxol/keymap.c @@ -1,7 +1,7 @@ /* -*- eval: (turn-on-orgtbl); -*- * lxol HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define BASE 0 #define WIN 1 @@ -11,7 +11,6 @@ #define RALTLEV 5 #define LALTLEV 6 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer @@ -30,16 +29,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [BASE] = KEYMAP( // layer 0 : default - - - 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, LT(LALTLEV,KC_A), LT(LGUILEV,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV,KC_L), LT(RALTLEV,KC_SCLN), KC_QUOT, KC_FN0, \ - 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), - + [BASE] = LAYOUT( // layer 0 : default + 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, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, KC_FN0, + 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 1: HHKB mode (HHKB Fn) |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| @@ -57,13 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---+---+---+---+---| */ - [HHKB] = KEYMAP( - 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), - + [HHKB] = 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, + 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), /* Layer LGUI: All keys with RGUI modifier |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| @@ -81,13 +76,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [RGUILEV] = KEYMAP( // Right GUI layer by KC_L + [RGUILEV] = LAYOUT( // Right GUI layer by KC_L - RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), \ - RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), \ - RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), KC_FN0, \ - RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, \ - KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), + RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), + RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), + RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), KC_FN0, + RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, + KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), /* Layer LGUI: All keys with LGUI modifier |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| @@ -105,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [LGUILEV] = KEYMAP( // Right GUI layer by KC_L + [LGUILEV] = LAYOUT( // Right GUI layer by KC_L - LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), \ - LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), \ - LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), KC_FN0, \ - KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, \ - KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), + LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), + LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), + LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), KC_FN0, + KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, + KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), /* Layer LALT: All keys with RALT modifier |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| @@ -129,13 +124,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [RALTLEV] = KEYMAP( // Right ALT layer by KC_L + [RALTLEV] = LAYOUT( // Right ALT layer by KC_L - RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), \ - RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), \ - RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), KC_FN0, \ - RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, \ - KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), + RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), + RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), + RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), KC_FN0, + RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, + KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), /* Layer LALT: All keys with LALT modifier |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| @@ -153,14 +148,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [LALTLEV] = KEYMAP( // Right ALT layer by KC_L - - LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), \ - LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), \ - LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), KC_FN0, \ - KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, \ - KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), + [LALTLEV] = LAYOUT( // Right ALT layer by KC_L + LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), + LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), + LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), KC_FN0, + KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, + KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), /* Layer WIN: Win layer |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| @@ -178,31 +172,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-------+------+------| */ - [WIN] = KEYMAP( // BASE level with swapped GUI/ALT - - - 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, LT(LGUILEV,KC_A), LT(LALTLEV,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV,KC_L), LT(RGUILEV,KC_SCLN), KC_QUOT, KC_FN0, \ - 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_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; + [WIN] = LAYOUT( // BASE level with swapped GUI/ALT + 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, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, KC_FN0, + 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_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* + [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* }; 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/keymaps/mjt/keymap.c index b5cd9971488..d1725f5c75a 100644 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ b/keyboards/hhkb/keymaps/mjt/keymap.c @@ -1,7 +1,7 @@ /* -*- eval: (turn-on-orgtbl); -*- * default HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define BASE 0 #define HHKB 1 @@ -10,10 +10,11 @@ #define CTL_ESC CTL_T(KC_ESC) #define MACSLEEP LCTL(LSFT(KC_POWER)) -enum hhkb_keycodes { - QWERTY = SAFE_RANGE, - DYNKEY, - DYNAMIC_MACRO_RANGE, +enum hhkb_keycodes +{ + QWERTY = SAFE_RANGE, + DYNKEY, + DYNAMIC_MACRO_RANGE, }; #include "dynamic_macro.h" @@ -36,14 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [BASE] = KEYMAP( // default layer - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - CTL_ESC, 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, SFT_T(KC_ENT), TT(FUNK), \ - KC_LALT, KC_LGUI, /* */ KC_SPC, MO(DYN), KC_RALT), - - + [BASE] = LAYOUT( // default layer + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + CTL_ESC, 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, SFT_T(KC_ENT), TT(FUNK), + KC_LALT, KC_LGUI, /* */ KC_SPC, MO(DYN), KC_RALT), /* Layer HHKB: HHKB mode (HHKB Fn) |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| @@ -62,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [HHKB] = KEYMAP( + [HHKB] = 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, \ 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, \ @@ -70,20 +69,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), */ - [FUNK] = KEYMAP( - 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_UP, 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_LEFT, KC_DOWN, KC_RGHT, 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), -[DYN] = KEYMAP( -KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \ -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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, 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_PGDN, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS) - }; - + [FUNK] = 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, + KC_CAPS, KC_TRNS, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, 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), + [DYN] = LAYOUT( + KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, + 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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, 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_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)}; const uint16_t PROGMEM fn_actions[] = { @@ -91,24 +88,30 @@ 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); - if (!process_record_dynamic_macro(macro_kc, record)) { - return false; - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); + if (!process_record_dynamic_macro(macro_kc, record)) + { + return false; + } - return true; + return true; } diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/keymaps/rdg_jp/keymap.c index 700ba3a0b76..2afac7a0b0e 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/keymaps/rdg_jp/keymap.c @@ -1,21 +1,20 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS -enum { - ZER, - HDN, - OSY +enum +{ + ZER, + HDN, + OSY }; - #define CTL_ESC CTL_T(KC_ESC) #define SFT_BSP SFT_T(KC_BSPC) #define SCRNS3 LGUI(LCTL(LSFT(KC_3))) #define SCRNS4 LGUI(LCTL(LSFT(KC_4))) - /* hhkb jp ~ layout * ,-----------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| @@ -31,33 +30,30 @@ enum { */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [ZER] = KEYMAP_JP( - 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_INS, 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, - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRV, 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_BSLS, KC_UP, KC_RSFT, - MO(HDN), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC, SFT_BSP, MO(HDN), MO(OSY), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [HDN] = KEYMAP_JP( - 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, - _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, KC_ENT, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, KC_UNDS , KC_DEL, _______, _______, _______, KC_HOME, KC_PGDN, KC_END - ), - - [OSY] = KEYMAP_JP( - _______, _______, _______, SCRNS3, SCRNS4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______ - ) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { - return MACRO_NONE; + [ZER] = LAYOUT_JP( + 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_INS, 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, + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRV, 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_BSLS, KC_UP, KC_RSFT, + MO(HDN), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC, SFT_BSP, MO(HDN), MO(OSY), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT), + + [HDN] = LAYOUT_JP( + 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, + _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, KC_ENT, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, KC_UNDS, KC_DEL, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + [OSY] = LAYOUT_JP( + _______, _______, _______, SCRNS3, SCRNS4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; } const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/keymaps/sh_jp/keymap.c index d4cb3b04188..39710a65428 100644 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/keymaps/sh_jp/keymap.c @@ -1,58 +1,54 @@ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS -enum { - DVOR, - QWER, - NEW_CMD, - SYMB, - FUNC +enum +{ + DVOR, + QWER, + NEW_CMD, + SYMB, + FUNC }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DVOR] = KEYMAP_JP( - KC_ESC, 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_JYEN, KC_BSPC, - 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_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, - MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT - ), - [QWER] = KEYMAP_JP( - 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, - MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [NEW_CMD] = KEYMAP_JP( - _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), - _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), - _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, - LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, - _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT) - ), - - [SYMB] = KEYMAP_JP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______,_______, _______, - _______, 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), _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [FUNC] = KEYMAP_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______ - ) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { - return MACRO_NONE; + [DVOR] = LAYOUT_JP( + KC_ESC, 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_JYEN, KC_BSPC, + 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_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, + MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT), + [QWER] = LAYOUT_JP( + 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_JYEN, 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_RO, KC_UP, KC_RSFT, + MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT), + + [NEW_CMD] = LAYOUT_JP( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), + _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), + _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, + LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, + _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT)), + + [SYMB] = LAYOUT_JP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______, _______, _______, + _______, 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), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [FUNC] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; } const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c index f0700d7ba13..5f3881539a4 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/keymaps/shela/keymap.c @@ -1,11 +1,12 @@ /* * HHKB Pro 2 US Layout for shela */ -#include "hhkb.h" +#include QMK_KEYBOARD_H #include "keymap_jis2us.h" #include "action_pseudo_lut.h" -enum keymap_layout { +enum keymap_layout +{ BASE = 0, PSEUDO_US, DVORAK, @@ -31,11 +32,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [BASE] = - 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_EQL, KC_GRV, 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, \ - OSM(MOD_LSFT),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_FN0, \ - KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT), + 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_GRV, 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, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, + KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), /* Layer 1: Pseudo US Layout Layer * ,-----------------------------------------------------------------------------------------. @@ -51,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [PSEUDO_US] = - KEYMAP(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, \ - KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, \ - KC_LCTL,KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, \ - KC_LSFT,KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT,KC_FN0, \ - KC_LGUI,KC_FN3, KC_FN2, KC_FN4 ,KC_RGUI), + LAYOUT(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, + KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, + KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, + KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, KC_FN0, + KC_LGUI, KC_FN3, KC_FN2, KC_FN4, KC_RGUI), /* Layer 2: Dvorak Layer * ,-----------------------------------------------------------------------------------------. @@ -71,11 +72,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [DVORAK] = - KEYMAP(KC_ESC, 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_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_LCTL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,KC_ENT, \ - 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_FN0, \ - KC_LALT,KC_LGUI, KC_FN2, KC_RGUI,KC_RALT), + LAYOUT(KC_ESC, 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_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_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + 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_FN0, + KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT), /* Layer 3: Mouse layer * ,-----------------------------------------------------------------------------------------. @@ -91,11 +92,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [MOUSE] = - KEYMAP(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_NO, KC_TRNS, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1,KC_BTN2,KC_BTN3,KC_NO, KC_NO, KC_TRNS,KC_FN0, \ - KC_TRNS,KC_TRNS, KC_BTN1, KC_TRNS,KC_TRNS), + 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_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, KC_FN0, + KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS), /* Layer 4: Tenkey layer * ,-----------------------------------------------------------------------------------------. @@ -111,11 +112,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [TENKEY] = - KEYMAP(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS,KC_PAST,KC_PMNS,KC_NO, KC_BSPC, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7,KC_KP_8,KC_KP_9,KC_PPLS,KC_NO, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4,KC_KP_5,KC_KP_6,KC_PENT, \ - KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1,KC_KP_2,KC_KP_3,KC_PPLS,KC_FN0, \ - KC_TRNS,KC_TRNS, KC_FN2, KC_KP_0,KC_PDOT), + LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, KC_FN0, + KC_TRNS, KC_TRNS, KC_FN2, KC_KP_0, KC_PDOT), /* Layer 5: HHKB mode (HHKB Fn) * ,-----------------------------------------------------------------------------------------. @@ -131,11 +132,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [HHKB] = - KEYMAP(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_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, 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), + 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, + KC_CAPS, KC_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, 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), /* Layer 6: SpaceFN * ,-----------------------------------------------------------------------------------------. @@ -151,26 +152,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [SPACE_FN] = - KEYMAP(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_NO, KC_DEL, \ - KC_TRNS,KC_HOME,KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME,KC_END, KC_NO, KC_PSCR,KC_SLCK,KC_PAUS,KC_INS, \ - KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_PGUP,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_TRNS, \ - KC_TRNS,KC_NO, KC_NO, KC_PGDN,KC_NO, KC_SPC, KC_NO, KC_PGDN,KC_PGUP,KC_NO, KC_NO, KC_TRNS,KC_NO, \ - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), + LAYOUT(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_NO, KC_DEL, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_PGDN, KC_NO, KC_SPC, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; /* * user defined action function */ -enum function_id { +enum function_id +{ PSEUDO_US_FUNCTION, }; -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ - switch (id) { - case PSEUDO_US_FUNCTION: - action_pseudo_lut(record, BASE, keymap_jis2us); - break; + switch (id) + { + case PSEUDO_US_FUNCTION: + action_pseudo_lut(record, BASE, keymap_jis2us); + break; } } diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/keymaps/shela/keymap_jis2us.h index cf2bd4f0e84..edc1e6d869b 100644 --- a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/keymaps/shela/keymap_jis2us.h @@ -1,5 +1,5 @@ -#ifndef KEYMAP_JIS2US_H -#define KEYMAP_JIS2US_H +#ifndef LAYOUT_JIS2US_H +#define LAYOUT_JIS2US_H /* keymap for convert from JIS to US */ const uint16_t PROGMEM keymap_jis2us[][2] = { diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c index 484df851a52..428861640fc 100644 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ b/keyboards/hhkb/keymaps/smt/keymap.c @@ -1,18 +1,19 @@ /* -*- eval: (turn-on-orgtbl); -*- * default HHKB Layout */ -#include "hhkb.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _COLEMAK 1 #define _DVORAK 2 #define _HHKB 3 -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - HHKB +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + HHKB }; // Fillers to make layering more clear @@ -20,10 +21,10 @@ enum planck_keycodes { #define XXXXXXX KC_NO // Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) -#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -43,14 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [_QWERTY] = KEYMAP( // Qwerty 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, MEH_GRV, \ - HPR_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, \ - 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_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), - - + [_QWERTY] = LAYOUT( // Qwerty 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, MEH_GRV, + HPR_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, + 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_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 COLEMAK: Colemak Layer |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| @@ -68,14 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [_COLEMAK] = KEYMAP( // Colemak 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, MEH_GRV, \ - HPR_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_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_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HHKB), \ - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), - - + [_COLEMAK] = LAYOUT( // Colemak 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, MEH_GRV, + HPR_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_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), /* Layer DVORAK: Dvorak Layer |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| @@ -93,14 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+-----------------------+------+------| */ - [_DVORAK] = KEYMAP( // Dvorak layer - KC_ESC, 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_BSLS, MEH_GRV, \ - HPR_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_BSPC, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, SFT_ENT, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_HHKB), \ - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), - - + [_DVORAK] = LAYOUT( // Dvorak layer + KC_ESC, 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_BSLS, MEH_GRV, + HPR_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_BSPC, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, SFT_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), /* Layer HHKB: HHKB mode (HHKB Fn) |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----| @@ -119,13 +114,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_HHKB] = KEYMAP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BSPC, \ - _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ - _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______)}; - + [_HHKB] = 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, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BSPC, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______)}; const uint16_t PROGMEM fn_actions[] = { @@ -133,44 +127,54 @@ 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +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) { +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; + 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; + 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; + if (record->event.pressed) + { + persistent_default_layer_set(1UL << _DVORAK); + } + return false; + break; + } + return true; } diff --git a/keyboards/iris/info.json b/keyboards/iris/info.json index 984ac56255c..ed4528b9d28 100644 --- a/keyboards/iris/info.json +++ b/keyboards/iris/info.json @@ -5,7 +5,7 @@ "width": 14.5, "height": 5, "layouts": { - "KEYMAP": { + "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}] } } diff --git a/keyboards/iris/keymaps/davidrambo/keymap.c b/keyboards/iris/keymaps/davidrambo/keymap.c index 31ec3eba15a..40f0d014540 100644 --- a/keyboards/iris/keymaps/davidrambo/keymap.c +++ b/keyboards/iris/keymaps/davidrambo/keymap.c @@ -5,12 +5,12 @@ extern keymap_config_t keymap_config; //keycode shorthands -#define KC____ KC_TRNS +#define KC____ KC_TRNS // three underscores "___" for transparent #define KC_SYM MO(3) #define KC_MAC TO(0) #define KC_PC TO(1) #define KC_GM TO(2) -#define KC_NAV LT(4, KC_TAB) +#define KC_NAVMAC LT(4, KC_TAB) #define KC_NAVPC LT(5, KC_TAB) //text editor shortcuts for NAV and NAVPC @@ -18,8 +18,8 @@ extern keymap_config_t keymap_config; #define KC_AR LALT(KC_RGHT) #define KC_CL LCTL(KC_LEFT) #define KC_CR LCTL(KC_RGHT) -#define KC_A_BS LALT(KC_BSPC) -#define KC_C_BS LALT(KC_BSPC) +#define KC_ABSPC LALT(KC_BSPC) +#define KC_CBSPC LCTL(KC_BSPC) //internet browser tab shortcuts and window swapping for Mac and Windows #define KC_GSL LGUI(S(KC_LEFT)) @@ -38,7 +38,7 @@ extern keymap_config_t keymap_config; #define _PC 1 #define _GAME 2 #define _SYMBOL 3 -#define _NAV 4 +#define _NAVMAC 4 #define _NAVPC 5 enum { @@ -56,13 +56,13 @@ enum { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_COLEMAK] = KC_KEYMAP( + [_COLEMAK] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| GRV , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| - NAV , A , R , S , T , D , H , N , E , I , O ,QUOT, + NAVMAC, A , R , S , T , D , H , N , E , I , O ,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| SFLK, Z , X , C , V , B , PC , ENT , K , M ,COMM, DOT,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // `----+----+----' `----+----+----' ), - [_PC] = KC_KEYMAP( + [_PC] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI , LCTL , CTBS , ___ , ___ , ___ ), - [_GAME] = KC_KEYMAP( + [_GAME] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LALT , LALT , SPC, BSPC, MAC, ___ ), - [_SYMBOL] = KC_KEYMAP( + [_SYMBOL] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , @@ -104,10 +104,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___ , HOME, END , VOLD, VOLU, MPLY,___, ___,___, MINS, ___ , ___ , ___ , ___ , - ___ , ___ , A_BS, ___, ___ , ___ + ___ , ___ , ___, ___, ___ , ___ ), - [_NAV] = KC_KEYMAP( + [_NAVMAC] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , @@ -115,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___ , ___ , ___ , ___ , ___ , ___ , GSL , LEFT, DOWN, RGHT, GSR , ___ , - ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,G_TAB, ___ , ___ , ___ , ___ , ___ , + ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,G_TAB,ABSPC, ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ), - [_NAVPC] = KC_KEYMAP( + [_NAVPC] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___ , ___ , ___ , ___ , ___ , ___ , CPGU, LEFT, DOWN, RGHT, CPGD, ___ , - ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,A_TAB, ___ , ___ , ___ , ___ , ___ , + ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,A_TAB,CBSPC, ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ), diff --git a/keyboards/iris/keymaps/dnrambo/keymap.c b/keyboards/iris/keymaps/dnrambo/keymap.c deleted file mode 100644 index 31ec3eba15a..00000000000 --- a/keyboards/iris/keymaps/dnrambo/keymap.c +++ /dev/null @@ -1,158 +0,0 @@ -#include "iris.h" -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -//keycode shorthands -#define KC____ KC_TRNS -#define KC_SYM MO(3) -#define KC_MAC TO(0) -#define KC_PC TO(1) -#define KC_GM TO(2) -#define KC_NAV LT(4, KC_TAB) -#define KC_NAVPC LT(5, KC_TAB) - -//text editor shortcuts for NAV and NAVPC -#define KC_AL LALT(KC_LEFT) -#define KC_AR LALT(KC_RGHT) -#define KC_CL LCTL(KC_LEFT) -#define KC_CR LCTL(KC_RGHT) -#define KC_A_BS LALT(KC_BSPC) -#define KC_C_BS LALT(KC_BSPC) - -//internet browser tab shortcuts and window swapping for Mac and Windows -#define KC_GSL LGUI(S(KC_LEFT)) -#define KC_GSR LGUI(S(KC_RGHT)) -#define KC_CPGD LCTL(KC_PGDN) -#define KC_CPGU LCTL(KC_PGUP) - -#define KC_CMBS GUI_T(KC_BSPC) -#define KC_CTBS CTL_T(KC_BSPC) -#define KC_C_TAB LCTL(KC_TAB) -#define KC_G_TAB LGUI(KC_TAB) -#define KC_A_TAB LALT(KC_TAB) - -//layer shorthands -#define _COLEMAK 0 -#define _PC 1 -#define _GAME 2 -#define _SYMBOL 3 -#define _NAV 4 -#define _NAVPC 5 - -enum { -// SFT_LCK //tapdance declarations - COLEMAK = 0, - PC, - GAME, - SYMBOL, - NAV, //Navigation layer for Mac Colemak - NAVPC, //Navigation layer for PC Colemak - SFT_LCK //tapdance declaration -}; - -#define KC_SFLK TD(SFT_LCK) // alias for tapdance - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_COLEMAK] = KC_KEYMAP( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - NAV , A , R , S , T , D , H , N , E , I , O ,QUOT, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - SFLK, Z , X , C , V , B , PC , ENT , K , M ,COMM, DOT,SLSH,RSFT, - //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - LCTL,LGUI,CMBS, SPC, SYM, LALT - // `----+----+----' `----+----+----' - ), - - [_PC] = KC_KEYMAP( - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - NAVPC,___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , GM, ___, ___ , ___ , ___ , ___ , ___ , ___ , - - LGUI , LCTL , CTBS , ___ , ___ , ___ - ), - - [_GAME] = KC_KEYMAP( - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - ___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , - - TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ , - - I , LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ , - - LALT , LALT , SPC, BSPC, MAC, ___ - ), - - [_SYMBOL] = KC_KEYMAP( - - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - LBRC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , RBRC, - - BSLS, EXLM, AT , HASH, DLR , PERC, CIRC, AMPR, ASTR, LPRN, RPRN, EQL , - - ___ , HOME, END , VOLD, VOLU, MPLY,___, ___,___, MINS, ___ , ___ , ___ , ___ , - - ___ , ___ , A_BS, ___, ___ , ___ - ), - - [_NAV] = KC_KEYMAP( - - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , C_TAB, AL , UP , AR , DEL , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , GSL , LEFT, DOWN, RGHT, GSR , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,G_TAB, ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ - ), - - [_NAVPC] = KC_KEYMAP( - - ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , C_TAB, CL , UP , CR , DEL , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ , CPGU, LEFT, DOWN, RGHT, CPGD, ___ , - - ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,A_TAB, ___ , ___ , ___ , ___ , ___ , - - ___ , ___ , ___ , ___ , ___ , ___ - ), - -}; - -// Shift vs. capslock function. From bbaserdem's Planck keymap. -void caps_tap (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_LSFT); - } else if (state->count == 2) { - unregister_code (KC_LSFT); - register_code (KC_CAPS); - } -} -void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_LSFT); - } else { - unregister_code (KC_CAPS); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Shift, twice for Caps Lock - [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end) -}; \ No newline at end of file diff --git a/keyboards/iris/keymaps/dnrambo/readme.md b/keyboards/iris/keymaps/dnrambo/readme.md deleted file mode 100644 index 4d21f37c091..00000000000 --- a/keyboards/iris/keymaps/dnrambo/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer. -# Symbol layer is based on my Planck layout, so it provides numbers, symbols, and volume controls. -# Two Navigation layers, for Mac and Windows Colemak layers respectively. \ No newline at end of file diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/iris/keymaps/drashna/config.h new file mode 100644 index 00000000000..2a451e7c772 --- /dev/null +++ b/keyboards/iris/keymaps/drashna/config.h @@ -0,0 +1,59 @@ +/* +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 +#undef USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef RGBLIGHT_ENABLE +#undef RGBLED_NUM +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#endif // RGBLIGHT_ENABLE + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#ifdef RGBLIGHT_ENABLE +#define NO_MUSIC_MODE +#endif //RGBLIGHT_ENABLE +#endif //AUDIO_ENABLE + + +#undef PRODUCT +#ifdef KEYBOARD_iris_rev2 +#define PRODUCT Drashna Hacked Iris Rev.2 +#endif + +#endif diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c new file mode 100644 index 00000000000..64d074fc9f1 --- /dev/null +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -0,0 +1,141 @@ + +#include QMK_KEYBOARD_H +#include "drashna.h" + + +#define KC_ALAP ALT_T(KC_APP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_wrapper( + KC_GESC, ________________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 + ), + [_COLEMAK] = LAYOUT_wrapper( + KC_GESC, ________________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 + ), + [_DVORAK] = LAYOUT_wrapper( + KC_GESC, ________________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 + ), + [_WORKMAN] = LAYOUT_wrapper( + KC_GESC, ________________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 + ), + + [_MODS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + + [_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_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, _______, _______, _______ + ), + + [_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, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_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, + _______, _______, _______, _______, _______, _______ + ) + +}; + + + +#ifdef INDICATOR_LIGHT +uint32_t layer_state_set_keymap (uint32_t state) { + uint8_t modifiders = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); + + + if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<RGB backgoundlighting layer and functionallity + +i added: +>mouse layer + +the qwerty, lower and raise layer are more or less the same. here and there some keys are different. +take a look at the keymap.c \ No newline at end of file diff --git a/keyboards/iris/keymaps/impstyle/config.h b/keyboards/iris/keymaps/impstyle/config.h new file mode 100644 index 00000000000..6fc14133f8d --- /dev/null +++ b/keyboards/iris/keymaps/impstyle/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" + +/* 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 MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_TIME_TO_MAX 20 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +#define TAPPING_TOGGLE 2 // double tab + +#include "../../config.h" + +#endif diff --git a/keyboards/iris/keymaps/impstyle/keymap.c b/keyboards/iris/keymaps/impstyle/keymap.c new file mode 100644 index 00000000000..d061a850a1d --- /dev/null +++ b/keyboards/iris/keymaps/impstyle/keymap.c @@ -0,0 +1,111 @@ +// iris qwerty layout with mouse layer. +// double tab to toggle is not working atm + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _MOUSE 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + MOUSE, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define KC_LOWR MO(_LOWER) // Lower layer +#define KC_RASE MO(_RAISE) // Raise layer +#define KC_TGLW TG(_LOWER) // toggle lower +#define KC_TGRS TG(_RAISE) // toggle raise +#define KC_MOUS TT(_MOUSE) // double tab toggle mouse layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // QUERTY LAYER + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + // ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + // LCTL, Z , X , C , V , B ,PLUS , MOUS , N , M ,COMM,DOT ,SLSH,BSLASH, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + // LGUI,RASE,SPC , ENT ,LOWR,LALT + // `----+----+----' `----+----+----' + + [_QWERTY] = LAYOUT( + 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_MINS , + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PLUS, KC_MOUS , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LGUI,KC_RASE,KC_SPC , KC_ENT ,KC_LOWR,KC_LALT + ), + + // LOWER Layer + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + // TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // , ,PGUP, , ,LBRC, RBRC, P7 , P8 , P9 ,PLUS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // ,HOME,PGDN,END, ,LPRN, RPRN, P4 , P5 , P6 ,MINS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + // , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + // , ,DEL , BSPC , , P0 + // `----+----+----' `----+----+----' + + [_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_PGUP,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,KC_PLUS,_______, + _______ ,KC_HOME,KC_PGDN,KC_END,_______,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______,_______, _______ ,_______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS , + _______ ,_______,KC_PSCR , KC_DEL ,_______, KC_P0 +), + // RAISE LAYER + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + // F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // , , UP , , ,LBRC, RBRC, ,NLCK,INS ,SLCK,MUTE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // ,LEFT,DOWN,RGHT, ,LPRN, RPRN,MPRV,MPLY,MNXT, ,VOLU, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + // , , , , , , , PLUS , , , , , ,VOLD, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + // , , , EQL, , + // `----+----+----' `----+----+----' + + [_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_UP ,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______ ,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______,_______, KC_PLUS,_______,_______,_______,_______,_______,KC_VOLD, + _______ ,_______,_______, KC_EQL,_______,_______ + ), + // MOUSE LAYER + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + // , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // , ,MS_UP, , , , MS_WH_UP, , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + // ,MS_LEFT,MS_DOWN,MS_RGHT, ,, MS_WH_DN,MS_BT1,MS_BT2,MS_BT3, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + // , , , , , , , , , , ,MS_ACC0,MS_ACC1MS_ACC2 + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + // , , , , , + // `----+----+----' `----+----+----' + [_MOUSE] = LAYOUT( + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,_______ ,_______ , + _______ ,_______, KC_MS_UP ,_______,_______,_______, KC_MS_WH_UP,_______,_______,_______ ,_______,_______, + _______ ,KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,_______,_______, KC_MS_WH_DOWN,KC_MS_BTN1,KC_MS_BTN2,KC_MS_BTN3,_______,_______, + _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2, + _______ ,_______,_______, _______,_______,_______ + ), + +}; \ No newline at end of file diff --git a/keyboards/iris/keymaps/dnrambo/rules.mk b/keyboards/iris/keymaps/impstyle/rules.mk similarity index 69% rename from keyboards/iris/keymaps/dnrambo/rules.mk rename to keyboards/iris/keymaps/impstyle/rules.mk index 0b7e7b9057f..4db5ef00d26 100644 --- a/keyboards/iris/keymaps/dnrambo/rules.mk +++ b/keyboards/iris/keymaps/impstyle/rules.mk @@ -1,6 +1,7 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no +MOUSEKEY_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/jd40/info.json b/keyboards/jd40/info.json new file mode 100644 index 00000000000..4d321ee3562 --- /dev/null +++ b/keyboards/jd40/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "jd40", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "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": "Back
Space", "x": 11, "y": 0 }, + { "label": "Tab", "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": "Enter", "x": 10.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": "Shift", "x": 9.75, "y": 2, "w": 1.25 }, + { "label": ">", "x": 11, "y": 2 }, + { "label": "Ctrl", "x": 0, "y": 3 }, + { "label": "Fn", "x": 1, "y": 3 }, + { "label": "Alt", "x": 2, "y": 3 }, + { "label": "Super", "x": 3, "y": 3, "w": 1.25 }, + { "x": 4.25, "y": 3, "w": 1.75 }, + { "x": 6, "y": 3, "w": 1.75 }, + { "label": "Menu", "x": 7.75, "y": 3, "w": 1.25 }, + { "label": "Alt", "x": 9, "y": 3 }, + { "label": "Fn2", "x": 10, "y": 3 }, + { "label": "Ctrl", "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h index 77a12229939..0000bc7ed9e 100644 --- a/keyboards/jd40/jd40.h +++ b/keyboards/jd40/jd40.h @@ -30,7 +30,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } /* JD40 MKII keymap definition macro */ -#define KEYMAP( \ +#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, \ diff --git a/keyboards/jd40/keymaps/default/keymap.c b/keyboards/jd40/keymaps/default/keymap.c index 79ac146c9eb..b8cff95ac46 100644 --- a/keyboards/jd40/keymaps/default/keymap.c +++ b/keyboards/jd40/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "jd40.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define _BL 0 @@ -7,32 +7,33 @@ #define _UL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP( - 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] = KEYMAP( - 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 ), + [_BL] = LAYOUT( + 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), - [_FL] = KEYMAP( - 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] = KEYMAP( - 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, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ), + [_AL] = LAYOUT( + 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( + 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( + 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, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; -enum function_id { +enum function_id +{ RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, @@ -41,20 +42,20 @@ enum function_id { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, - SHIFT_ESC, + SHIFT_ESC, }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay - [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow - [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode - [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), + [0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay + [1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay + [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer + [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay + [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow + [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode + [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), + [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), + [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), + [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), [12] = ACTION_FUNCTION(SHIFT_ESC), @@ -62,103 +63,133 @@ 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) { + // MACRODOWN only works in this function + switch (id) + { + case 0: + if (record->event.pressed) + { register_code(KC_RSFT); - } else { + } + else + { unregister_code(KC_RSFT); - } + } break; - } + } return MACRO_NONE; }; -void matrix_scan_user(void) { +void matrix_scan_user(void) +{ -// Layer LED indicators -// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + // Layer LED indicators + // ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster uint32_t layer = layer_state; - if (layer & (1<<1)) { + if (layer & (1 << 1)) + { //gh60_wasd_leds_on(); - } else { + } + else + { //gh60_wasd_leds_off(); } - if (layer & (1<<2)) { + if (layer & (1 << 2)) + { //gh60_esc_led_on(); - } else { + } + else + { //gh60_esc_led_off(); } }; -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) + { case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); + //led operations + if (record->event.pressed) + { + rgblight_toggle(); } break; case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); + if (record->event.pressed) + { + rgblight_increase_hue(); } break; case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); + if (record->event.pressed) + { + rgblight_decrease_hue(); } break; case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); + if (record->event.pressed) + { + rgblight_increase_sat(); } break; case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); + if (record->event.pressed) + { + rgblight_decrease_sat(); } break; case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); + if (record->event.pressed) + { + rgblight_increase_val(); } break; case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); + if (record->event.pressed) + { + rgblight_decrease_val(); } break; case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); + if (record->event.pressed) + { + rgblight_step(); } break; - static uint8_t shift_esc_shift_mask; + static uint8_t shift_esc_shift_mask; // Shift + ESC = ~ case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); + shift_esc_shift_mask = get_mods() & MODS_CTRL_MASK; + if (record->event.pressed) + { + if (shift_esc_shift_mask) + { + add_key(KC_GRV); + send_keyboard_report(); + } + else + { + add_key(KC_ESC); + send_keyboard_report(); + } } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); + else + { + if (shift_esc_shift_mask) + { + del_key(KC_GRV); + send_keyboard_report(); + } + else + { + del_key(KC_ESC); + send_keyboard_report(); + } } - } - break; + break; } }; diff --git a/keyboards/jd40/keymaps/vanagon/config.h b/keyboards/jd40/keymaps/vanagon/config.h index 65d2fe6f987..ed09b50ee4d 100644 --- a/keyboards/jd40/keymaps/vanagon/config.h +++ b/keyboards/jd40/keymaps/vanagon/config.h @@ -1,6 +1,6 @@ #include "../../config.h" -#define KEYMAP_VANAGON(\ +#define LAYOUT_VANAGON(\ 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, \ diff --git a/keyboards/jd40/keymaps/vanagon/keymap.c b/keyboards/jd40/keymaps/vanagon/keymap.c index 34314614c64..e16a44af336 100644 --- a/keyboards/jd40/keymaps/vanagon/keymap.c +++ b/keyboards/jd40/keymaps/vanagon/keymap.c @@ -1,29 +1,26 @@ -#include "jd40.h" +#include QMK_KEYBOARD_H #include "action_layer.h" -enum { - _BL = 0, - _AL1, - _AL2, +enum +{ + _BL = 0, + _AL1, + _AL2, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_VANAGON( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - MO(_AL1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MO(_AL1), - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2) - ), - [_AL1] = KEYMAP_VANAGON( - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_TRNS, - KC_TRNS, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_COLN, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS, - KC_TRNS, KC_ESC, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [_AL2] = KEYMAP_VANAGON( - KC_TILD, 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_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_SCLN, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; + [_BL] = LAYOUT_VANAGON( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_AL1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MO(_AL1), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2)), + [_AL1] = LAYOUT_VANAGON( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_COLN, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, KC_ESC, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_AL2] = LAYOUT_VANAGON( + KC_TILD, 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_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_SCLN, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, 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/jd45/info.json b/keyboards/jd45/info.json new file mode 100644 index 00000000000..77ad23a4bee --- /dev/null +++ b/keyboards/jd45/info.json @@ -0,0 +1,60 @@ +{ + "keyboard_name": "jd45", + "url": "", + "maintainer": "qmk", + "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": "Back
Space", "x": 11, "y": 0 }, + { "x": 12, "y": 0 }, + { "label": "Caps", "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": "Hyper", "x": 0, "y": 3, "w": 1.25 }, + { "label": "Super", "x": 1.25, "y": 3 }, + { "label": "Meta", "x": 2.25, "y": 3, "w": 1.25 }, + { "label": "Alt", "x": 3.5, "y": 3, "w": 1.25 }, + { "x": 4.75, "y": 3, "w": 1.75 }, + { "x": 6.5, "y": 3, "w": 1.75 }, + { "label": "Meta", "x": 8.25, "y": 3, "w": 1.25 }, + { "label": "Super", "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 } + ] + } + } +} diff --git a/keyboards/jd45/jd45.h b/keyboards/jd45/jd45.h index 04ac6649e7a..48641c199ad 100644 --- a/keyboards/jd45/jd45.h +++ b/keyboards/jd45/jd45.h @@ -5,7 +5,7 @@ /* JD45 keymap definition macro */ -#define KEYMAP( \ +#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, \ diff --git a/keyboards/jd45/keymaps/blakedietz/config.h b/keyboards/jd45/keymaps/blakedietz/config.h index 6667d6fa1d4..38d850ef6ea 100644 --- a/keyboards/jd45/keymaps/blakedietz/config.h +++ b/keyboards/jd45/keymaps/blakedietz/config.h @@ -3,7 +3,7 @@ /** *JD45 keymap definition macro */ -#define KEYMAP_JD45( \ +#define LAYOUT_JD45( \ 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, \ diff --git a/keyboards/jd45/keymaps/blakedietz/keymap.c b/keyboards/jd45/keymaps/blakedietz/keymap.c index 1b1d0817e6c..bde760a2238 100644 --- a/keyboards/jd45/keymaps/blakedietz/keymap.c +++ b/keyboards/jd45/keymaps/blakedietz/keymap.c @@ -1,4 +1,4 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -19,28 +19,30 @@ extern keymap_config_t keymap_config; // TODO: (bdietz) - make a symbol layer for greek symbols // Keycodes -enum planck_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + LOWER, + RAISE, }; -enum macro_keycodes { - KC_ALT_TAB, - KC_CMD_TAB, - KC_CTL_TAB, - KC_CMD_SLSH, - KC_AG_FIND, - KC_AG_AGAIN, - KC_AG_UNDO, - KC_AG_CUT, - KC_AG_COPY, - KC_AG_PASTE, - KC_AG_DESK_L, - KC_AG_DESK_R, - KC_AG_TAB_C, - KC_AG_TAB_N, - KC_AG_TAB_R, +enum macro_keycodes +{ + KC_ALT_TAB, + KC_CMD_TAB, + KC_CTL_TAB, + KC_CMD_SLSH, + KC_AG_FIND, + KC_AG_AGAIN, + KC_AG_UNDO, + KC_AG_CUT, + KC_AG_COPY, + KC_AG_PASTE, + KC_AG_DESK_L, + KC_AG_DESK_R, + KC_AG_TAB_C, + KC_AG_TAB_N, + KC_AG_TAB_R, }; // Fillers to make layering more clear @@ -55,36 +57,36 @@ enum macro_keycodes { * - will fire z if tapped * - will fire cmd/super/win if held */ -#define ALT_DOT ALT_T(KC_DOT) -#define ALT_X ALT_T(KC_X) -#define CTL_SLSH CTL_T(KC_SLSH) -#define CTL_Z CTL_T(KC_Z) -#define GUI_C GUI_T(KC_C) -#define GUI_COMM GUI_T(KC_COMM) -#define HPR_ESC ALL_T(KC_ESC) -#define HPR_QUO ALL_T(KC_QUOT) +#define ALT_DOT ALT_T(KC_DOT) +#define ALT_X ALT_T(KC_X) +#define CTL_SLSH CTL_T(KC_SLSH) +#define CTL_Z CTL_T(KC_Z) +#define GUI_C GUI_T(KC_C) +#define GUI_COMM GUI_T(KC_COMM) +#define HPR_ESC ALL_T(KC_ESC) +#define HPR_QUO ALL_T(KC_QUOT) // Toggle to VIM when left space button is held, emit space keycode when left space is tapped -#define TGL_VIM LT(_VIM, KC_SPC) +#define TGL_VIM LT(_VIM, KC_SPC) // Toggle to the mouse layer when the right space button is held and emit enter when right space is tapped -#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT) +#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT) // TODO: (bdietz) - need to audit these keycodes to see what sort of cool things the default layout was doing. -#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab -#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab -#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab -#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) -#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings -#define AG_AGAIN M(KC_AG_AGAIN) -#define AG_UNDO M(KC_AG_UNDO) -#define AG_CUT M(KC_AG_CUT) -#define AG_COPY M(KC_AG_COPY) -#define AG_PASTE M(KC_AG_PASTE) -#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and -#define AG_D_R M(KC_AG_DESK_R) // Right -#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, -#define AG_T_N M(KC_AG_TAB_N) // Tab New, and -#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed +#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab +#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab +#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab +#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) +#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings +#define AG_AGAIN M(KC_AG_AGAIN) +#define AG_UNDO M(KC_AG_UNDO) +#define AG_CUT M(KC_AG_CUT) +#define AG_COPY M(KC_AG_COPY) +#define AG_PASTE M(KC_AG_PASTE) +#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and +#define AG_D_R M(KC_AG_DESK_R) // Right +#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, +#define AG_T_N M(KC_AG_TAB_N) // Tab New, and +#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed /* Qwerty * @@ -99,19 +101,19 @@ enum macro_keycodes { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ALL_T(KC_NO), -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - HPR_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO, -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M,GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______ , _______ , LOWER , TGL_VIM , TGL_MOUSE , RAISE , _______ , _______ , _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_QWERTY] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ALL_T(KC_NO), + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, LOWER, TGL_VIM, TGL_MOUSE, RAISE, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row -/* Lower + // TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row + /* Lower * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -122,18 +124,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_LOWER] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - KC_GRV,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_RBRC , CTL_T(KC_F7), ALT_T(KC_F8),GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL) , ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_LOWER] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_RBRC, CTL_T(KC_F7), ALT_T(KC_F8), GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL), ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Raise + /* Raise * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -144,18 +146,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_RAISE] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_EQL , CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1 ,GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_RAISE] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_EQL, CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1, GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Mouse Layer + /* Mouse Layer * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -167,18 +169,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_MOUSECURSOR] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_MOUSECURSOR] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Adjust (Lower + Raise) + /* Adjust (Lower + Raise) * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | Del | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -189,19 +191,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Reset | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_ADJUST] = KEYMAP_JD45( + [_ADJUST] = LAYOUT_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* VIM + /* VIM * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -212,18 +214,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_VIM] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______,_______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_VIM] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Media + /* Media * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -234,53 +236,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_MEDIA] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______) -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_MEDIA] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ }; -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +void persistant_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) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { case QWERTY: - if (record->event.pressed) { - default_layer_set(1UL<<_QWERTY); - } - return false; - break; + if (record->event.pressed) + { + 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; + 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; + 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; } /* @@ -288,54 +300,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (!eeconfig_is_enabled()) { - eeconfig_init(); + if (!eeconfig_is_enabled()) + { + eeconfig_init(); } - bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. + bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: // quantum/quantum.c - if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { - use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. + if (keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) + { + use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. } - switch (id) { - case KC_ALT_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - case KC_CMD_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } + switch (id) + { + case KC_ALT_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + case KC_CMD_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } - case KC_CTL_TAB: - return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END )); - case KC_CMD_SLSH: - return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END )); + case KC_CTL_TAB: + return (record->event.pressed ? MACRO(D(LCTRL), D(TAB), END) : MACRO(U(TAB), END)); + case KC_CMD_SLSH: + return (record->event.pressed ? MACRO(D(LGUI), D(SLSH), END) : MACRO(U(SLSH), END)); - case KC_AG_FIND: - return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END ); - case KC_AG_AGAIN: - return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END ); - case KC_AG_UNDO: - return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END ); - case KC_AG_CUT: - return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END ); - case KC_AG_COPY: - return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END ); - case KC_AG_PASTE: - return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END ); + case KC_AG_FIND: + return use_cmd ? MACRODOWN(D(LGUI), T(F), END) : MACRODOWN(D(LCTRL), T(F), END); + case KC_AG_AGAIN: + return use_cmd ? MACRODOWN(D(LGUI), T(G), END) : MACRODOWN(D(LCTRL), T(G), END); + case KC_AG_UNDO: + return use_cmd ? MACRODOWN(D(LGUI), T(Z), END) : MACRODOWN(D(LCTRL), T(Z), END); + case KC_AG_CUT: + return use_cmd ? MACRODOWN(D(LGUI), T(X), END) : MACRODOWN(D(LCTRL), T(X), END); + case KC_AG_COPY: + return use_cmd ? MACRODOWN(D(LGUI), T(C), END) : MACRODOWN(D(LCTRL), T(C), END); + case KC_AG_PASTE: + return use_cmd ? MACRODOWN(D(LGUI), T(V), END) : MACRODOWN(D(LCTRL), T(V), END); - case KC_AG_DESK_L: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END ); - case KC_AG_DESK_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END ); + case KC_AG_DESK_L: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(SCLN), END) : MACRODOWN(D(LALT), D(LCTRL), T(SCLN), END); + case KC_AG_DESK_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(QUOT), END) : MACRODOWN(D(LALT), D(LCTRL), T(QUOT), END); - case KC_AG_TAB_C: - return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END ); - case KC_AG_TAB_N: - return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END ); - case KC_AG_TAB_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END ); + case KC_AG_TAB_C: + return use_cmd ? MACRODOWN(D(LGUI), T(W), END) : MACRODOWN(D(LCTRL), T(W), END); + case KC_AG_TAB_N: + return use_cmd ? MACRODOWN(D(LGUI), T(T), END) : MACRODOWN(D(LCTRL), T(T), END); + case KC_AG_TAB_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LSHIFT), T(T), END) : MACRODOWN(D(LCTRL), D(LSHIFT), T(T), END); } return MACRO_NONE; diff --git a/keyboards/jd45/keymaps/default/keymap.c b/keyboards/jd45/keymaps/default/keymap.c index 95abb1505c2..0bb519f5fc3 100644 --- a/keyboards/jd45/keymaps/default/keymap.c +++ b/keyboards/jd45/keymaps/default/keymap.c @@ -1,15 +1,15 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H /* this keymap is to provide a basic keyboard layout for testing the matrix * for more practical and complicated keymap refer to other keymaps in the same folder */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, E, R, T, Y, U, I, O, P, QUOT, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT ), + [0] = LAYOUT( + ESC, Q, W, E, R, T, Y, U, I, O, P, QUOT, BSPC, + TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, + PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/jd45/keymaps/jeebak/config.h b/keyboards/jd45/keymaps/jeebak/config.h index 53a1f0a3078..bfaa128937e 100644 --- a/keyboards/jd45/keymaps/jeebak/config.h +++ b/keyboards/jd45/keymaps/jeebak/config.h @@ -3,7 +3,7 @@ /** *JD45 keymap definition macro */ -#define KEYMAP_JD45( \ +#define LAYOUT_JD45( \ 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, \ diff --git a/keyboards/jd45/keymaps/jeebak/keymap.c b/keyboards/jd45/keymaps/jeebak/keymap.c index 0da114a1edc..c711939fcf7 100644 --- a/keyboards/jd45/keymaps/jeebak/keymap.c +++ b/keyboards/jd45/keymaps/jeebak/keymap.c @@ -1,4 +1,4 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -17,33 +17,35 @@ extern keymap_config_t keymap_config; #define _ADJUST 16 // Keycodes -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV }; -enum macro_keycodes { - KC_ALT_TAB, - KC_CMD_TAB, - KC_CTL_TAB, - KC_CMD_SLSH, - KC_AG_FIND, - KC_AG_AGAIN, - KC_AG_UNDO, - KC_AG_CUT, - KC_AG_COPY, - KC_AG_PASTE, - KC_AG_DESK_L, - KC_AG_DESK_R, - KC_AG_TAB_C, - KC_AG_TAB_N, - KC_AG_TAB_R, +enum macro_keycodes +{ + KC_ALT_TAB, + KC_CMD_TAB, + KC_CTL_TAB, + KC_CMD_SLSH, + KC_AG_FIND, + KC_AG_AGAIN, + KC_AG_UNDO, + KC_AG_CUT, + KC_AG_COPY, + KC_AG_PASTE, + KC_AG_DESK_L, + KC_AG_DESK_R, + KC_AG_TAB_C, + KC_AG_TAB_N, + KC_AG_TAB_R, }; // Fillers to make layering more clear @@ -51,29 +53,29 @@ enum macro_keycodes { #define XXXXXXX KC_NO // Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper -#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI -#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper +#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI +#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt // Requires KC_TRNS/_______ for the trigger key in the destination layer -#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor -#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor -#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab -#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab -#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab -#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) -#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings -#define AG_AGAIN M(KC_AG_AGAIN) -#define AG_UNDO M(KC_AG_UNDO) -#define AG_CUT M(KC_AG_CUT) -#define AG_COPY M(KC_AG_COPY) -#define AG_PASTE M(KC_AG_PASTE) -#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and -#define AG_D_R M(KC_AG_DESK_R) // Right -#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, -#define AG_T_N M(KC_AG_TAB_N) // Tab New, and -#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed +#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab +#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab +#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab +#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) +#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings +#define AG_AGAIN M(KC_AG_AGAIN) +#define AG_UNDO M(KC_AG_UNDO) +#define AG_CUT M(KC_AG_CUT) +#define AG_COPY M(KC_AG_COPY) +#define AG_PASTE M(KC_AG_PASTE) +#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and +#define AG_D_R M(KC_AG_DESK_R) // Right +#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, +#define AG_T_N M(KC_AG_TAB_N) // Tab New, and +#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed /* Qwerty * @@ -89,18 +91,18 @@ enum macro_keycodes { */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - CTL_ESC , KC_A, KC_S,LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_QWERTY] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + CTL_ESC, KC_A, KC_S, LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Colemak + /* Colemak * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -111,18 +113,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_COLEMAK] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - CTL_ESC , KC_A, KC_R,LT_MC(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, SFT_ENT , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_COLEMAK] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + CTL_ESC, KC_A, KC_R, LT_MC(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, SFT_ENT, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Dvorak + /* Dvorak * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * |Hyper/Tab| " | , | . | P | Y | F | G | C | R | L | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -133,18 +135,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_DVORAK] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - CTL_ESC , KC_A, KC_O,LT_MC(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, SFT_ENT , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_DVORAK] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + CTL_ESC, KC_A, KC_O, LT_MC(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, SFT_ENT, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Lower + /* Lower * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -155,18 +157,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_LOWER] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - 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_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_RBRC , KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_LOWER] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + 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_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Raise + /* Raise * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -177,18 +179,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite | | | | | | | Prev | Next | Mute | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_RAISE] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_RAISE] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations + /* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -203,18 +205,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * seem to work on Mac. Presumably they'll work under Windows. */ -[_TOUCHCURSOR] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - ALT_TAB,CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,AG_UNDO, AG_CUT, AG_COPY,AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R,CMD_SLSH, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_TOUCHCURSOR] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, KC_LALT, KC_SPC, AG_T_C, AG_FIND, AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Mouse Layer + /* Mouse Layer * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -226,18 +228,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_MOUSECURSOR] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______, -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5 , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_MOUSECURSOR] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Plover layer (http://opensteno.org) + /* Plover layer (http://opensteno.org) * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | # | # | # | # | # | # | # | # | # | # | # | # | # | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -249,18 +251,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_PLOVER] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - KC_1 , 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, KC_C, KC_V, XXXXXXX , XXXXXXX , KC_N, KC_M, XXXXXXX, XXXXXXX), -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_PLOVER] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + KC_1, 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, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX), + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ -/* Adjust (Lower + Raise) + /* Adjust (Lower + Raise) * ,---------+------+------+------+------+------+------+------+------+------+------+------+------. * | | | | | | | | | | | | | Del | * |---------`------`------`------`------`------`------`------`------`------`------`------`------| @@ -271,97 +273,115 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Reset | * `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------' */ -[_ADJUST] = KEYMAP_JD45( -/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ - _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , -/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ - _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______ , -/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ - _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , -/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ - _______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET) -/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ + [_ADJUST] = LAYOUT_JD45( + /*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + /*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + /*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET) + /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +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) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { case QWERTY: - if (record->event.pressed) { - default_layer_set(1UL<<_QWERTY); - } - return false; - break; + if (record->event.pressed) + { + default_layer_set(1UL << _QWERTY); + } + return false; + break; case COLEMAK: - if (record->event.pressed) { - default_layer_set(1UL<<_COLEMAK); - } - return false; - break; + if (record->event.pressed) + { + default_layer_set(1UL << _COLEMAK); + } + return false; + break; case DVORAK: - if (record->event.pressed) { - default_layer_set(1UL<<_DVORAK); - } - return false; - break; + if (record->event.pressed) + { + 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; + 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; + 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; + if (record->event.pressed) + { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } + else + { + unregister_code(KC_RSFT); + } + return false; + break; case PLOVER: - if (record->event.pressed) { - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); + if (record->event.pressed) + { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) + { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; + return false; + break; case EXT_PLV: - if (record->event.pressed) { - layer_off(_PLOVER); - } - return false; - break; - } - return true; + if (record->event.pressed) + { + layer_off(_PLOVER); + } + return false; + break; + } + return true; } /* @@ -369,54 +389,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { */ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (!eeconfig_is_enabled()) { - eeconfig_init(); + if (!eeconfig_is_enabled()) + { + eeconfig_init(); } - bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. + bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: // quantum/quantum.c - if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { - use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. + if (keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) + { + use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. } - switch (id) { - case KC_ALT_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - case KC_CMD_TAB: - if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } - else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } + switch (id) + { + case KC_ALT_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + case KC_CMD_TAB: + if (use_cmd) + { + return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END)); + } + else + { + return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END)); + } - case KC_CTL_TAB: - return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END )); - case KC_CMD_SLSH: - return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END )); + case KC_CTL_TAB: + return (record->event.pressed ? MACRO(D(LCTRL), D(TAB), END) : MACRO(U(TAB), END)); + case KC_CMD_SLSH: + return (record->event.pressed ? MACRO(D(LGUI), D(SLSH), END) : MACRO(U(SLSH), END)); - case KC_AG_FIND: - return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END ); - case KC_AG_AGAIN: - return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END ); - case KC_AG_UNDO: - return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END ); - case KC_AG_CUT: - return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END ); - case KC_AG_COPY: - return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END ); - case KC_AG_PASTE: - return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END ); + case KC_AG_FIND: + return use_cmd ? MACRODOWN(D(LGUI), T(F), END) : MACRODOWN(D(LCTRL), T(F), END); + case KC_AG_AGAIN: + return use_cmd ? MACRODOWN(D(LGUI), T(G), END) : MACRODOWN(D(LCTRL), T(G), END); + case KC_AG_UNDO: + return use_cmd ? MACRODOWN(D(LGUI), T(Z), END) : MACRODOWN(D(LCTRL), T(Z), END); + case KC_AG_CUT: + return use_cmd ? MACRODOWN(D(LGUI), T(X), END) : MACRODOWN(D(LCTRL), T(X), END); + case KC_AG_COPY: + return use_cmd ? MACRODOWN(D(LGUI), T(C), END) : MACRODOWN(D(LCTRL), T(C), END); + case KC_AG_PASTE: + return use_cmd ? MACRODOWN(D(LGUI), T(V), END) : MACRODOWN(D(LCTRL), T(V), END); - case KC_AG_DESK_L: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END ); - case KC_AG_DESK_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END ); + case KC_AG_DESK_L: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(SCLN), END) : MACRODOWN(D(LALT), D(LCTRL), T(SCLN), END); + case KC_AG_DESK_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(QUOT), END) : MACRODOWN(D(LALT), D(LCTRL), T(QUOT), END); - case KC_AG_TAB_C: - return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END ); - case KC_AG_TAB_N: - return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END ); - case KC_AG_TAB_R: - return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END ); + case KC_AG_TAB_C: + return use_cmd ? MACRODOWN(D(LGUI), T(W), END) : MACRODOWN(D(LCTRL), T(W), END); + case KC_AG_TAB_N: + return use_cmd ? MACRODOWN(D(LGUI), T(T), END) : MACRODOWN(D(LCTRL), T(T), END); + case KC_AG_TAB_R: + return use_cmd ? MACRODOWN(D(LGUI), D(LSHIFT), T(T), END) : MACRODOWN(D(LCTRL), D(LSHIFT), T(T), END); } return MACRO_NONE; diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c index c278abba55b..a797582b072 100644 --- a/keyboards/jd45/keymaps/justin/keymap.c +++ b/keyboards/jd45/keymaps/justin/keymap.c @@ -1,58 +1,59 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, - FN8, A, R, S, T, D, H, N, E, I, O, ENT, - LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, - FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0 ), -[1] = KEYMAP( - TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ), -[2] = KEYMAP( - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, - TRNS,FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS ), -[3] = KEYMAP( - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, 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, TRNS, TRNS, TRNS ), -[4] = KEYMAP( - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, - TRNS,FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS ), + [0] = LAYOUT( + ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, + FN8, A, R, S, T, D, H, N, E, I, O, ENT, + LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, + FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0), + [1] = LAYOUT( + TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + [2] = LAYOUT( + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, + TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), + [3] = LAYOUT( + TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, 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, TRNS, TRNS, TRNS), + [4] = LAYOUT( + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, + TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), }; -enum macro_id { - PSWD1, - PSWD2, - PSWD3, +enum macro_id +{ + PSWD1, + PSWD2, + PSWD3, }; const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS), - [1] = ACTION_LAYER_MOMENTARY(1), // FN1 - [2] = ACTION_LAYER_MOMENTARY(2), // FN2 - [3] = ACTION_LAYER_MOMENTARY(3), // FN3 + [1] = ACTION_LAYER_MOMENTARY(1), // FN1 + [2] = ACTION_LAYER_MOMENTARY(2), // FN2 + [3] = ACTION_LAYER_MOMENTARY(3), // FN3 [4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV), [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI), [6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS), - [7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4 + [7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4 [8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), [10] = ACTION_MACRO(PSWD1), [11] = ACTION_MACRO(PSWD2), [12] = ACTION_MACRO(PSWD3), - + [29] = ACTION_BACKLIGHT_TOGGLE(), [30] = ACTION_BACKLIGHT_INCREASE(), [31] = ACTION_BACKLIGHT_DECREASE() - + }; /* @@ -60,19 +61,14 @@ const uint16_t PROGMEM fn_actions[] = { */ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case PSWD1: - return (record->event.pressed ? - MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) : - MACRO_NONE ); - case PSWD2: - return (record->event.pressed ? - MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) : - MACRO_NONE ); - case PSWD3: - return (record->event.pressed ? - MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) : - MACRO_NONE ); + switch (id) + { + case PSWD1: + return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE); + case PSWD2: + return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE); + case PSWD3: + return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE); //case VOLUP: // return (record->event.pressed ? // MACRO( D(VOLU), U(VOLU), END ) : diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c index 610552ecfaa..a53b09642a7 100644 --- a/keyboards/jd45/keymaps/mjt/keymap.c +++ b/keyboards/jd45/keymaps/mjt/keymap.c @@ -1,33 +1,34 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H /* Mike's Layout for JD45 with backlight LEDs acting as layer indicator */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, - FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, - FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ), -[1] = KEYMAP( -GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, -TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, -TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, -TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ), -[2] = KEYMAP( -TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, -TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, -TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, -TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS ) -/* , -[3] = KEYMAP( + [0] = LAYOUT( + TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, + FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, + FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, + NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO), + [1] = LAYOUT( + GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, + TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, + TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, + TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS), + [2] = LAYOUT( + TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, + TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, + TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, + TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS) + /* , +[3] = LAYOUT( 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, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/ }; -enum macro_id { +enum macro_id +{ M_LAYER1, M_LAYER2 }; @@ -38,43 +39,43 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_MACRO(M_LAYER1), [2] = ACTION_LAYER_TAP_TOGGLE(2), [3] = ACTION_BACKLIGHT_STEP(), - [4] = ACTION_BACKLIGHT_TOGGLE() -}; + [4] = ACTION_BACKLIGHT_TOGGLE()}; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) { - case M_LAYER1: - // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality - // action_function_tap may also handle this... - if (record->event.pressed) - { - breathing_period_set(3); - breathing_enable(); - layer_on(1); - } - else - { - breathing_period_set(1); - breathing_self_disable(); - layer_off(1); - } + // MACRODOWN only works in this function + switch (id) + { + case M_LAYER1: + // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality + // action_function_tap may also handle this... + if (record->event.pressed) + { + breathing_period_set(3); + breathing_enable(); + layer_on(1); + } + else + { + breathing_period_set(1); + breathing_self_disable(); + layer_off(1); + } break; - case M_LAYER2: - if (record->event.pressed) - { - breathing_period_set(2); - breathing_pulse(); - layer_on(2); - } - else - { - breathing_period_set(1); - breathing_self_disable(); - layer_off(2); - } + case M_LAYER2: + if (record->event.pressed) + { + breathing_period_set(2); + breathing_pulse(); + layer_on(2); + } + else + { + breathing_period_set(1); + breathing_self_disable(); + layer_off(2); + } break; - } + } return MACRO_NONE; }; diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c index 44f0c31db3b..c17a07fd04e 100644 --- a/keyboards/jd45/keymaps/mjt6u/keymap.c +++ b/keyboards/jd45/keymaps/mjt6u/keymap.c @@ -1,23 +1,23 @@ -#include "jd45.h" +#include QMK_KEYBOARD_H enum jd45_layers { - _QWERTY, - _QWERTYNUMMODS, - _NUMSYM, - _FUNCTION, - _NUMPAD, - _FKEYNUMPAD, - _ADJUST + _QWERTY, + _QWERTYNUMMODS, + _NUMSYM, + _FUNCTION, + _NUMPAD, + _FKEYNUMPAD, + _ADJUST }; enum jd45_keycodes { - NUMSYM = SAFE_RANGE, - MACSLEEP, - USEFNMODS, - USENUMMODS, - DYNAMIC_MACRO_RANGE, + NUMSYM = SAFE_RANGE, + MACSLEEP, + USEFNMODS, + USENUMMODS, + DYNAMIC_MACRO_RANGE, }; #include "dynamic_macro.h" @@ -33,117 +33,91 @@ enum jd45_keycodes #define F_FNTAB F(2) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = { - {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - { XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST) } -}, -[_QWERTYNUMMODS] = { - {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, - {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, - {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST) } -}, -[_NUMSYM] = { -{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL}, - {__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______}, - {_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______}, -{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__} -}, -[_FUNCTION] = { -{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, -{__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______}, -{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, -{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__ , __MOD__} -}, -[_NUMPAD] = { -{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC}, -{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______}, -{_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______}, -{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__} -}, -[_FKEYNUMPAD] = { -{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______}, -{_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______}, -{_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______}, -{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__ } -}, -[_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______}, - { _______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______}, - { _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______}, - {XXXXXXX, _______, _______,XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__} - } -}; - + [_QWERTY] = { + {F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, + {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, + {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST)}}, + [_QWERTYNUMMODS] = {{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST)}}, + [_NUMSYM] = {{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL}, {__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______}, {_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}, + [_FUNCTION] = {{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}, + [_NUMPAD] = {{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC}, {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______}, {_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}, + [_FKEYNUMPAD] = {{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______}, {_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______}, {_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}, + [_ADJUST] = {{_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______}, {_______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______}, {_______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}}; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB), + [0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC), + [2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB), }; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +void persistent_default_layer_set(uint16_t default_layer) +{ + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } static bool singular_key = false; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode); - if (!process_record_dynamic_macro(macro_kc, record)) { - return false; - } - println(" "); - print("process record"); - - switch (keycode) { - case MACSLEEP: - if (record->event.pressed) { - // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER); - register_code(KC_RSFT); - register_code(KC_RCTL); - register_code(KC_POWER); - unregister_code(KC_POWER); - unregister_code(KC_RCTL); - unregister_code(KC_RSFT); - } - return false; - break; - case USEFNMODS: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnpc, false, 0); - #endif - print("Space-FN"); +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode); + if (!process_record_dynamic_macro(macro_kc, record)) + { + return false; } - return false; - break; - case USENUMMODS: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTYNUMMODS); - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnmac, false, 0); - #endif - print("Space-Numpad"); + println(" "); + print("process record"); + + switch (keycode) + { + case MACSLEEP: + if (record->event.pressed) + { + // ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER); + register_code(KC_RSFT); + register_code(KC_RCTL); + register_code(KC_POWER); + unregister_code(KC_POWER); + unregister_code(KC_RCTL); + unregister_code(KC_RSFT); + } + return false; + break; + case USEFNMODS: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << _QWERTY); +#ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_fnpc, false, 0); +#endif + print("Space-FN"); + } + return false; + break; + case USENUMMODS: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << _QWERTYNUMMODS); +#ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_fnmac, false, 0); +#endif + print("Space-Numpad"); + } + return false; + break; + default: + singular_key = false; + break; } - return false; - break; - default: - singular_key = false; - break; - } - return true; + return true; }; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif +void matrix_init_user(void) +{ +#ifdef AUDIO_ENABLE + startup_user(); +#endif // debug_enable = true; } diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index 563f5788e31..1b47ab81625 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -18,13 +18,24 @@ 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: +In addition you may need the AVR toolchain and `bootloadHID` ([GitHub repo](https://github.com/whiteneon/bootloadHID)) for flashing: +For macOS: ``` $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` +For Linux: +``` +$ sudo apt install libusb-dev +$ wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz +$ tar -xzf bootloadHID.2012-12-08.tar.gz +$ cd bootloadHID.2012-12-08/commandline +$ make +$ sudo cp bootloadHID /usr/bin +``` + In order to use the `./program` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: @@ -32,7 +43,7 @@ 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 +If you prefer (or are having issues with a `program` flash), you can just build it (`make jj40:` and flash the firmware (`.hex` file) directly with `bootloadHID` if you boot the board while holding down `Backspace` (`Top Right Key`) to keep it in the bootloader: diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c index 1da57c444fd..b6d4d7b55e5 100644 --- a/keyboards/jj40/keymaps/ajp10304/keymap.c +++ b/keyboards/jj40/keymaps/ajp10304/keymap.c @@ -14,6 +14,8 @@ enum jj40_layers { _MRSE, _FUNC, _MFNC, + _FUNC2, + _MFNC2, _ADJUST, _MOUSE }; @@ -23,6 +25,8 @@ enum jj40_keycodes { MAC, FUNC, MFNC, + FUNC2, + MFNC2, LOWER, MLWR, RAISE, @@ -47,14 +51,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | + * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = KEYMAP(\ 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 ,\ - MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC) \ + MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) \ ), /* Function @@ -117,15 +121,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | STOP | STOP | Prev | Vol- | Next | | | + * | PC/MC| | | | | STOP | STOP | Prev | Vol- | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = KEYMAP(\ - M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\ - KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\ - TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\ + 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, _______, _______ ,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -147,32 +151,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ), +/* Function 2 (Right hand side) + * ,-----------------------------------------------------------------------------------. + * | | |WRDSEL| | | | LNDEL| | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | LNSEL| DUP | | | | |LNJOIN| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | UNDO | CUT | COPY | PASTE| | | | | | | MODE | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC2] = KEYMAP(\ + _______, _______, 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(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, _______\ + MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 \ ), [_MLWR] = KEYMAP(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), [_MRSE] = KEYMAP(\ - _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_EQL) ,\ - _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ + _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,\ + _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), [_MFNC]= KEYMAP(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\ - _______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +[_MFNC2] = KEYMAP(\ + _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,\ + _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,\ + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -243,6 +272,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_MFNC); } return false; + case MFNC2: + if (record->event.pressed) { + layer_on(_FUNC2); + layer_on(_MFNC2); + } else { + layer_off(_FUNC2); + layer_off(_MFNC2); + } + return false; } return true; } @@ -262,6 +300,48 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t op case 2: // Word Select Mac SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); return false; + + case 3: // Line Select + SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); + return false; + + case 4: // Line Select Mac + SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); + return false; + + case 5: // Line Delete + SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); + SEND_STRING(SS_TAP(X_BSPACE)); + return false; + + case 6: // Line Delete Mac + SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); + SEND_STRING(SS_TAP(X_BSPACE)); + return false; + + case 7: // Duplicate Selection + SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); + return false; + + case 8: // Duplicate Selection Mac + SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); + return false; + + case 9: // Join line + SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); + return false; + + case 10: // Join line Mac + SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); + return false; + + case 98: // Print mode + SEND_STRING("PC"); + return false; + + case 99: // Print mode + SEND_STRING("OSX"); + return false; } } return MACRO_NONE; diff --git a/keyboards/jj40/keymaps/ajp10304/readme.md b/keyboards/jj40/keymaps/ajp10304/readme.md index eaaacd05b3e..7ed6adec743 100644 --- a/keyboards/jj40/keymaps/ajp10304/readme.md +++ b/keyboards/jj40/keymaps/ajp10304/readme.md @@ -17,7 +17,7 @@ the second is the output when shift is applied. | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | -| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | ##### Function Layer Activated when `fn` held in the above `qwerty` layer. @@ -27,7 +27,7 @@ Activated when `fn` held in the above `qwerty` layer. | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| | Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | -| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | ##### Lower Layer Activated when `Lower` is held in the above `qwerty` layer. @@ -65,28 +65,44 @@ Activated when `Lower` and `Raise` are held together in the above `qwerty` layer * ????: Runs a macro for outputting a text string. Do not use this store passwords. * Reset: Enter bootloader for flashing firmware to the keyboard. * CAPS: Toggle caps lock. +* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. * MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, -MRSE with RAISE and MFNC with FUNC respectively. -* REC1, REC2: Start recording macro. -* PLAY1, PLAY2: Playback macro. -* STOP1, STOP2: Stop recording macro. +MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | -| CAPS | | | | | PLAY1| PLAY | Mute | Vol+ | Play | | | -| MAC | | | | | STOP | STOP | Prev | Vol- | Next | | | +| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | +| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | +| | | | | | | | | DYN | | | | + +##### Function 2 Layer +Activated when `fn` held in the above `qwerty` layer. +* WRDSEL: Select the word where the cursor is. +* LNDEL: Delete the line where the cursor is. +* LNSEL: Select the line where the cursor is. +* DUP: Duplicate the selected text. +* LNJOIN: Join the line where the cursor is with the following line. +* MODE: Print either `PC` or `OSX` depending on what layer mode is active. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | |WRDSEL| | | | LNDEL| | | | | | +| | | LNSEL| DUP | | | | |LNJOIN| | | | +| | UNDO | CUT | COPY | PASTE| | | | | | | MODE | | | | | | | | | | | | | | - -##### Mouse -Activated when `fn` and `Raise` are held together. -| | | | | | | | | | | | | -| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| -| | | | | | | | | | | | | -| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | -| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | | -| | | | | | | | | | | | | +##### Mouse Layer +Activated when `fn` and `raise` held together. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ESC | | | | | | | | | | | | +| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | +| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | +| | | | | | | | | | | | | ####Manual Flashing of hex file -`bootloadHID -r .build/jj40_ajp10304.hex` +Use sleep to get a chance to get into boot mode. +`sleep 5; bootloadHID -r .build/jj40_ajp10304.hex` diff --git a/keyboards/jj40/keymaps/krusli/config.h b/keyboards/jj40/keymaps/krusli/config.h index 52aaa8f24dc..6d98a37a678 100644 --- a/keyboards/jj40/keymaps/krusli/config.h +++ b/keyboards/jj40/keymaps/krusli/config.h @@ -4,6 +4,6 @@ #include "../../config.h" #define PREVENT_STUCK_MODIFIERS -#define TAPPING_TERM 300 +// #define TAPPING_TERM 300 #endif diff --git a/keyboards/jj40/keymaps/krusli/keymap.c b/keyboards/jj40/keymaps/krusli/keymap.c index df692cc484f..2e6e9a76e7d 100644 --- a/keyboards/jj40/keymaps/krusli/keymap.c +++ b/keyboards/jj40/keymaps/krusli/keymap.c @@ -4,6 +4,7 @@ #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 +#define _NUMPAD 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -15,66 +16,84 @@ void matrix_scan_user(void) { // runs at every matrix scan. } -enum { - TD_H_E = 0 -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_H_E] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END) -}; +// enum { +// TD_H_E = 0 +// }; +// +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_H_E] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END) +// }; 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 | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - 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 , \ - TD(TD_H_E), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), + /* 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 | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + 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 , \ + TO(_NUMPAD),KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | RGB | RGB | RGB | RGB |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play | | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + 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, _______, \ + _______, RGB_SAD, RGB_SAI, RGB_HUI, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = KEYMAP( \ - 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, _______, _______,_______, _______, _______, \ - BL_TOGG, BL_STEP, BL_BRTG, _______, _______, _______, _______, 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 | Home | End | PgUp | PgDn |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Prev | Play | Next | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + 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, _______, \ + _______, KC_MRWD, KC_MPLY, KC_MNXT, _______, _______, _______, 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 | RGB | RGB | RGB | RGB |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RGB | RGB | RGB | RGB | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = KEYMAP( \ - 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, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \ - RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -) + /* Numpad + * ,-----------------------------------------------------------------------------------. + * | Esc | 7 | 8 | 9 | * | / | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | <-- | 4 | 5 | 6 | + | - | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 1 | 2 | 3 |Enter |Enter | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Qwerty| 0 | . | . |Enter |Enter | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_NUMPAD] = KEYMAP( \ + 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, _______, _______, _______, _______, _______, _______, \ + TO(_QWERTY),KC_P0, KC_PDOT, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______ \ + ) }; diff --git a/keyboards/jj40/keymaps/krusli/readme.md b/keyboards/jj40/keymaps/krusli/readme.md index 75a84d0e677..ed760e8a61c 100644 --- a/keyboards/jj40/keymaps/krusli/readme.md +++ b/keyboards/jj40/keymaps/krusli/readme.md @@ -1,2 +1,4 @@ # krusli -Default JJ40 keymap, adapted with RGB underglow support. GUI and LAlt is also swapped. +JJ40 keymap based off the default Planck layout with a numpad layer and with RGB underglow controls. + +GUI and LAlt is also swapped to their standard positions. diff --git a/keyboards/jj40/keymaps/krusli/rules.mk b/keyboards/jj40/keymaps/krusli/rules.mk index e5ddcae8d92..5c6bb684e52 100644 --- a/keyboards/jj40/keymaps/krusli/rules.mk +++ b/keyboards/jj40/keymaps/krusli/rules.mk @@ -1 +1 @@ -TAP_DANCE_ENABLE = yes +# TAP_DANCE_ENABLE = yes diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md index 39cfc69ca01..4c208bcbe46 100644 --- a/keyboards/jj50/README.md +++ b/keyboards/jj50/README.md @@ -13,6 +13,8 @@ USB report options are supported. Hardware Supported: JJ50 with the ATmega32a chip. Hardware Availability: The JJ50 PCB is available from kprepublic on AliExpress and suchlike. +This version by Wayne K Jones (github.com/WarmCatUK) + ## Installing and Building @@ -70,8 +72,10 @@ And flash the compiled hex file with `HIDBootFlash`. Simply put the board in fla 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, simply force rebuild by making with: +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 jj50_default.hex +$ make -B jj50:default $ make -B jj50:default:program ``` diff --git a/keyboards/jj50/backlight.c b/keyboards/jj50/backlight.c new file mode 100644 index 00000000000..079c410ff5c --- /dev/null +++ b/keyboards/jj50/backlight.c @@ -0,0 +1,212 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#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 << 1) // 1st pin of Port D (digital) +#define CAPSLOCK_PORT (1 << 2) // 2nd 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/jj50/backlight_custom.h b/keyboards/jj50/backlight_custom.h new file mode 100644 index 00000000000..7210be840e0 --- /dev/null +++ b/keyboards/jj50/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/jj50/breathing_custom.h b/keyboards/jj50/breathing_custom.h new file mode 100644 index 00000000000..71416b1b45d --- /dev/null +++ b/keyboards/jj50/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/jj50/config.h b/keyboards/jj50/config.h index 240732594d1..6aa7628837f 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -35,11 +35,11 @@ along with this program. If not, see . #define MATRIX_COLS 15 #define DIODE_DIRECTION ROW2COL -#define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 12 -//#define RGB_DI_PIN C0 -#define RGBLED_NUM 5 +#define RGB_DI_PIN E2 +#define RGBLED_NUM 12 #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 15 diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index a75b12c4ea9..d4a70f68d0d 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include "jj50.h" -#include "rgblight.h" #include @@ -24,22 +23,72 @@ along with this program. If not, see . #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 < RGBLED_NUM; i++) { + for (uint8_t i=0; i. #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H +#include "quantum.h" #include "quantum_keycodes.h" #include "keycode.h" #include "action.h" -#define KEYMAP( \ +void matrix_init_user(void); + +#define LAYOUT( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \ diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c index 8a32efd0c00..9d753eb8e6e 100644 --- a/keyboards/jj50/keymaps/default/keymap.c +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public LicensezZZ along with this program. If not, see . */ -#include "jj50.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "rgblight.h" @@ -25,9 +25,30 @@ along with this program. If not, see . #define _DEFLT 0 #define _RAISE 1 #define _LOWER 2 +#define _FN 3 + +enum custom_keycodes { + P_MACRO = SAFE_RANGE +}; + +// 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; +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - + /* Qwerty * ,-----------------------------------------------------------------------------------. * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | @@ -36,20 +57,19 @@ 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 | , | . | / |Enter | (Hold for shift / tap for enter) * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | _FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_DEFLT] = KEYMAP( \ + [_DEFLT] = LAYOUT( \ 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_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, SFT_T(KC_ENT),\ - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC,KC_SPC, MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - - + /* Raise * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -63,15 +83,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + + [_RAISE] = 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ + RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - - + /* Lower * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -85,12 +105,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ - ) + BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + /* Fn + * ,-----------------------------------------------------------------------------------. + * | | | £ | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |BL_OFF|BL_DEC|BL_INC|BL_ON | + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT( \ + _______, _______, P_MACRO, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, BL_OFF, BL_DEC, BL_INC, BL_ON \ + ) }; diff --git a/keyboards/jj50/matrix.c b/keyboards/jj50/matrix.c index 8f9c67fe47a..95c6057e7c4 100644 --- a/keyboards/jj50/matrix.c +++ b/keyboards/jj50/matrix.c @@ -1,5 +1,6 @@ /* 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 @@ -36,17 +37,20 @@ void matrix_init(void) { // all inputs for columns DDRA = 0x00; DDRC &= ~(0x111111<<2); - DDRD &= ~(1< DDRD &= ~(1< 0 bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 ); if (matrix_debouncing[row] != cols) { @@ -92,8 +93,8 @@ uint8_t matrix_scan(void) { } } } - - matrix_scan_user(); + matrix_scan_quantum(); // also missing in original PS2AVRGB implementation + //matrix_scan_user(); return 1; } diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 1b7826e505a..13e81314859 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -36,16 +36,30 @@ BOOTMAGIC_ENABLE = yes MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no -COMMAND_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 -OPT_DEFS = -DDEBUG_LEVEL=0 + +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 +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/jj50/usbconfig.h b/keyboards/jj50/usbconfig.h index d2d848fcdc8..59f29d04dd3 100644 --- a/keyboards/jj50/usbconfig.h +++ b/keyboards/jj50/usbconfig.h @@ -241,8 +241,8 @@ section at the end of this file). #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 +#define USB_CFG_VENDOR_NAME 'K', 'P', 'R', 'e', 'p', 'u', 'b', 'l', 'i', 'c' +#define USB_CFG_VENDOR_NAME_LEN 10 /* 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. @@ -251,8 +251,8 @@ section at the end of this file). * 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 +#define USB_CFG_DEVICE_NAME 'J','J','5','0',' ','K','e','y','b','o','a','r','d' +#define USB_CFG_DEVICE_NAME_LEN 13 /* 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. diff --git a/keyboards/kbd66/info.json b/keyboards/kbd66/info.json new file mode 100644 index 00000000000..c242abb9f0a --- /dev/null +++ b/keyboards/kbd66/info.json @@ -0,0 +1,84 @@ +{ + "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 } + ] + } + } +} diff --git a/keyboards/kbd66/kbd66.h b/keyboards/kbd66/kbd66.h index af1156e5e4d..784e8e493e9 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 KEYMAP( \ +#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, 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 f5ffa7b75d1..253d8d5db34 100644 --- a/keyboards/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbd66/keymaps/ansi/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 "kbd66.h" +#include QMK_KEYBOARD_H #define _____ KC_TRNS #define XXXXX KC_NO @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = KEYMAP( +[_L0] = 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, 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] = KEYMAP( +[_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_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 551df14185b..3e8a90ee55e 100644 --- a/keyboards/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbd66/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 "kbd66.h" +#include QMK_KEYBOARD_H #define _____ KC_TRNS #define XXXXX KC_NO @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = KEYMAP( +[_L0] = 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_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] = KEYMAP( +[_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_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 fa9202cadcf..6b9b7ac4d45 100644 --- a/keyboards/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbd66/keymaps/iso/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 "kbd66.h" +#include QMK_KEYBOARD_H #define _____ KC_TRNS #define XXXXX KC_NO @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = KEYMAP( +[_L0] = 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_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] = KEYMAP( +[_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_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 4ca794c96e6..da438022e6a 100755 --- a/keyboards/kbd66/keymaps/maartenwut/keymap.c +++ b/keyboards/kbd66/keymaps/maartenwut/keymap.c @@ -1,4 +1,4 @@ -#include "kbd66.h" +#include QMK_KEYBOARD_H #define _MA 0 #define _GA 1 @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Main Layer -[_MA] = KEYMAP( +[_MA] = 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_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] = KEYMAP( +[_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, 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] = KEYMAP( +[_AR] = 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, 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] = KEYMAP( +[_GA] = LAYOUT( 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/kbd75/info.json b/keyboards/kbd75/info.json index e134a854ac0..e1d578f6378 100644 --- a/keyboards/kbd75/info.json +++ b/keyboards/kbd75/info.json @@ -1,12 +1,457 @@ { - "keyboard_name": "KBD75", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 6, + "keyboard_name": "KBD75", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, "layouts": { - "KEYMAP_ALL": { - "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}, {"x":13, "y":1}, {"x":14, "y":1}, {"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":1.25}, {"x":1.25, "y":4}, {"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":2.25}, {"x":6, "y":5}, {"x":7, "y":5, "w":3}, {"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}] + "LAYOUT": { + "key_count": 88, + "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":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + {"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":1.25}, + {"x":1.25, "y":4}, + {"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":2.25}, + {"x":6, "y":5}, + {"x":7, "y":5, "w":3}, + {"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}] + }, + + "LAYOUT_ansi_1u": { + "key_count": 84, + "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":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"delete", "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}, + {"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}] + }, + + "LAYOUT_iso_1u": { + "key_count": 84, + "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":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"delete", "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":"Enter", "x":13.75, "y":2, "KS":[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]}, + {"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":"~", "x":12.75, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4}, + {"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}, + {"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}] + }, + + "LAYOUT_ansi": { + "key_count": 83, + "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":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"delete", "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}] + }, + + "LAYOUT_iso": { + "key_count": 84, + "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":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"delete", "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":"Enter", "x":13.75, "y":2, "KS":[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]}, + {"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":"~", "x":12.75, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4}, + {"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}] } - } + } } diff --git a/keyboards/kbd75/kbd75.h b/keyboards/kbd75/kbd75.h index 3648a15bd85..ca6e59e0017 100644 --- a/keyboards/kbd75/kbd75.h +++ b/keyboards/kbd75/kbd75.h @@ -4,7 +4,7 @@ #include "quantum.h" // LAYOUT for all possible switch positions on a KBD75 -#define KEYMAP_ALL( \ +#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, K113, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ @@ -20,4 +20,68 @@ { K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, KC_NO, K510, K511, K512, K513, K514, K515 } \ } -#endif \ No newline at end of file +#define LAYOUT_ansi_1u( \ + 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, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) { \ + { 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, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + +#define LAYOUT_iso_1u( \ + 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, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \ +) { \ + { 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, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + +#define LAYOUT_ansi( \ + 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, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K512, K513, K514, K515 \ +) { \ + { 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, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#define LAYOUT_iso( \ + 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, K313, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \ + K500, K501, K503, K506, K510, K512, K513, K514, K515 \ +) { \ + { 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, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \ + { K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#endif diff --git a/keyboards/kbd75/keymaps/adit/keymap.c b/keyboards/kbd75/keymaps/adit/keymap.c index 8bcc15affc1..23bf34e8c40 100644 --- a/keyboards/kbd75/keymaps/adit/keymap.c +++ b/keyboards/kbd75/keymaps/adit/keymap.c @@ -1,8 +1,8 @@ -#include "kbd75.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP_ALL( + 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_SLCK, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TRNS, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, LT(1,KC_END), KC_CAPS, KC_LALT, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_RGUI, KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP_ALL( + LAYOUT( 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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/kbd75/keymaps/default/keymap.c b/keyboards/kbd75/keymaps/default/keymap.c index 3c96dee0879..107962e7016 100644 --- a/keyboards/kbd75/keymaps/default/keymap.c +++ b/keyboards/kbd75/keymaps/default/keymap.c @@ -1,16 +1,16 @@ -#include "kbd75.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP_ALL( - LT(2, 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, MO(1), KC_DEL, + 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, MO(1), KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_TRNS, KC_TRNS), - KEYMAP_ALL( + LAYOUT( KC_TRNS, M(1), M(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/kbd75/keymaps/iso/keymap.c b/keyboards/kbd75/keymaps/iso/keymap.c index 49d6ad71682..01aa35c6971 100644 --- a/keyboards/kbd75/keymaps/iso/keymap.c +++ b/keyboards/kbd75/keymaps/iso/keymap.c @@ -1,16 +1,16 @@ -#include "kbd75.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP_ALL( - LT(2, 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, MO(1), KC_DEL, + 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, MO(1), KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP_ALL( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -18,118 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_TRNS, KC_TRNS), - KEYMAP_ALL( + LAYOUT( KC_TRNS, M(1), M(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { diff --git a/keyboards/kbd75/keymaps/smt/keymap.c b/keyboards/kbd75/keymaps/smt/keymap.c index 1a549e59ec9..a29a7e8a9fa 100644 --- a/keyboards/kbd75/keymaps/smt/keymap.c +++ b/keyboards/kbd75/keymaps/smt/keymap.c @@ -1,4 +1,4 @@ -#include "kbd75.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _COLEMAK 1 @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_QWERTY] = KEYMAP_ALL( + [_QWERTY] = 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_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, KC_HOME, \ HPR_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_PGUP, \ @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: ANSI colemak */ - [_COLEMAK] = KEYMAP_ALL( + [_COLEMAK] = 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_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, KC_HOME, \ HPR_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_BSPC, KC_PGUP, \ @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: ANSI dvorak */ - [_DVORAK] = KEYMAP_ALL( + [_DVORAK] = 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_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, KC_HOME, \ HPR_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_BSPC, KC_PGUP, \ @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 3: ANSI Fn layer */ - [_FL] = KEYMAP_ALL( + [_FL] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 4: ANSI control layer */ - [_CL] = KEYMAP_ALL( + [_CL] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ _______, _______, _______, _______, RESET, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, RGB_VAI, \ diff --git a/keyboards/kbd8x/config.h b/keyboards/kbd8x/config.h new file mode 100644 index 00000000000..c021fb40b50 --- /dev/null +++ b/keyboards/kbd8x/config.h @@ -0,0 +1,199 @@ +/* +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 . +*/ + +#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 KBDFans +#define PRODUCT kbd8x +#define DESCRIPTION Custom TKL Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * 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 { E6, B7, D4, F0, D6, D7 } +#define MATRIX_COL_PINS { D1, D0, F7, F6, F5, D5, D3, D2, C7, C6, B5, F4, F1, B4, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + + +/* 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/kbd8x/info.json b/keyboards/kbd8x/info.json new file mode 100644 index 00000000000..fe94f1b3ac3 --- /dev/null +++ b/keyboards/kbd8x/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "KBD 8X", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbd8x/kbd8x.c new file mode 100644 index 00000000000..51e7852412f --- /dev/null +++ b/keyboards/kbd8x/kbd8x.c @@ -0,0 +1,43 @@ +/* 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 "kbd8x.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/kbd8x/kbd8x.h b/keyboards/kbd8x/kbd8x.h new file mode 100644 index 00000000000..02a7436446a --- /dev/null +++ b/keyboards/kbd8x/kbd8x.h @@ -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 . + */ +#ifndef KBD8X_H +#define KBD8X_H + +#include "quantum.h" +#include "led.h" + +// Functions for setting LEDs on toggle keys +inline void caps_led_on(void) { DDRB |= (1<<3); PORTB &= ~(1<<3); } +inline void caps_led_off(void) { DDRB &= ~(1<<3); PORTB &= ~(1<<3); } + +inline void num_led_on(void) { DDRB |= (1<<1); PORTB &= ~(1<<1); } +inline void num_led_off(void) { DDRB &= ~(1<<1); PORTB &= ~(1<<1); } + +inline void scroll_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } +inline void scroll_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } + + +// LAYOUT depicting all possible switch positions. +// LAYOUT_all supports ISO, split backspace and split left/right shift. +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K3D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K5B, K5C, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K5D, K5E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E } \ +} + +// LAYOUT depicting only switch positions for a standard TKL ANSI keyboard. +// TODO: Double check location of backspace key for 2u layout (It's either K1D or K1C). +#define LAYOUT_tkl_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K3D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K5B, K5C, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K5D, K5E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A \ +) \ +{ \ + { 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, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E } \ +} + +#endif diff --git a/keyboards/xd75/keymaps/rambo/config.h b/keyboards/kbd8x/keymaps/default/config.h similarity index 82% rename from keyboards/xd75/keymaps/rambo/config.h rename to keyboards/kbd8x/keymaps/default/config.h index e87ccde7979..63bef2a735b 100644 --- a/keyboards/xd75/keymaps/rambo/config.h +++ b/keyboards/kbd8x/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Benjamin Kesselring +/* 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 @@ -17,10 +17,8 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include "config_common.h" -#define TAPPING_TERM 200 -#define PERMISSIVE_HOLD -#define PREVENT_STUCK_MODIFIERS +// place overrides here #endif diff --git a/keyboards/kbd8x/keymaps/default/keymap.c b/keyboards/kbd8x/keymaps/default/keymap.c new file mode 100644 index 00000000000..bfbc841d58f --- /dev/null +++ b/keyboards/kbd8x/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* 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, KC_MENU, KC_RCTL, 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 + 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/readme.md b/keyboards/kbd8x/keymaps/default/readme.md new file mode 100644 index 00000000000..773a3dfbaee --- /dev/null +++ b/keyboards/kbd8x/keymaps/default/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/readme.md b/keyboards/kbd8x/readme.md new file mode 100644 index 00000000000..fe49819753b --- /dev/null +++ b/keyboards/kbd8x/readme.md @@ -0,0 +1,15 @@ +# KBD 8X + +![kbd8x](imgur.com image replace me!) + +TKL Keyboard from KBDFans + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: kbd8x +Hardware Availability: [KBDFans](https://kbdfans.cn/blogs/updates/kbd-8x-update-40) + +Make example for this keyboard (after setting up your build environment): + + make kbd8x: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/kbd8x/rules.mk b/keyboards/kbd8x/rules.mk new file mode 100644 index 00000000000..3bb473ba8f0 --- /dev/null +++ b/keyboards/kbd8x/rules.mk @@ -0,0 +1,69 @@ +# 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 +BOOTLOADER = atmel-dfu + + +# 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/kinesis/config.h b/keyboards/kinesis/config.h index 7cb0532c64f..a4e06b6ebb2 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define MANUFACTURER You -#define PRODUCT kinesis-advantage +#define PRODUCT Kinesis Advantage/Contoured #define DESCRIPTION A custom keyboard // Mouse diff --git a/keyboards/kinesis/keymaps/salty/config.h b/keyboards/kinesis/keymaps/carpalx/config.h similarity index 80% rename from keyboards/kinesis/keymaps/salty/config.h rename to keyboards/kinesis/keymaps/carpalx/config.h index 5afb8043502..8893d122e04 100644 --- a/keyboards/kinesis/keymaps/salty/config.h +++ b/keyboards/kinesis/keymaps/carpalx/config.h @@ -1,10 +1,8 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H - #include "../../config.h" // place overrides here -#define TAPPING_TERM 200 #endif diff --git a/keyboards/kinesis/keymaps/carpalx/keymap.c b/keyboards/kinesis/keymaps/carpalx/keymap.c new file mode 100644 index 00000000000..0ef454bc2d2 --- /dev/null +++ b/keyboards/kinesis/keymaps/carpalx/keymap.c @@ -0,0 +1,203 @@ +#include "kinesis.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _CX 0 // Carpalx layer +#define _QW 1 // Qwerty layer +#define _KP 2 // Keypad + Media Layer + +// Macro name shortcuts +#define DVORAK M(_DV) +#define QWERTY M(_QW) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +/* + + Function Keys on All Layers (Keypad toggles): + ,---------------------------------------------------------------. + | L0 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | + `---------------------------------------------------------------' + ,---------------------------------------------------------------. + | F9 | F10 | F11 | F12 | PSCR | L1 | L2 | L2 | RESET | + `---------------------------------------------------------------' + + L0 Carpalx layer: + ,-------------------------------------------.,-------------------------------------------. + | Del | 1 | 3 | 5 | 7 | 9 || 0 | 8 | 6 | 4 | 2 | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Tab | Q | G | M | L | W || B | Y | U | V | ; | = | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | ESC | D | S | T | N | R || I | A | E | O | H | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | F | J || K | P | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | ` | [ | Left | Rght | | Dn | Up | ] | \ | + `---------------------------' `---------------------------' + ,----------------.,----------------. + | LCtl | LAlt || LAlt | RCtl | + ,------|-------|--------||--------+-------+-------. + | | | RGUI || RGUI | | | + | BkSp | ESC |--------||--------| Enter | Space | + | | | MO(L2) || MO(L2) | | | + `-----------------------'`------------------------' + + L1 QWERTY layer: + ,-------------------------------------------.,-------------------------------------------. + | Del | 1 | 3 | 5 | 7 | 9 || 0 | 8 | 6 | 4 | 2 | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Tab | Q | W | E | R | T || Y | U | I | O | P | = | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | ESC | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | ` | [ | Left | Rght | | Dn | Up | ] | \ | + `---------------------------' `---------------------------' + ,----------------.,----------------. + | LCtl | LAlt || LAlt | RCtl | + ,------|-------|--------||--------+-------+-------. + | | | RGUI || RGUI | | | + | BkSp | ESC |--------||--------| Enter | Space | + | | | MO(L1) || MO(L2) | | | + `-----------------------'`------------------------' + + L2 Keypad + Media layer: + ,-------------------------------------------.,-------------------------------------------. + | | | | | | || | NmLk | KP = | KP / | KP * | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Mute | Vol- | Vol+ | || | KP 7 | KP 8 | KP 9 | KP - | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | Stop | Prev | Play | Next | Sel || | KP 4 | KP 5 | KP 6 | KP + | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | | | | | | ( | ) | KP . |KP Ent| | + `---------------------------' `----------------------------------' + ,----------------.,----------------. + | | || | | + ,------|-------|--------||--------+-------+-------. + | | | || | | | + | | |--------||--------|KP Entr| KP 0 | + | | | || | | | + `-----------------------'`------------------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_CX] = KEYMAP( + // Left Hand + TO(_CX), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_DEL, KC_1, KC_3, KC_5, KC_7, KC_9, + KC_TAB, KC_Q, KC_G, KC_M, KC_L, KC_W, + KC_ESC, KC_D, KC_S, KC_T, KC_N, KC_R, + KC_LSFT, KC_Z, KC_X, KC_C, KC_F, KC_J, + KC_GRV, KC_LBRC, KC_LEFT, KC_RGHT, + // Left Thumb + KC_LCTL, KC_LALT, + KC_RGUI, + KC_BSPC, KC_ESC, MO(_KP), + + // Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TO(_QW), TO(_KP), TO(_KP), RESET, + KC_0, KC_8, KC_6, KC_4, KC_2, KC_MINS, + KC_B, KC_Y, KC_U, KC_V, KC_SCLN, KC_EQL, + KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT, + KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_DOWN, KC_UP, KC_RBRC, KC_BSLS, + // Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + MO(_KP), KC_ENT, KC_SPC + ), + +[_QW] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ + ), + +[_KP] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, + _______, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + + // Right Hand */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, + _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, KC_PDOT, KC_PENT, + // Right Thumb + _______, _______, + _______, + _______, KC_PENT, KC_P0 + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _CX: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_CX); + } + break; + case _QW: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QW); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; diff --git a/keyboards/kinesis/keymaps/carpalx/readme.md b/keyboards/kinesis/keymaps/carpalx/readme.md new file mode 100644 index 00000000000..aa57b60a52a --- /dev/null +++ b/keyboards/kinesis/keymaps/carpalx/readme.md @@ -0,0 +1,83 @@ +# Carpalx Kinesis Keymap + +## About this keymap + +Carpalx layout (also known as QGMLWBY) is an optimized alternative keyboard layout. +Learn more about it at: +[http://mkweb.bcgsc.ca/carpalx/?popular_alternatives]() + +The layout also includes a QWERTY layer to help with the transition. + - Scroll Lock: QWERTY layer + - Esc (Fn row): Carpalx layer + - Keypad: Keypad and Media layer + +## Details mapping + + Function Keys on All Layers (Keypad toggles): + ,---------------------------------------------------------------. + | L0 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | + `---------------------------------------------------------------' + ,---------------------------------------------------------------. + | F9 | F10 | F11 | F12 | PSCR | L1 | L2 | L2 | RESET | + `---------------------------------------------------------------' + + L0 Carpalx layer: + ,-------------------------------------------.,-------------------------------------------. + | Del | 1 | 3 | 5 | 7 | 9 || 0 | 8 | 6 | 4 | 2 | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Tab | Q | G | M | L | W || B | Y | U | V | ; | = | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | ESC | D | S | T | N | R || I | A | E | O | H | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | F | J || K | P | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | ` | [ | Left | Rght | | Dn | Up | ] | \ | + `---------------------------' `---------------------------' + ,----------------.,----------------. + | LCtl | LAlt || LAlt | RCtl | + ,------|-------|--------||--------+-------+-------. + | | | RGUI || RGUI | | | + | BkSp | ESC |--------||--------| Enter | Space | + | | | MO(L2) || MO(L2) | | | + `-----------------------'`------------------------' + + L1 QWERTY layer: + ,-------------------------------------------.,-------------------------------------------. + | Del | 1 | 3 | 5 | 7 | 9 || 0 | 8 | 6 | 4 | 2 | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Tab | Q | W | E | R | T || Y | U | I | O | P | = | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | ESC | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | ` | [ | Left | Rght | | Dn | Up | ] | \ | + `---------------------------' `---------------------------' + ,----------------.,----------------. + | LCtl | LAlt || LAlt | RCtl | + ,------|-------|--------||--------+-------+-------. + | | | RGUI || RGUI | | | + | BkSp | ESC |--------||--------| Enter | Space | + | | | MO(L1) || MO(L2) | | | + `-----------------------'`------------------------' + + L2 Keypad + Media layer: + ,-------------------------------------------.,-------------------------------------------. + | | | | | | || | NmLk | KP = | KP / | KP * | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Mute | Vol- | Vol+ | || | KP 7 | KP 8 | KP 9 | KP - | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | Stop | Prev | Play | Next | Sel || | KP 4 | KP 5 | KP 6 | KP + | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | | | | | | ( | ) | KP . |KP Ent| | + `---------------------------' `----------------------------------' + ,----------------.,----------------. + | | || | | + ,------|-------|--------||--------+-------+-------. + | | | || | | | + | | |--------||--------|KP Entr| KP 0 | + | | | || | | | + `-----------------------'`------------------------' + diff --git a/keyboards/kinesis/keymaps/carpalx/rules.mk b/keyboards/kinesis/keymaps/carpalx/rules.mk new file mode 100644 index 00000000000..1854d35df24 --- /dev/null +++ b/keyboards/kinesis/keymaps/carpalx/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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/rambo/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h similarity index 63% rename from keyboards/planck/keymaps/rambo/config.h rename to keyboards/kinesis/keymaps/insertsnideremarks/config.h index c3bebf57990..38d08b20c8b 100644 --- a/keyboards/planck/keymaps/rambo/config.h +++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h @@ -1,9 +1,12 @@ #ifndef CONFIG_USER_H - #define CONFIG_USER_H -#define TAPPING_TERM 200 + + #include "../../config.h" -#define PERMISSIVE_HOLD + +// place overrides here #define PREVENT_STUCK_MODIFIERS +#define TAPPING_TERM 175 + -#endif \ No newline at end of file +#endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c new file mode 100644 index 00000000000..999e76ca3f9 --- /dev/null +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -0,0 +1,667 @@ +#include "kinesis.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +enum kinesis_layers { + _CMODDH, // Colemak Mod-DH Matrix (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) + _QWERTYGM, // QWERTY gaming/vanilla (no dual-role keys with layer access) + _ADJUST // Adjust layer +}; + +enum kinesis_keycodes { + CMODDH = SAFE_RANGE, + QWERTY, + COLEMAK, + CMODDHGM, + QWERTYGM, + 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), + NKROTG = MAGIC_TOGGLE_NKRO +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPLEQ, + PMNUN, + PSLPAS +}; + +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); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMNUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSLPAS] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +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) +* ,-----------------------------------------------------------------------------------------------------------. +* | 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 | +* `-----------------------' `-----------------------' +*/ +[_COLEMAK] = 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_G, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, + 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_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_K, 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 +), + +/* 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 | | ! | @ | # | $ | % | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ( | ) | [ { | ] } | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' +*/ +[_NUMBERS] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, + _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +[_NUMBERS2] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, + _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +/* 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| | | +* `-----------------------' `-----------------------' +*/ +[_FUNCTION] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, _______, _______, KC_UP, _______, _______, + _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + 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( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, _______, _______, KC_UP, _______, _______, + _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + 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| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' +*/ +[_NUMPAD] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, + _______, _______, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_P0, KC_COMM, KC_PDOT, KC_PENT, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +/* 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 | | | +* `-----------------------' `-----------------------' +*/ +[_CMODDHGM] = 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, + 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_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_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_TAB, 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 | | | +* `-----------------------' `-----------------------' +*/ +[_QWERTYGM] = 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, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + 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_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_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + //Right Thumb + KC_RALT, KC_RCTL, + KC_RGUI, + KC_TAB, KC_DEL, KC_BSPC +), + +/* Adjust layer +* (Enter/Number + Delete/Number2 under non-gaming/vanilla layers) +* ,-----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | |NKROTG| | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' +*/ +[_ADJUST] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, CMODDH, QWERTY, COLEMAK, CMODDHGM, QWERTYGM, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + TG(_NUMPAD), _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, + _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +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 CMODDH: + if (record->event.pressed) { + persistent_default_layer_set(1UL << _CMODDH); + 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 ( _QWERTYGM); + layer_off ( _ADJUST); + } + 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 ( _QWERTYGM); + layer_off ( _ADJUST); + } + return false; + break; + case COLEMAK: + 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); + layer_off ( _QWERTY); + layer_off ( _COLEMAK); + layer_off ( _NUMBERS); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _QWERTYGM); + layer_off ( _ADJUST); + } + 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); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _CMODDHGM); + layer_off ( _ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md new file mode 100644 index 00000000000..b3c573b6259 --- /dev/null +++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md @@ -0,0 +1,249 @@ +# insertsnideremarks' Kinesis Keymap + +These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. + +There are minor changes in the base keywell layout of non-alpha keys (e.g., CapsLock is ESC/Ctl, arrow clusters on one side), while the thumb clusters deviate more from the default layout. + +Changes to the thumb clusters include: +* The navigations keys moved to function layers. +* The function of 2u keys have been reversed - I've always used space with my left thumb, and I find it more helpful to have access to Space and Enter while using my mouse/trackball. +* Backspace have been duplicated on both clusters. +* The 2u keys serve dual function as momentary layer switchers. + +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. + +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. + +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. + +## Future plans + +* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock). May configure it as layer indicator. +* Add a speaker now that QMK supports additional pins for audio use. +* 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 + (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| + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | = | 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 | + `-----------------------' `-----------------------' + + +### 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 | + `-----------------------' `-----------------------' + + +### 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) + ,-----------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | + `--------+------+------+------+------+------' `------+------+------+------+------+--------' + | ( | ) | [ { | ] } | | | | | | + `---------------------------' `---------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------|-------|-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' + + +### Function layer + ,-----------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | | | Up | | | | | | Up |Ctrl+Y| | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | |Ctrl+A| Left | Down | Right| | | PgUp | Right| Down | Left | Home | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | |Ctrl+Z|Ctrl+X|Ctrl+C|Ctrl+V| | | PgDn | Mute | Vol- | Vol+ | End | | + `--------+------+------+------+------+------' `------+------+------+------+------+--------' + | | | | | | Prev | Play | Next | Stop | + `---------------------------' `---------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------|-------|-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | |C+A+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| + `---------------------------' `---------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------|-------|-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' + + +### Colemak Mod-DH Matrix 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| + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | = | 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 | | | + `-----------------------' `-----------------------' + + +### QWERTY 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| + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | = | 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 | | | + `-----------------------' `-----------------------' + +### Adjust layer + (Press Enter/Number + Delete/Number2 together under non-gaming/vanilla layers; Numpad is a toggle) + ,-----------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,------------------------------------------ + | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | | | | | | | | | | | | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | | | | | | | | NKRO | | | | | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | | | | | | | | | | | | | | + `--------+------+------+------+------+------' `------+------+------+------+------+--------' + | | | | | | | | | | + `---------------------------' `---------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------|-------|-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' + \ No newline at end of file diff --git a/keyboards/kinesis/keymaps/salty/rules.mk b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk similarity index 86% rename from keyboards/kinesis/keymaps/salty/rules.mk rename to keyboards/kinesis/keymaps/insertsnideremarks/rules.mk index e08bf38c8bf..e1af05cb442 100644 --- a/keyboards/kinesis/keymaps/salty/rules.mk +++ b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk @@ -2,11 +2,13 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # +DEFAULT_FOLDER = kinesis/stapelberg + 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 = yes # Commands for debug and configuration +CONSOLE_ENABLE = yes # 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 @@ -16,7 +18,6 @@ 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 TAP_DANCE_ENABLE = yes # Enable Tap Dancing function -KEY_LOCK_ENABLE = yes # Enable key lock ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/kinesis/keymaps/salty/keymap.c b/keyboards/kinesis/keymaps/salty/keymap.c deleted file mode 100644 index bfbb17adc66..00000000000 --- a/keyboards/kinesis/keymaps/salty/keymap.c +++ /dev/null @@ -1,433 +0,0 @@ -#include "kinesis.h" -#include "action_layer.h" -#include "eeconfig.h" - -#define _QW 0 // Base QWERTY -#define _CM 1 // Colemak -#define _QG 2 // QWERTY gaming -#define _NS 3 // Number/Symbol -#define _NP 4 // Numpad -#define _LY 5 // Layer switcher -#define _FN 6 // Function -#define _FN2 7 // Function 2 (identical as _FN; used to deal with minor key interaction issue) - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -//Tap Dance Declarations -enum { - LPN_LBC, - RPN_RBC -}; - -qk_tap_dance_action_t tap_dance_actions[] = { -[LPN_LBC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), -[RPN_RBC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC) -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* QWERTY -* (Keys separated by /: tap for first, hold for second) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ` | | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,--------------. ,--------------. -* | LCtl | LAlt | | RAlt | RCtl | -* ,------|-------|------| |------+-------+------. -* | Space| Enter | App | | RGUI | Delete| Bspc | -* | / | / |------| |------| / | / | -* | Fn | Number| Bspc | | Enter| Number| Fn2 | -* `---------------------' `---------------------' -*/ -[_QW] = 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, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - //Left Thumb - KC_LCTL, KC_LALT, - KC_APP, - LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC, - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), - 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_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - KC_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC) -), - -/* Colemak -* (Keys separated by /: tap for first, hold for second) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Esc | A | R | S | T | D | | H | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ` | | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,--------------. ,--------------. -* | LCtl | LAlt | | RAlt | RCtl | -* ,------|-------|------| |------+-------+------. -* | Space| Enter | App | | RGUI | Delete| Bspc | -* | / | / |------| |------| / | / | -* | Fn | Number| Bspc | | Enter| Number| Fn2 | -* `---------------------' `---------------------' -*/ -[_CM] = 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_G, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - //Left Thumb - KC_LCTL, KC_LALT, - KC_APP, - LT(_FN, KC_SPC), LT(_NS, KC_ENT), KC_BSPC, - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), - 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, - 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_ENT, LT(_NS, KC_DEL), LT(_FN2, KC_BSPC) -), - -/* QWERTY Gaming -* (Keys separated by /: tap for first, hold for second; no access to Fn layer) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Layer| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ` | | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,--------------. ,--------------. -* | LCtl | LAlt | | RAlt | RCtl | -* ,------|-------|------| |------+-------+------. -* | | Enter | | | RGUI | Delete| | -* | Space| / |------| |------| / | Bspc | -* | | Number| Bspc | | Enter| Number| | -* `---------------------' `---------------------' -*/ -[_QG] = 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, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_GRV, XXXXXXX, KC_LBRC, KC_RBRC, - //Left Thumb - KC_LCTL, KC_LALT, - XXXXXXX, - KC_SPC, LT(_NS, KC_ENT), KC_BSPC, - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NP), MO(_LY), - 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_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - KC_ENT, LT(_NS, KC_DEL), KC_BSPC -), - -/* Number/symbol layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | ! | @ | # | $ | % | | ^ | & | * | ` | ~ | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | = | { | [ | ( | + | | _ | ) | ] | } | - | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | | | | | -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | | | | | | -* ,------|------|------| |------+------+------. -* | | | | | | | | -* | | |------| |------| | | -* | | | | | | | | -* `--------------------' `--------------------' -*/ -[_NS] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, - _______, KC_EQL, KC_LCBR, KC_LBRC, KC_LPRN, KC_PLUS, - _______, _______, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_CIRC, KC_AMPR, KC_ASTR, KC_GRV, KC_TILD, _______, - KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_MINS, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ -), - -/* Numpad layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | | | | | | | | NumLk| Tab | KP / | kP *| KP - | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | Up | | | | | KP 7 | KP 8 | KP 9 | KP + | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | Left | Down | Right| | | | KP 4 | KP 5 | KP 6 | KP = | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | INS | | | | | KP , | KP . |KP Ent| -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | | | | | | -* ,------|------|------| |------+------+------. -* | | | | | | | | -* | | |------| |------| | KP 0 | -* | | | | | | | | -* `--------------------' `--------------------' -*/ -[_NP] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_UP, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, - _______, KC_INS, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_NLCK, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, _______, - _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, - _______, KC_P4, KC_P5, KC_P6, KC_PEQL, _______, - _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, - _______, KC_PCMM, KC_PDOT, KC_PENT, - // Right Thumb - _______, _______, - _______, - _______, _______, KC_P0 -), - -/* Layer switch layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | |QWERTY|Colemk|QW GM | | | | | | | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | | | | | -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | | | | | | -* ,------|------|------| |------+------+------. -* | | | | | | | | -* | | |------| |------| | | -* | | | | | | | | -* `--------------------' `--------------------' -*/ -[_LY] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, DF(_QW), DF(_CM), DF(_QG), _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ -), - -/* Function layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | |RESET| | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | Up | |Alt+Tb| | | Home | Up | End | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | Left | Down | Right| | | PgUp | Right| Down | Left | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | Prev | Play | Next | Stop | | PgDn | Mute | Vol- | Vol+ | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | INS | | | | | | | | -* `---------------------------' `---------------------------' -* ,-------------. ,-------------. -* | | | | | | -* ,------|------|------| |------+------+------. -* | | | | | | | | -* | | |------| |------| | | -* | | | | | | | | -* `--------------------' `--------------------' -*/ -[_FN] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, KC_UP, _______, LALT(KC_TAB), - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, - _______, KC_INS, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - // Right Hand - RESET, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ -), - -[_FN2] = KEYMAP( - // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, _______, _______, KC_UP, _______, LALT(KC_TAB), - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, - _______, KC_INS, _______, _______, - // Left Thumb - _______, _______, - _______, - _______, _______, _______, - // Right Hand - RESET, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_HOME, KC_UP, KC_END, _______, _______, - KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, - _______, _______, _______, _______, - // Right Thumb - _______, _______, - _______, - _______, _______, _______ -) - -}; - -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/kinesis/keymaps/salty/readme.md b/keyboards/kinesis/keymaps/salty/readme.md deleted file mode 100644 index 4c709642391..00000000000 --- a/keyboards/kinesis/keymaps/salty/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Salty's Kinesis Keymap - -These layouts are derived from what I was using on my Kinesis Contoured keyboards through TMK converters. With the move to QMK through Stapelberg replacement controller, I've cleaned up the layouts a bit while adding number/symbol layer. - -There are only minor changes in the base keywell layout (e.g., CapsLock is ESC, arrow clusters on one side), while the thumb clusters deviate more from the default layout. - -Changes to the thumb clusters include: -* The navigations keys moved to Fn layers. -* The function of 2u keys have been reversed - I've always used space with my left thumb, and I find it more helpful to have access to Space and Enter while using my mouse/trackball. -* Enter and Backspace have been duplicated on both clusters. -* The 2u keys serve dual function as momentary layer switchers. - -I'm frequently fiddle around with the layouts as I find certain things I want to try out. - diff --git a/keyboards/kinesis/readme.md b/keyboards/kinesis/readme.md index 2813ee273b3..3802f50c9a3 100644 --- a/keyboards/kinesis/readme.md +++ b/keyboards/kinesis/readme.md @@ -1,10 +1,10 @@ -# Firmware for the Kinesis advantage keyboard +# Firmware for the Kinesis Advantage/Contoured keyboard There are at least two different ways to replace the controller in this keyboard. The Stapelberg folder contains the docs and configuration for using the custom controller created by Michael Stapelberg. -The alvicstep folder contains docs and configuration for directly wiring a Teensy2++ to the existing controller board. This follows the pinouts described in https://github.com/alvicstep/tmk_keyboard, which is where the name comes from. +The alvicstep folder contains docs and configuration for directly wiring a Teensy2++ to the existing controller board. This follows the pinouts described in https://github.com/alvicstep/tmk_keyboard, which is where the name comes from. ## Keymaps Both hardware solutions should work with the same keymaps diff --git a/keyboards/kinesis/stapelberg/readme.md b/keyboards/kinesis/stapelberg/readme.md index 0dcb7c283f3..2a69bb72500 100644 --- a/keyboards/kinesis/stapelberg/readme.md +++ b/keyboards/kinesis/stapelberg/readme.md @@ -44,11 +44,10 @@ The exterior cables can be seen here. ### Default -To build with the default keymap, run `make default` while in the -`kinesis_stapelberg` working directory. +To build with the default keymap, run `make kinesis/stapelberg` while in the QMK directory. ### Dvorak This keymap contains a dvorak implementation as well as media and symbol layers. -Run `make dvorak` while in the `kinesis_stapelberg` working directory. +Run `make kinesis/stapelberg:dvorak` while in the QMK directory. diff --git a/keyboards/kinesis/stapelberg/stapelberg.h b/keyboards/kinesis/stapelberg/stapelberg.h index c90fc3d52db..8c8619745d5 100644 --- a/keyboards/kinesis/stapelberg/stapelberg.h +++ b/keyboards/kinesis/stapelberg/stapelberg.h @@ -58,13 +58,13 @@ PD4 k4x Row: 4 R F V -- -- DEL PD5 k5x Row: 5 T G B RT LAL LCT PD6 k6x Row: 6 Y H N UP SPC PGD PD7 k7x Row: 7 U J M -- RET -- -PB0 k8x Row: 8 I K COM DWN RCT PGU -PB1 k9x Row: 9 O L PER LBR -- RAL -PB2 kAx Row: 0 P SEM SLA RBR -- -- -PB3 kBx Row: MIN BSL APO RSH X1 -- -- -PB4 kCx Row: ESC F3 F6 F9 F12 PAU -- -PB5 kDx Row: F1 F4 F7 F10 PRT PRG -- -PB6 kEx Row: F2 F5 F8 F11 SLK KEY -- +PC0 k8x Row: 8 I K COM DWN RCT PGU +PC1 k9x Row: 9 O L PER LBR -- RAL +PC2 kAx Row: 0 P SEM SLA RBR -- -- +PC3 kBx Row: MIN BSL APO RSH X1 -- -- +PC4 kCx Row: ESC F3 F6 F9 F12 PAU -- +PC5 kDx Row: F1 F4 F7 F10 PRT PRG -- +PC6 kEx Row: F2 F5 F8 F11 SLK KEY -- */ diff --git a/keyboards/kmac/info.json b/keyboards/kmac/info.json new file mode 100644 index 00000000000..f86cfdde59d --- /dev/null +++ b/keyboards/kmac/info.json @@ -0,0 +1,192 @@ +{ + "keyboard_name": "kmac", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + }, + + "LAYOUT_WKL": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 1.5, "y": 5.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 12.5, "y": 5.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c index f3ac93abf74..8ae8627a06f 100644 --- a/keyboards/kmac/keymaps/default/keymap.c +++ b/keyboards/kmac/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 "kmac.h" +#include QMK_KEYBOARD_H // Helpful defines #define _______ KC_TRNS @@ -26,22 +26,20 @@ #define _FL 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP( - 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_BRK, \ - 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [_FL] = KEYMAP( - BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + [_BL] = 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_SLCK, KC_BRK, + 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FL] = LAYOUT( + BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; const uint16_t PROGMEM fn_actions[] = { @@ -51,47 +49,52 @@ 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) { - SEND_STRING("The"); - return false; - } - break; - case 1: - if (record->event.pressed) { - SEND_STRING("Custom"); - return false; - } - break; - case 2: - if (record->event.pressed) { - SEND_STRING("Keyboard"); - return false; - } - break; - case 3: - if (record->event.pressed) { - return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END ); - } - break; + switch (id) + { + case 0: + if (record->event.pressed) + { + SEND_STRING("The"); + return false; + } + break; + case 1: + if (record->event.pressed) + { + SEND_STRING("Custom"); + return false; + } + break; + case 2: + if (record->event.pressed) + { + SEND_STRING("Keyboard"); + return false; + } + break; + case 3: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END); + } + break; } return MACRO_NONE; }; - -void matrix_init_user(void) { - +void matrix_init_user(void) +{ } -void matrix_scan_user(void) { - +void matrix_scan_user(void) +{ } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ return true; } -void led_set_user(uint8_t usb_led) { - +void led_set_user(uint8_t usb_led) +{ } diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c index e3d66ea0838..985d5a89fb2 100644 --- a/keyboards/kmac/keymaps/winkeyless/keymap.c +++ b/keyboards/kmac/keymaps/winkeyless/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 "kmac.h" +#include QMK_KEYBOARD_H // Helpful defines #define _______ KC_TRNS @@ -26,22 +26,20 @@ #define _FL 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_WINKEYLESS( - 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_BRK, \ - 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [_FL] = KEYMAP_WINKEYLESS( - BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + [_BL] = LAYOUT_WKL( + 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_BRK, + 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FL] = LAYOUT_WKL( + BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; const uint16_t PROGMEM fn_actions[] = { @@ -51,47 +49,52 @@ 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) { - SEND_STRING("The"); - return false; - } - break; - case 1: - if (record->event.pressed) { - SEND_STRING("Custom"); - return false; - } - break; - case 2: - if (record->event.pressed) { - SEND_STRING("Keyboard"); - return false; - } - break; - case 3: - if (record->event.pressed) { - return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END ); - } - break; + switch (id) + { + case 0: + if (record->event.pressed) + { + SEND_STRING("The"); + return false; + } + break; + case 1: + if (record->event.pressed) + { + SEND_STRING("Custom"); + return false; + } + break; + case 2: + if (record->event.pressed) + { + SEND_STRING("Keyboard"); + return false; + } + break; + case 3: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END); + } + break; } return MACRO_NONE; }; - -void matrix_init_user(void) { - +void matrix_init_user(void) +{ } -void matrix_scan_user(void) { - +void matrix_scan_user(void) +{ } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ return true; } -void led_set_user(uint8_t usb_led) { - +void led_set_user(uint8_t usb_led) +{ } diff --git a/keyboards/kmac/kmac.h b/keyboards/kmac/kmac.h index 1d9d8e36be6..44de8914af5 100644 --- a/keyboards/kmac/kmac.h +++ b/keyboards/kmac/kmac.h @@ -19,38 +19,35 @@ #include "quantum.h" // Keymap for the winkey version of the PCB. -#define KEYMAP( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, K5C, K5D, K5E, K5F, K5G \ -) { \ -/* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ -/* 0 */ { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ -/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ -/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ -/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, KC_NO, KC_NO, K4D, KC_NO, K4F, KC_NO }, \ -/* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, KC_NO, K5C, K5D, K5E, K5F, K5G } \ -} +#define LAYOUT( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ + K50, K51, K52, K55, K58, K5A, K5C, K5D, K5E, K5F, K5G) \ + { \ + /* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ + /* 0 */ {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ + /* 1 */ {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ + /* 2 */ {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G}, \ + /* 3 */ {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO}, \ + /* 4 */ {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, KC_NO, KC_NO, K4D, KC_NO, K4F, KC_NO}, \ + /* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, KC_NO, K5C, K5D, K5E, K5F, K5G } \ + } // Keymap for the winkeyless version of the PCB. -#define KEYMAP_WINKEYLESS( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, K5D, K5E, K5F, K5G \ -) KEYMAP( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, KC_NO, K5D, K5E, K5F, K5G \ -) +#define LAYOUT_WKL( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ + K50, K51, K52, K55, K58, K5A, K5D, K5E, K5F, K5G) LAYOUT(K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ + K50, K51, K52, K55, K58, K5A, KC_NO, K5D, K5E, K5F, K5G) #endif diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md index fccf902cab0..ec36c0a5c9b 100644 --- a/keyboards/kmac/readme.md +++ b/keyboards/kmac/readme.md @@ -1,5 +1,4 @@ -KMAC keyboard firmware -====================== +# KMAC keyboard firmware A Korean custom keyboard designed by Byungho Kim and the KBDMania community. @@ -37,9 +36,9 @@ To define your own keymap, copy one of the [existing keymap](keymaps) folders an To make it easy to define keymaps for the different versions of the PCB two macros are provided. -| PCB | Macro | -| -------------- | --------------------- | -| Winkey PCB | `KEYMAP()` | -| Winkeyless PCB | `KEYMAP_WINKEYLESS()` | +| PCB | Macro | +| -------------- | -------------- | +| Winkey PCB | `LAYOUT()` | +| Winkeyless PCB | `LAYOUT_WKL()` | To build the firmware with a custom keymap, run `make ` diff --git a/keyboards/knops/mini/info.json b/keyboards/knops/mini/info.json new file mode 100644 index 00000000000..88fb88c29ab --- /dev/null +++ b/keyboards/knops/mini/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Knops Mini", + "url": "http://www.knops.io/knopsmini.html", + "maintainer": "Pawnerd", + "bootloader": "lufa-dfu", + "width": 3, + "height": 2, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}] + } + } +} \ No newline at end of file diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index 40714c8a511..a5a701c88d7 100644 --- a/keyboards/knops/mini/keymaps/default/keymap.c +++ b/keyboards/knops/mini/keymaps/default/keymap.c @@ -1,53 +1,53 @@ -#include "mini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + LAYOUT( LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT), - KEYMAP( + LAYOUT( LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)), - KEYMAP( + LAYOUT( LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/keyboards/knops/mini/mini.h b/keyboards/knops/mini/mini.h index c9f74711b86..e2d6c546b07 100644 --- a/keyboards/knops/mini/mini.h +++ b/keyboards/knops/mini/mini.h @@ -22,7 +22,7 @@ // 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 KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05 \ ) { \ { K00, K01, K02, K03, K04, K05 }, \ diff --git a/keyboards/atom47/rev2/keymaps/LEdiodes/config.h b/keyboards/launchpad/config.h similarity index 63% rename from keyboards/atom47/rev2/keymaps/LEdiodes/config.h rename to keyboards/launchpad/config.h index e054f277599..9d1e310d3ec 100644 --- a/keyboards/atom47/rev2/keymaps/LEdiodes/config.h +++ b/keyboards/launchpad/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Maarten Dekkers 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 @@ -21,24 +21,15 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER Vortex -#define PRODUCT Core -#define DESCRIPTION Atom47 PCB for the Vortex Core +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6007 +#define MANUFACTURER Maple Computing +#define PRODUCT Launch Pad +#define DESCRIPTION An all-in-on macropad /* key matrix size */ #define MATRIX_ROWS 4 -#define MATRIX_COLS 13 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS {B1,B2,B3,B7} -#define MATRIX_COL_PINS {D7,D5,F0,F1,F4,F6,F7,D4,C7,C6,D6,B5,B4} -#define UNUSED_PINS - -#define BACKLIGHT_PIN B6 +#define MATRIX_COLS 2 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -59,16 +50,26 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* Backlight configuration +/* + * Feature disable options + * These options are also useful to firmware size reduction. */ -#define BACKLIGHT_LEVELS 4 -#define RGB_DI_PIN D0 // The pin the LED strip is connected to -#define RGBLED_NUM 1 // Number of LEDs in your strip +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT -#define QMK_ESC_OUTPUT D7 // usually COL -#define QMK_ESC_INPUT B1 // usually ROW -#define QMK_LED B6 +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" #endif +#endif diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c new file mode 100644 index 00000000000..67103576d97 --- /dev/null +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +// Below layout is based upon /u/That-Canadian's planck layout +#include "launchpad.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 _FUNC 15 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------. + * | 1 | 2 | + * |------+------| + * | 3 | 4 | + * |------+------| + * | 5 | 6 | + * |------+------| + * | FUNC | 8 | + * `-------------' + */ +[_QWERTY] = LAYOUT( \ + KC_1, KC_2, \ + KC_3, KC_4, \ + KC_5, KC_6, \ + MO(_FUNC), KC_8 \ +), + +/* Function + * ,-------------. + * | Q |CALDEL| + * |------+------| + * | A |TSKMGR| + * |------+------| + * | Z | X | + * |------+------| + * | | C | + * `-------------' + */ +[_FUNC] = LAYOUT( \ + KC_Q, CALTDEL, \ + KC_A, TSKMGR, \ + KC_Z, KC_X, \ + _______, KC_C \ +) + +}; + +void matrix_init_user(void) { + +} diff --git a/keyboards/launchpad/keymaps/default/rules.mk b/keyboards/launchpad/keymaps/default/rules.mk new file mode 100644 index 00000000000..260b9d8fad6 --- /dev/null +++ b/keyboards/launchpad/keymaps/default/rules.mk @@ -0,0 +1,25 @@ + + +# 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 = 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 + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/launchpad/launchpad.c b/keyboards/launchpad/launchpad.c new file mode 100644 index 00000000000..cc2812a76c6 --- /dev/null +++ b/keyboards/launchpad/launchpad.c @@ -0,0 +1 @@ +#include "launchpad.h" diff --git a/keyboards/launchpad/launchpad.h b/keyboards/launchpad/launchpad.h new file mode 100644 index 00000000000..85432de0ad2 --- /dev/null +++ b/keyboards/launchpad/launchpad.h @@ -0,0 +1,11 @@ +#ifndef LAUNCHPAD_H +#define LAUNCHPAD_H + +#ifdef KEYBOARD_launchpad_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + + +#endif diff --git a/keyboards/launchpad/readme.md b/keyboards/launchpad/readme.md new file mode 100644 index 00000000000..80b5de32191 --- /dev/null +++ b/keyboards/launchpad/readme.md @@ -0,0 +1,32 @@ +Launch Pad +=== + +![Launch Pad](https://i.imgur.com/WVTe0Ku.png) + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +A budget-minded, 4-8 key macro-pad with built in legs, plate & case. + +Supports MX & Alps switches. 2x 1u or 1x 2u supported for each row. + +Supports 2u PCB-Mount stabilizers. + +Runs off of 1x Pro Micro & 8x diodes (1n4148). + +Optional "Reset" switch can be used on the PCB. + +A fantastic project for beginners to learn to solder, veteran's of the hobby who want to add an easy macro-pad to their collection, and everyone in between. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Make example for this keyboard (after setting up your build environment): + + make launchpad/rev1: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. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Due to PCB tolerance issues outside of our control, the snap-apart legs included on the PCB may need extra padding to prevent a small amount of wobbling once placed properly. We have included small, clear, and semi-permanent "glue dots" in each order (PCB Only -and- Full Kit) to help with this. You may also use plastic wrap, tape, Elmer's glue, hot glue, rubber cement, etc. We advise against using anything more "permanent" in case you wish to make changes to your Launch Pad in the future. It is also best to attach legs after all of your soldering and building is finished, to get the most accurate feel for your Launch Pad. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- \ No newline at end of file diff --git a/keyboards/launchpad/rev1/config.h b/keyboards/launchpad/rev1/config.h new file mode 100644 index 00000000000..67a4154226f --- /dev/null +++ b/keyboards/launchpad/rev1/config.h @@ -0,0 +1,32 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0001 + +/* Let's Macro V2 pin-out */ +#define MATRIX_ROW_PINS { C6, B1, B3, D7 } +#define MATRIX_COL_PINS { D2, F7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#endif diff --git a/keyboards/launchpad/rev1/rev1.c b/keyboards/launchpad/rev1/rev1.c new file mode 100644 index 00000000000..a7aec80e10f --- /dev/null +++ b/keyboards/launchpad/rev1/rev1.c @@ -0,0 +1,14 @@ +#include "launchpad.h" + +void matrix_init_kb(void) { + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) + persistent_default_layer_set(1UL<<_NUMPAD); + 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/lets_split/keymaps/krusli/readme.md b/keyboards/lets_split/keymaps/krusli/readme.md new file mode 100644 index 00000000000..175ef3c11a5 --- /dev/null +++ b/keyboards/lets_split/keymaps/krusli/readme.md @@ -0,0 +1,2 @@ +# krusli +Let's Split keymap based off the default Planck layout with a numpad layer. diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h index 5a6261c4f7c..001b62e41bb 100644 --- a/keyboards/lets_split/keymaps/piemod/config.h +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -34,4 +34,16 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +// RGB Options +#undef RGBLED_NUM +#define RGBLED_NUM 10 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 1 + +// Typing Options +#define PREVENT_STUCK_MODIFIERS +#define QMK_KEYS_PER_SCAN 4 + #endif diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c index 762d8c2742a..fca96bf39a6 100644 --- a/keyboards/lets_split/keymaps/piemod/keymap.c +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -10,7 +10,7 @@ extern keymap_config_t keymap_config; #define _NUMBER 3 // F(3) #define _FUNCTION 4 // F(4) #define _EMACS 5 // F(5) -#define _MACROS 6 // F(6) +#define _COMBOS 6 // F(6) #define _MOUSE 7 // F(7) enum custom_keycodes { @@ -20,17 +20,17 @@ enum custom_keycodes { NUMBER, FUNCTION, EMACS, - MACROS, + COMBOS, MOUSE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( \ - KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ - KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ - KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ - F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ + KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ + KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ + F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), [_ARROW] = LAYOUT( \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYMBOL] = LAYOUT( \ KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(2), \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ ), @@ -56,9 +56,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNCTION] = LAYOUT( \ KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ - RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ + RESET, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), [_EMACS] = LAYOUT( \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ ), -[_MACROS] = LAYOUT( \ +[_COMBOS] = LAYOUT( \ 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, \ @@ -93,29 +93,8 @@ enum function_id { int CAPSLOCKED = 0; const uint16_t PROGMEM fn_actions[] = { - - // DVORAK 0 - // ARROW 1, F(1) - // SYMBOL 2, F(2) - // NUMBER 3, F(3) - // FUNCTION 4, F(4) - // EMACS 5, F(5) - // MACROS 6, F(6) - // MOUSE 7, F(7) - - // Layers - [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. - [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. - [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. - [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. - [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. - [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. - [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. - // Special Keys - [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - + [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. // Symbols - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. }; diff --git a/keyboards/lets_split/keymaps/piemod/rules.mk b/keyboards/lets_split/keymaps/piemod/rules.mk new file mode 100644 index 00000000000..027ea977e71 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/rules.mk @@ -0,0 +1,13 @@ +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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # 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. +SUBPROJECT_rev1 = no diff --git a/keyboards/lets_split/keymaps/zer09/config.h b/keyboards/lets_split/keymaps/zer09/config.h new file mode 100644 index 00000000000..73438d8a939 --- /dev/null +++ b/keyboards/lets_split/keymaps/zer09/config.h @@ -0,0 +1,59 @@ +/* +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" + +/* key matrix size */ +/* Rows are doubled-up */ +#undef MATRIX_ROWS +#undef MATRIX_COLS +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } + +#define CATERINA_BOOTLOADER +#define USB_MAX_POWER_CONSUMPTION 50 + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +/* #define MASTER_LEFT */ +// #define MASTER_RIGHT +#define EE_HANDS + +/* ws2812 RGB LED */ +#undef RGBLED_NUM +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 50 +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#endif diff --git a/keyboards/lets_split/keymaps/zer09/keymap.c b/keyboards/lets_split/keymaps/zer09/keymap.c new file mode 100644 index 00000000000..8d0eaf14116 --- /dev/null +++ b/keyboards/lets_split/keymaps/zer09/keymap.c @@ -0,0 +1,38 @@ +#include "keymap.h" + +extern keymap_config_t keymap_config; + +#define _baseLayer LAYOUT( \ + KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, /**/KC_F, KC_G, KC_C, KC_R, KC_L, \ + CTL_T(KC_A), SFT_T(KC_O), ALT_T(KC_E), KC_U, KC_I, /**/KC_D, KC_H, ALT_T(KC_T), SFT_T(KC_N), CTL_T(KC_S), \ + KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, /**/KC_B, KC_M, KC_W, KC_V, KC_Z, \ + TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \ + TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY)) + +#define _upLayer LAYOUT( \ + KC_4, KC_5, KC_6, _______, _______,/**/ _______, KC_RBRC, _______, _______, _______, \ + LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \ + KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \ + _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) + +#define _downLayer LAYOUT( \ + KC_F4, KC_F5, KC_F6, KC_F12, _______,/**/ _______, KC_RPRN, _______, _______, _______, \ + LCTL_T(KC_F1), LSFT_T(KC_F2), LALT_T(KC_F3), KC_F11, _______,/**/ KC_LPRN, KC_EQUAL, KC_LEFT, KC_UP, KC_RIGHT, \ + KC_F7, KC_F8, KC_F9, KC_F10, _______,/**/ KC_MINUS, _______, _______, KC_DOWN, _______, \ + _______, _______, _______, _______, _______,/**/ KC_PSCR, KC_SLCK, KC_PAUSE, _______, _______, \ + _______, _______, _______, _______, _______,/**/ _______, _______, _______, _______, _______) + +#define _astdLayer LAYOUT( \ + KC_MPRV, KC_MUTE, _______, _______, _______,/**/KC_PSCR, KC_SLCK, KC_PAUSE, _______, KC_RGUP, \ + KC_MPLY, KC_VOLD, _______, _______, _______,/**/_______, _______, _______, _______, KC_RGDWN, \ + KC_MNXT, KC_VOLU, RESET, _______, _______,/**/_______, _______, RESET, _______, _______, \ + _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,/**/_______, _______, _______, _______, _______) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = _baseLayer, + [_UL] = _upLayer, + [_DL] = _downLayer, + [_VL] = _upLayer, + [_AL] = _astdLayer}; diff --git a/keyboards/lets_split/keymaps/zer09/keymap.h b/keyboards/lets_split/keymaps/zer09/keymap.h new file mode 100644 index 00000000000..03f8f480afe --- /dev/null +++ b/keyboards/lets_split/keymaps/zer09/keymap.h @@ -0,0 +1,32 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "tap_dance.h" +#include "zer09.h" + +#ifdef LAYOUT_ortho_4x12 +#undef LAYOUT_ortho_4x12 +#endif + +#ifdef LAYOUT +#undef LAYOUT +#define LAYOUT( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { L40, L41, L42, L43, L44 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32, R33, R34 }, \ + { R40, R41, R42, R43, R44 } \ + } +#endif diff --git a/keyboards/planck/keymaps/rambo/rules.mk b/keyboards/lets_split/keymaps/zer09/rules.mk similarity index 72% rename from keyboards/planck/keymaps/rambo/rules.mk rename to keyboards/lets_split/keymaps/zer09/rules.mk index ffa9b870afe..d8adc708826 100644 --- a/keyboards/planck/keymaps/rambo/rules.mk +++ b/keyboards/lets_split/keymaps/zer09/rules.mk @@ -1,6 +1,6 @@ +RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -MOUSEKEY_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/lightsaver/info.json b/keyboards/lightsaver/info.json new file mode 100644 index 00000000000..e29b039b1c9 --- /dev/null +++ b/keyboards/lightsaver/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "lightsaver_v3", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 19, + "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}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "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":"Bkspc", "x":13, "y":1}, {"label":"Bkspc", "x":14, "y":1}, {"label":"Num
Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "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}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"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":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "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":"Fn", "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}, {"x":16, "y":5}, {"x":17, "y":5}, {"label":"Enter", "x":18, "y":5}] + } + } +} diff --git a/keyboards/lightsaver/keymaps/default/keymap.c b/keyboards/lightsaver/keymaps/default/keymap.c index fd188bd3445..d945ada24da 100644 --- a/keyboards/lightsaver/keymaps/default/keymap.c +++ b/keyboards/lightsaver/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "lightsaver.h" +#include QMK_KEYBOARD_H #define KC_F1GL TD(TD_F1_GAME) #define KC_CLFN TD(TD_CAPS_FN) @@ -25,7 +25,7 @@ enum custom_layers { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP(\ +[BASE] = 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_NLCK, KC_INS, KC_HOME, KC_PGUP, KC_PSLS, \ 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_END, KC_PGDN, KC_PAST, \ 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_P7, KC_P8, KC_P9, KC_PMNS, \ @@ -33,7 +33,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_P1, KC_P2, KC_P3, KC_PENT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), \ -[FN] = KEYMAP(\ +[FN] = LAYOUT(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_SLCK, RGB_TOG, RGB_MOD, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, BL_TOGG, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/lightsaver/keymaps/rasmus/keymap.c b/keyboards/lightsaver/keymaps/rasmus/keymap.c index acdfe9394e7..518ba2d21a7 100644 --- a/keyboards/lightsaver/keymaps/rasmus/keymap.c +++ b/keyboards/lightsaver/keymaps/rasmus/keymap.c @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "lightsaver.h" +#include QMK_KEYBOARD_H #define KC_F1GL TD(TD_F1_GAME) #define KC_CLFN TD(TD_CAPS_FN) @@ -65,7 +65,7 @@ enum macro_id { ) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP(\ +[BASE] = LAYOUT(\ KC_ESC, KC_F1GL, 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_NLCK, KC_INS, KC_HOME, KC_PGUP, KC_PSLS, \ 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_END, KC_PGDN, KC_PAST, \ 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_P7, KC_P8, KC_P9, KC_PMNS, \ @@ -73,7 +73,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_P1, KC_P2, KC_P3, KC_PENT, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), \ -[GAME] = KEYMAP(\ +[GAME] = LAYOUT(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LOCK, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LGUI, KC_LALT, _______, KC_RALT, _______, _______, _______, _______, _______, _______ ), \ -[FN] = KEYMAP(\ +[FN] = LAYOUT(\ _______, M(SHRG), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_SLCK, RGB_TOG, RGB_MOD, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/lightsaver/lightsaver.h b/keyboards/lightsaver/lightsaver.h index 5b80dbabb6f..19fcf36bacb 100644 --- a/keyboards/lightsaver/lightsaver.h +++ b/keyboards/lightsaver/lightsaver.h @@ -20,7 +20,7 @@ #define NO KC_NO -#define KEYMAP( \ +#define LAYOUT( \ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, K5S, \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, K4Q, K4R, K4S, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, K3P, K3Q, K3R, K3S, \ diff --git a/keyboards/mechmini/v2/info.json b/keyboards/mechmini/v2/info.json new file mode 100644 index 00000000000..c69771c1f85 --- /dev/null +++ b/keyboards/mechmini/v2/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "MechMini 2", + "url": "https://mechkeys.ca/pages/mechmini-2-guide", + "maintainer": "qmk", + "bootloader": "", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho": { + "layout": [{"label":"Esc", "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":"Back Space", "x":11, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"label":"Caps", "x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"GUI", "x":3, "y":3}, {"label":"MO(1)", "x":4, "y":3}, {"label":"Space", "x":5, "y":3}, {"label":"Space", "x":6, "y":3}, {"label":"MO(2)", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + }, + "LAYOUT_2u_space_ortho": { + "layout": [{"label":"Esc", "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":"Back Space", "x":11, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"label":"Caps", "x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"GUI", "x":3, "y":3}, {"label":"MO(1)", "x":4, "y":3}, {"label":"Space", "x":5, "y":3, "w":2}, {"label":"MO(2)", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + }, + "LAYOUT_625_space": { + "layout": [{"label":"Esc", "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":"Back
Space", "x":11, "y":0}, {"label":"Tab", "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":"Enter", "x":10.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":"Shift", "x":9.75, "y":2, "w":1.25}, {"label":">", "x":11, "y":2}, {"label":"Control", "x":0, "y":3, "w":1.25}, {"label":"Alt", "x":1.25, "y":3}, {"label":"GUI", "x":2.25, "y":3}, {"x":3.25, "y":3, "w":6.25}, {"label":"MO(1)", "x":9.5, "y":3, "w":1.25}, {"label":"MO(2)", "x":10.75, "y":3, "w":1.25}] + }, + "LAYOUT_split_space": { + "layout": [{"label":"Esc", "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":"Back
Space", "x":11, "y":0}, {"label":"Tab", "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":"Enter", "x":10.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":"Shift", "x":9.75, "y":2, "w":1.25}, {"label":">", "x":11, "y":2}, {"label":"Control", "x":0, "y":3, "w":1.25}, {"label":"Alt", "x":1.25, "y":3}, {"label":"GUI", "x":2.25, "y":3, "w":1.25}, {"label":"Space", "x":3.5, "y":3, "w":2.75}, {"label":"Space", "x":6.25, "y":3, "w":2.25}, {"label":"Control", "x":8.5, "y":3, "w":1.25}, {"label":"MO(1)", "x":9.75, "y":3}, {"label":"MO(2)", "x":10.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c index 1b098333143..1b21750035e 100644 --- a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c +++ b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c @@ -1,4 +1,4 @@ -#include "mechmini.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FN1 1 @@ -7,19 +7,19 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_2U_SPACE_ORTHO( + [_BL] = LAYOUT_2u_space_ortho( F(0), 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, KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_FN1] = KEYMAP_2U_SPACE_ORTHO( + [_FN1] = LAYOUT_2u_space_ortho( 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, M(1), M(1), 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), - [_FN2] = KEYMAP_2U_SPACE_ORTHO( + [_FN2] = LAYOUT_2u_space_ortho( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_HOME, KC_END, KC_TRNS, diff --git a/keyboards/mechmini/v2/keymaps/625_space/keymap.c b/keyboards/mechmini/v2/keymaps/625_space/keymap.c index 4c9f6011ebc..60d4d32d12b 100755 --- a/keyboards/mechmini/v2/keymaps/625_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/625_space/keymap.c @@ -1,4 +1,4 @@ -#include "mechmini.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FN1 1 @@ -7,19 +7,19 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_625_SPACE( + [_BL] = LAYOUT_625_space( F(0), 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_LSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(1), MO(2)), - [_FN1] = KEYMAP_625_SPACE( + [_FN1] = LAYOUT_625_space( 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_PGUP, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_TRNS, KC_LSFT, KC_PGDN, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_SLSH, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_FN2] = KEYMAP_625_SPACE( + [_FN2] = LAYOUT_625_space( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_END, diff --git a/keyboards/mechmini/v2/keymaps/default/keymap.c b/keyboards/mechmini/v2/keymaps/default/keymap.c index f9c792e5563..e35f25ee401 100755 --- a/keyboards/mechmini/v2/keymaps/default/keymap.c +++ b/keyboards/mechmini/v2/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "mechmini.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FN1 1 @@ -7,19 +7,19 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_SPLIT_SPACE( + [_BL] = LAYOUT_split_space( F(0), 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_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), - [_FN1] = KEYMAP_SPLIT_SPACE( + [_FN1] = LAYOUT_split_space( 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_PGUP, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_TRNS, KC_LSFT, KC_PGDN, KC_VOLD, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_SLSH, KC_COMM, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_FN2] = KEYMAP_SPLIT_SPACE( + [_FN2] = LAYOUT_split_space( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_END, diff --git a/keyboards/mechmini/v2/keymaps/ortho/keymap.c b/keyboards/mechmini/v2/keymaps/ortho/keymap.c index fb33e17759c..3b8fbb168f5 100755 --- a/keyboards/mechmini/v2/keymaps/ortho/keymap.c +++ b/keyboards/mechmini/v2/keymaps/ortho/keymap.c @@ -1,4 +1,4 @@ -#include "mechmini.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FN1 1 @@ -7,19 +7,19 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_ORTHO( + [_BL] = LAYOUT_ortho( F(0), 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, KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [_FN1] = KEYMAP_ORTHO( + [_FN1] = LAYOUT_ortho( 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, M(1), M(1), 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_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), - [_FN2] = KEYMAP_ORTHO( + [_FN2] = LAYOUT_ortho( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_HOME, KC_END, KC_TRNS, diff --git a/keyboards/mechmini/v2/keymaps/split_space/keymap.c b/keyboards/mechmini/v2/keymaps/split_space/keymap.c index f9c792e5563..e35f25ee401 100755 --- a/keyboards/mechmini/v2/keymaps/split_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/split_space/keymap.c @@ -1,4 +1,4 @@ -#include "mechmini.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FN1 1 @@ -7,19 +7,19 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = KEYMAP_SPLIT_SPACE( + [_BL] = LAYOUT_split_space( F(0), 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_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), - [_FN1] = KEYMAP_SPLIT_SPACE( + [_FN1] = LAYOUT_split_space( 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_PGUP, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_TRNS, KC_LSFT, KC_PGDN, KC_VOLD, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_SLSH, KC_COMM, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_FN2] = KEYMAP_SPLIT_SPACE( + [_FN2] = LAYOUT_split_space( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_END, diff --git a/keyboards/mechmini/v2/v2.h b/keyboards/mechmini/v2/v2.h index 5ed9a9c28b7..67a13abbb5d 100755 --- a/keyboards/mechmini/v2/v2.h +++ b/keyboards/mechmini/v2/v2.h @@ -18,7 +18,7 @@ #include "../mechmini.h" -#define KEYMAP_ORTHO( \ +#define LAYOUT_ortho( \ 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, \ @@ -30,7 +30,7 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ } -#define KEYMAP_625_SPACE( \ +#define LAYOUT_625_space( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ @@ -42,7 +42,7 @@ { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311 } \ } -#define KEYMAP_SPLIT_SPACE( \ +#define LAYOUT_split_space( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ @@ -54,7 +54,7 @@ { K300, K301, K302, KC_NO, K304, KC_NO, KC_NO, K307, KC_NO, K309, K310, K311 } \ } -#define KEYMAP_2U_SPACE_ORTHO( \ +#define LAYOUT_2u_space_ortho( \ 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, \ diff --git a/keyboards/meira/config.h b/keyboards/meira/config.h index b9bdd426a0e..5e9dd6837e0 100644 --- a/keyboards/meira/config.h +++ b/keyboards/meira/config.h @@ -35,11 +35,15 @@ along with this program. If not, see . /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION CUSTOM_MATRIX +#ifdef BACKLIGHT_ENABLE #define BACKLIGHT_LEVELS 10 #define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255} +#endif +#ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D3 #define RGBLIGHT_TIMER #define RGBLED_NUM 15 // Number of LEDs +#endif #endif diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index ea26bedfa06..b7cdfe8bdb8 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -36,6 +36,10 @@ along with this program. If not, see . #define LED_EN_PIN D2 #define UNUSED_PINS +#define QMK_SPEAKER B5 +#define B5_AUDIO +#define AUDIO_VOICES + #define CATERINA_BOOTLOADER diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index 3f32ba890ba..e27608983f1 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -1,3 +1,3 @@ BLUETOOTH_ENABLE = yes F_CPU = 8000000 - +BLUETOOTH = AdafruitBLE diff --git a/keyboards/meira/keymaps/cole/config.h b/keyboards/meira/keymaps/cole/config.h new file mode 100644 index 00000000000..90c490e8362 --- /dev/null +++ b/keyboards/meira/keymaps/cole/config.h @@ -0,0 +1,31 @@ +/* Copyright 2017 Cole Markham, WoodKeys.click + * + * 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 MUSIC_MASK (keycode != KC_NO) +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(IMPERIAL_MARCH) + // Disable music mode to keep the firmware size down + #define NO_MUSIC_MODE + +#endif + +#endif diff --git a/keyboards/meira/keymaps/cole/keymap.c b/keyboards/meira/keymaps/cole/keymap.c new file mode 100644 index 00000000000..b1c230d9264 --- /dev/null +++ b/keyboards/meira/keymaps/cole/keymap.c @@ -0,0 +1,253 @@ +/* Copyright 2017 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 "meira.h" +#include "lighting.h" + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + + +#ifndef BLUETOOTH_ENABLE +#define OUT_BT KC_TRNS +#endif + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Ctrl | Alt |Lower | Cmd |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + 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, \ + ADJUST, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_LGUI, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_TILD, 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_QUOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home | PgUp | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + _______, 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_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_HOME, KC_PGDN, KC_PGUP, KC_END \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + RESET, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_PSCR, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \ + BL_STEP, RGB_MOD, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, \ + BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, OUT_AUTO, OUT_USB, OUT_BT \ + ) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); +#endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(16); +#endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(15); +#endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + // FIXME add RGB feedback + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case BL_TOGG: +#ifdef BACKLIGHT_ENABLE + if (record->event.pressed) { + print("Enabling backlight\n"); + backlight_init_ports(); + } +#endif + return false; + break; + case BL_STEP: + if (record->event.pressed) { +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released +#ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; +#endif + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/meira/keymaps/cole/readme.md b/keyboards/meira/keymaps/cole/readme.md new file mode 100644 index 00000000000..be840488132 --- /dev/null +++ b/keyboards/meira/keymaps/cole/readme.md @@ -0,0 +1 @@ +# The default keymap for meira diff --git a/keyboards/meira/keymaps/cole/rules.mk b/keyboards/meira/keymaps/cole/rules.mk new file mode 100644 index 00000000000..8f8d53e57a5 --- /dev/null +++ b/keyboards/meira/keymaps/cole/rules.mk @@ -0,0 +1,2 @@ +AUDIO_ENABLE = yes # Audio output on port C6 +EXTRAFLAGS+=-flto # -4-7k \ No newline at end of file diff --git a/keyboards/meira/keymaps/default/config.h b/keyboards/meira/keymaps/default/config.h index 97210115b9e..5f5844a70a1 100644 --- a/keyboards/meira/keymaps/default/config.h +++ b/keyboards/meira/keymaps/default/config.h @@ -20,5 +20,15 @@ #include "../../config.h" // place overrides here +#define MUSIC_MASK (keycode != KC_NO) +#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/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index dd55859a580..4bbd014cb79 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -37,6 +37,17 @@ enum custom_keycodes { ADJUST, }; +#ifdef AUDIO_ENABLE + +float tone_my_startup[][2] = SONG(ODE_TO_JOY); +float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY); + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +#endif /* AUDIO_ENABLE */ + // define variables for reactive RGB bool TOG_STATUS = false; int RGB_current_mode; diff --git a/keyboards/meira/meira.c b/keyboards/meira/meira.c index 2ae53e00a3e..3ff62a080b9 100644 --- a/keyboards/meira/meira.c +++ b/keyboards/meira/meira.c @@ -22,30 +22,10 @@ extern void backlight_set(uint8_t level); -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - - -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); - #endif -} - - void matrix_init_kb(void) { debug_enable=true; print("meira matrix_init_kb\n"); -#ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -#endif - #ifdef ISSI_ENABLE issi_init(); diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h index 35c5ba419de..8cdcd09fe22 100644 --- a/keyboards/meira/meira.h +++ b/keyboards/meira/meira.h @@ -54,6 +54,7 @@ void reset_keyboard_kb(void); #define LAYOUT_ortho_4x12 KEYMAP #define KC_LAYOUT_ortho_4x12 KC_KEYMAP +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP #endif diff --git a/keyboards/meira/promicro/rules.mk b/keyboards/meira/promicro/rules.mk index 3c81f1b344a..22e49971f1c 100644 --- a/keyboards/meira/promicro/rules.mk +++ b/keyboards/meira/promicro/rules.mk @@ -1 +1,14 @@ +# 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 + BLUETOOTH_ENABLE = no diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk index e898146abd2..d3e45fc8d0d 100644 --- a/keyboards/meira/rules.mk +++ b/keyboards/meira/rules.mk @@ -4,19 +4,6 @@ SRC += matrix.c TWIlib.c issi.c lighting.c #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 @@ -37,6 +24,12 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) +# 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 = caterina + # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT @@ -54,10 +47,10 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # 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 +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 @@ -74,13 +67,13 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be di CUSTOM_MATRIX = yes -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif +#ifeq ($(strip $(ISSI_ENABLE)), yes) +# TMK_COMMON_DEFS += -DISSI_ENABLE +#endif +# +#ifeq ($(strip $(WATCHDOG_ENABLE)), yes) +# TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +#endif DEFAULT_FOLDER = meira/promicro LAYOUTS = ortho_4x12 diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h new file mode 100644 index 00000000000..d1e3d27a185 --- /dev/null +++ b/keyboards/meme/config.h @@ -0,0 +1,190 @@ +/* +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_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 Switchmod Keyboards +#define PRODUCT Meme +#define DESCRIPTION A custom 65% gasket mount keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C2, D0, D1, D4, D5, D6, B0, B1, B2, B3 } +#define MATRIX_COL_PINS { D3, D2, B5, B6, C7, C6, C5, C4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* 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/meme/info.json b/keyboards/meme/info.json new file mode 100644 index 00000000000..4d72d79dcbc --- /dev/null +++ b/keyboards/meme/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Meme", + "url": "", + "maintainer": "qmk", + "width": 16, + "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}, {"x":15, "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, "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":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"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}, {"x":15, "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}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_vanilla": { + "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, "w":2}, {"x":15, "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, "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":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"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}, {"x":15, "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}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_aria": { + "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, "w":2}, {"x":15, "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, "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":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"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}, {"x":15, "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.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_true": { + "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, "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, "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":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"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}, {"x":15, "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.5}, {"x":11.5, "y":4, "w":1.5}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/meme/keymaps/default/config.h b/keyboards/meme/keymaps/default/config.h new file mode 100644 index 00000000000..2c852d18199 --- /dev/null +++ b/keyboards/meme/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/meme/keymaps/default/keymap.c b/keyboards/meme/keymaps/default/keymap.c new file mode 100644 index 00000000000..6c4cb6cf5f3 --- /dev/null +++ b/keyboards/meme/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* 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_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_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_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ) +}; diff --git a/keyboards/meme/keymaps/default/readme.md b/keyboards/meme/keymaps/default/readme.md new file mode 100644 index 00000000000..59aa078d715 --- /dev/null +++ b/keyboards/meme/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Meme diff --git a/keyboards/meme/meme.c b/keyboards/meme/meme.c new file mode 100644 index 00000000000..8ba421b1508 --- /dev/null +++ b/keyboards/meme/meme.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 "meme.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/meme/meme.h b/keyboards/meme/meme.h new file mode 100644 index 00000000000..4c55b4a8f4e --- /dev/null +++ b/keyboards/meme/meme.h @@ -0,0 +1,102 @@ +/* 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 MEME_H +#define MEME_H + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ + K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07}, \ + {K10, K11, K12, K13, K14, K15, K16, K17}, \ + {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ + {K30, K31, K32, K33, K34, K35, K36, K37}, \ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + {K50, K51, K52, K53, K54, K55, K56, K57}, \ + {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ + {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ + {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ + {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ +} + +#define LAYOUT_vanilla( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ + K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07}, \ + {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ + {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ + {K30, K31, K32, K33, K34, K35, K36, K37}, \ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + {K50, K51, K52, K53, K54, K55, K56, K57}, \ + {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ + {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ + {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ + {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ +} + +#define LAYOUT_aria( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ + K80, K90, K81, K92, K85, K86, K96, K87, K97 \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07}, \ + {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ + {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ + {K30, K31, K32, K33, K34, K35, K36, K37}, \ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + {K50, K51, K52, K53, K54, K55, K56, K57}, \ + {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ + {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ + {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ + {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ +} + +#define LAYOUT_true( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ + K80, K90, K81, K92, K85, K86, K96, K87, K97 \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07}, \ + {K10, K11, K12, K13, K14, K15, K16, K17}, \ + {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ + {K30, K31, K32, K33, K34, K35, K36, K37}, \ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + {K50, K51, K52, K53, K54, K55, K56, K57}, \ + {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ + {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ + {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ + {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ +} + + +#endif diff --git a/keyboards/meme/readme.md b/keyboards/meme/readme.md new file mode 100644 index 00000000000..9d3bce94855 --- /dev/null +++ b/keyboards/meme/readme.md @@ -0,0 +1,15 @@ +# Meme + +![meme](imgur.com image replace me!) + +65% gasket mount keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Meme +Hardware Availability: [Switchmod Keyboards](http://www.switchmod.net/) + +Make example for this keyboard (after setting up your build environment): + + make meme: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/quantum/template/rules.mk b/keyboards/meme/rules.mk similarity index 100% rename from quantum/template/rules.mk rename to keyboards/meme/rules.mk diff --git a/keyboards/mf68/info.json b/keyboards/mf68/info.json new file mode 100644 index 00000000000..d41c2176a9b --- /dev/null +++ b/keyboards/mf68/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "MF68", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "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":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "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.25, "y":1}, {"x":16.25, "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":"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}, {"x":15.25, "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}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] + } + } +} diff --git a/keyboards/mf68/keymaps/default/keymap.c b/keyboards/mf68/keymaps/default/keymap.c index fd8810d5281..73045f3107a 100644 --- a/keyboards/mf68/keymaps/default/keymap.c +++ b/keyboards/mf68/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "mf68.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 @@ -9,7 +9,7 @@ #define KC_X2 BL_STEP const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KC_KEYMAP( + [_QWERTY] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ diff --git a/keyboards/mf68/keymaps/factory/keymap.c b/keyboards/mf68/keymaps/factory/keymap.c index ffd857a89fc..0c5305e5191 100644 --- a/keyboards/mf68/keymaps/factory/keymap.c +++ b/keyboards/mf68/keymaps/factory/keymap.c @@ -1,4 +1,4 @@ -#include "mf68.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KC_KEYMAP( + [_QWERTY] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , ,HOME, /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ @@ -39,11 +39,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ , ,MPLY,MSTP,MPRV,MNXT,VOLD,VOLU,MUTE, ,END , , X5 , /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , X3 , X6 , X4 + , , , , , , , X3 , X6 , X4 /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ diff --git a/keyboards/mf68/mf68.h b/keyboards/mf68/mf68.h index 316e3b87fcf..a7aefc64792 100644 --- a/keyboards/mf68/mf68.h +++ b/keyboards/mf68/mf68.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ @@ -20,13 +20,13 @@ { K70, K71, K72, K73, K74 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ -) KEYMAP( \ +) LAYOUT( \ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ diff --git a/keyboards/mf68_ble/info.json b/keyboards/mf68_ble/info.json new file mode 100644 index 00000000000..1f8aaed9246 --- /dev/null +++ b/keyboards/mf68_ble/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "MF68 BLE", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "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":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "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.25, "y":1}, {"x":16.25, "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":"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}, {"x":15.25, "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}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] + } + } +} diff --git a/keyboards/mf68_ble/keymaps/default/keymap.c b/keyboards/mf68_ble/keymaps/default/keymap.c index 9c7cecc2da1..73045f3107a 100644 --- a/keyboards/mf68_ble/keymaps/default/keymap.c +++ b/keyboards/mf68_ble/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "mf68_ble.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 diff --git a/keyboards/niu_mini/info.json b/keyboards/niu_mini/info.json new file mode 100644 index 00000000000..1ff16a91c83 --- /dev/null +++ b/keyboards/niu_mini/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "NIU Mini", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "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":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "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, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + }, + + "LAYOUT_mit": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "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":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "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, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index a0bfef73f56..39aa01090a6 100644 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "niu_mini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/niu_mini/keymaps/mason/keymap.c b/keyboards/niu_mini/keymaps/mason/keymap.c index 3d05bf7b023..c6185f7ec77 100644 --- a/keyboards/niu_mini/keymaps/mason/keymap.c +++ b/keyboards/niu_mini/keymaps/mason/keymap.c @@ -1,4 +1,4 @@ -#include "niu_mini.h" +#include QMK_KEYBOARD_H enum layers { _QWERTY, diff --git a/keyboards/niu_mini/keymaps/planck/keymap.c b/keyboards/niu_mini/keymaps/planck/keymap.c index a4ffad9c952..b4661bfd2d3 100644 --- a/keyboards/niu_mini/keymaps/planck/keymap.c +++ b/keyboards/niu_mini/keymaps/planck/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "niu_mini.h" +#include QMK_KEYBOARD_H #include "action_layer.h" extern keymap_config_t keymap_config; diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h index 88c5af11b09..2dd707ede62 100644 --- a/keyboards/niu_mini/niu_mini.h +++ b/keyboards/niu_mini/niu_mini.h @@ -10,10 +10,10 @@ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ ) \ { \ - { 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, k35, k37, k38, k39, k3a, k3b } \ + { 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, KC_NO, k37, k38, k39, k3a, k3b } \ } #define LAYOUT_grid( \ diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index 6955343b9f0..91f0cd4b6c6 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md @@ -11,6 +11,6 @@ Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini Make example for this keyboard (after setting up your build environment): - make niu_mini:default + make niu_mini:default:avrdude 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/nyquist/keymaps/danielhklein/config.h b/keyboards/nyquist/keymaps/danielhklein/config.h index 7ed90b6cdf2..09abbccb727 100644 --- a/keyboards/nyquist/keymaps/danielhklein/config.h +++ b/keyboards/nyquist/keymaps/danielhklein/config.h @@ -19,6 +19,8 @@ along with this program. If not, see . #define TAPPING_TERM 150 #define USE_SERIAL #define EE_HANDS +#define BOOTMAGIC_KEY_SALT KC_ENT + #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" diff --git a/keyboards/nyquist/keymaps/danielhklein/keymap.c b/keyboards/nyquist/keymaps/danielhklein/keymap.c index d0801b4a16d..c7dd52a12e5 100644 --- a/keyboards/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/nyquist/keymaps/danielhklein/keymap.c @@ -7,32 +7,41 @@ Major changes made: - DVORAK, COLEMAK, FUNCTION, MOUSE, and ADJUST layers have been removed - right 2u key performs backspace, not enter - - no right ctrl key - - direction keys added to bottom row - LOWER layer controls function keys, media controls, and underglow + - ARROW layer uses JKLI for arrow keys + - Bootmagic enabled and bootmagic initialization key changed from space to enter */ + 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. enum custom_layers { _QWERTY, _LOWER, - _RAISE + _RAISE, + _ARROW }; enum custom_keycodes { QWERTY = SAFE_RANGE, LOWER, - RAISE + RAISE, + ARROW }; // Enable these functions using FUNC(n) macro. const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_BSPC) //Hold for momentary Raise layer, Tap for Backspace, + [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, + [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, + [2] = MO(_ARROW), //Hold for momentary Arrow }; #define SPC_LWR FUNC(0) #define BSP_RSE FUNC(1) +#define ARW FUNC(2) // Fillers to make layering more clear #define _______ KC_TRNS @@ -44,48 +53,48 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY +/* QWERTY * .----------------------------------------. .-----------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | [ | + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | * |-----+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ] | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P |Enter | * |-----+------+------+------+------+------| |------+------+------+------+------+------| * | Caps| A | S | D | F | G | | H | J | K | L | ; | " | * |-----+------+------+------+------+------| |------+------+------+------+------+------| - * |Lshft| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |Lshft| Z | X | C | V | B | | N | M | , | . | / |Rshft | * |-----+------+------+------+------+------| |------+------+------+------+------+------| - * | | Ctrl | LAlt | LGui | Bspc/Raise | | Spc/Lower | Left | Down | Up |Right | + * |Arrow| LCtrl| LAlt | LGui | Bspc/Raise | | Spc/Lower | RGui | RAlt | RCtrl| Del | * `----------------------------------------' '-----------------------------------------' */ [_QWERTY] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRACKET, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRACKET, \ - 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_ENT, \ - XXXXXXX, KC_LCTL, KC_LALT, KC_LGUI, BSP_RSE, BSP_RSE, SPC_LWR, SPC_LWR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), + 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_ENT, + 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, + ARW, KC_LCTL, KC_LALT, KC_LGUI, BSP_RSE, BSP_RSE, SPC_LWR, SPC_LWR, KC_RGUI, KC_RALT, KC_RCTL, KC_DEL + ), /* Raise * ,-----------------------------------------. .-----------------------------------------. - * | | | | | | | | = | / | * | - | \ | Del | + * | | | | | | | | = | / | * | - | \ | ` | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | 7 | 8 | 9 | + | ` | | + * | | | | | | | | 7 | 8 | 9 | + | [ | ] | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | 4 | 5 | 6 | Enter| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Lshft| | | | | | | 1 | 2 | 3 | Space| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | Bspc/Raise | | 0 | . | Bspc | | | + * | | | | LGui | | | 0 | . | Bspc | | | * `-----------------------------------------' `-----------------------------------------' */ -[_RAISE] = LAYOUT( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PSLS, KC_PAST, KC_MINS, KC_BSLS, KC_DEL, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, KC_GRV, XXXXXXX,\ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PENT, XXXXXXX, XXXXXXX,\ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_SPC, XXXXXXX, XXXXXXX,\ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_0, KC_0, KC_DOT, KC_BSPC, XXXXXXX, XXXXXXX \ +[_RAISE] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PSLS, KC_PAST, KC_MINS, KC_BSLS, KC_GRV, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PPLS, KC_LBRC, KC_RBRC, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PENT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_SPC, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, KC_0, KC_0, KC_DOT, KC_BSPC, XXXXXXX, XXXXXXX ), /* Lower @@ -98,18 +107,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * |RGB IO|RGB >>|RGB <<|Hue++ |Hue-- | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Sat++ |Sat-- |Val++ |Val-- | | | Spc/Lower | | | | | + * |Sat++ |Sat-- |Val++ |Val-- | | | | | | | | * `-----------------------------------------' `-----------------------------------------' */ -[_LOWER] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +[_LOWER] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), +/* Arrow + * ,-----------------------------------------. ,----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |-----+------+------+------+------+------| + * | | | | | | | | | | Up | | | | + * |------+------+------+------+------+------| |-----+------+------+------+------+------| + * | | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------| |-----+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |-----+------+------+------+------+------| + * | | | | Gui | | | | | | | | + * `-----------------------------------------' `----------------------------------------' + */ + +[_ARROW] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + }; void persistent_default_layer_set(uint16_t default_layer) { diff --git a/keyboards/nyquist/keymaps/danielhklein/rules.mk b/keyboards/nyquist/keymaps/danielhklein/rules.mk index ba799d47f46..0b540a47129 100644 --- a/keyboards/nyquist/keymaps/danielhklein/rules.mk +++ b/keyboards/nyquist/keymaps/danielhklein/rules.mk @@ -18,7 +18,7 @@ # 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) +BOOTMAGIC_ENABLE = yes # 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) diff --git a/keyboards/nyquist/nyquist.h b/keyboards/nyquist/nyquist.h index a96d40d9fe0..d401a45f78f 100644 --- a/keyboards/nyquist/nyquist.h +++ b/keyboards/nyquist/nyquist.h @@ -4,6 +4,9 @@ #ifdef KEYBOARD_nyquist_rev1 #include "rev1.h" #endif +#ifdef KEYBOARD_nyquist_rev2 + #include "rev2.h" +#endif #include "quantum.h" diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h index 4430f254cb5..61bcb80e2cf 100644 --- a/keyboards/nyquist/rev1/config.h +++ b/keyboards/nyquist/rev1/config.h @@ -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 @@ -21,7 +21,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1156 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio diff --git a/keyboards/nyquist/rev2/config.h b/keyboards/nyquist/rev2/config.h new file mode 100644 index 00000000000..75d2e939352 --- /dev/null +++ b/keyboards/nyquist/rev2/config.h @@ -0,0 +1,86 @@ +/* +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 REV2_CONFIG_H +#define REV2_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1156 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT The Nyquist Keyboard +#define DESCRIPTION Split 60 percent ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { D2, F5, F6, F7, B1, B3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 16 // Number of LEDs + +/* Backlight LEDs */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/nyquist/rev2/rev2.c b/keyboards/nyquist/rev2/rev2.c new file mode 100644 index 00000000000..9922b8995ab --- /dev/null +++ b/keyboards/nyquist/rev2/rev2.c @@ -0,0 +1,21 @@ +#include "rev2.h" + +#ifdef SSD1306OLED +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); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; diff --git a/keyboards/nyquist/rev2/rev2.h b/keyboards/nyquist/rev2/rev2.h new file mode 100644 index 00000000000..1eec5d2beb8 --- /dev/null +++ b/keyboards/nyquist/rev2/rev2.h @@ -0,0 +1,68 @@ +#ifndef REV2_H +#define REV2_H + +#include "nyquist.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#ifndef FLIP_HALF +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { R45, R44, R43, R42, R41, R40 } \ + } +#else +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 } \ + } +#endif + +#define LAYOUT_ortho_5x12 LAYOUT + +#endif diff --git a/keyboards/nyquist/rev2/rules.mk b/keyboards/nyquist/rev2/rules.mk new file mode 100644 index 00000000000..bd518d8f273 --- /dev/null +++ b/keyboards/nyquist/rev2/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index 971cd188a8e..840628e1c5f 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -64,7 +64,6 @@ 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. -SUBPROJECT_rev1 = yes USE_I2C = 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 diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_blackheart/config.h new file mode 100644 index 00000000000..14b4a5f172a --- /dev/null +++ b/keyboards/omnikey_blackheart/config.h @@ -0,0 +1,60 @@ +#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 blindassassin111 +#define PRODUCT Omnikey Blackheart PCB +#define DESCRIPTION Teensy++ Board for Omnikey keyboards + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 23 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D4 } +#define MATRIX_COL_PINS { C2, C3, C4, C7, C1, C0, E1, E0, D7, F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1, B2, B3 } +#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)) \ +) + +/* force n-key rollover*/ +#define FORCE_NKRO + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#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/omnikey_blackheart/keymaps/default/keymap.c b/keyboards/omnikey_blackheart/keymaps/default/keymap.c new file mode 100644 index 00000000000..9dff862e87e --- /dev/null +++ b/keyboards/omnikey_blackheart/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +#include "omnikey_blackheart.h" + +// Fillers to make layering more clear +#define ______ KC_TRNS +#define XXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP(\ + KC_F11 , KC_F12 , 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_F1 , KC_F2 , 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_NLCK , KC_PSLS, KC_PAST, KC_PMNS, + KC_F3 , KC_F4 , 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_P7 , KC_P8 , KC_P9 , KC_PPLS, + KC_F5 , KC_F6 , 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 , XXXXXX , XXXXXX , XXXXXX , KC_P4 , KC_P5 , KC_P6 , KC_EQL, + KC_F7 , KC_F8 , KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , MO(1) , XXXXXX , KC_UP , XXXXXX , KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_F9 , KC_F10 , KC_LCTL , KC_LGUI , KC_LALT , XXXXXX , KC_SPC , KC_RALT , KC_RGUI , KC_RCTL , XXXXXX , KC_LEFT , KC_DOWN , KC_RIGHT, KC_P0 , KC_PDOT + ), + + [1] = KEYMAP(\ + KC_F11 , KC_F12 , 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_F1 , KC_F2 , RESET , 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_NLCK , KC_PSLS, KC_PAST, KC_PMNS, + KC_F3 , KC_F4 , 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_P7 , KC_P8 , KC_P9 , KC_PPLS, + KC_F5 , KC_F6 , 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 , XXXXXX , XXXXXX , XXXXXX , KC_P4 , KC_P5 , KC_P6 , KC_EQL, + KC_F7 , KC_F8 , KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , ______ , XXXXXX , KC_UP , XXXXXX , KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_F9 , KC_F10 , KC_LCTL , KC_LGUI , KC_LALT , XXXXXX , KC_SPC , KC_RALT , KC_RGUI , KC_RCTL , XXXXXX , KC_LEFT , KC_DOWN , KC_RIGHT, KC_P0 , KC_PDOT + ), +}; + +void led_set_kb(uint8_t usb_led) { + DDRB |= (1 << 4) | (1 << 5) | (1 << 6); + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + PORTB |= (1 << 4); + } else { + PORTB &= ~(1 << 4); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + PORTB |= (1 << 5); + } else { + PORTB &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + PORTB |= (1 << 6); + } else { + PORTB &= ~(1 << 6); + } +} \ No newline at end of file diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.c b/keyboards/omnikey_blackheart/omnikey_blackheart.c new file mode 100644 index 00000000000..e54047fa68a --- /dev/null +++ b/keyboards/omnikey_blackheart/omnikey_blackheart.c @@ -0,0 +1 @@ +#include "omnikey_blackheart.h" diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.h b/keyboards/omnikey_blackheart/omnikey_blackheart.h new file mode 100644 index 00000000000..e0baa7f63a8 --- /dev/null +++ b/keyboards/omnikey_blackheart/omnikey_blackheart.h @@ -0,0 +1,22 @@ +#ifndef omnikey_blackheart +#define omnikey_blackheart + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, \ + K500, K501, K502, K503, K504, K505, K507, K512, K513, K514, K515, K516, K517, K518, K519, K520 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ + { K500, K501, K502, K503, K504, K505, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/omnikey_blackheart/readme.md b/keyboards/omnikey_blackheart/readme.md new file mode 100644 index 00000000000..b318f3e3710 --- /dev/null +++ b/keyboards/omnikey_blackheart/readme.md @@ -0,0 +1,14 @@ +Omnikey Blackheart PCB +=== + +A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. + +Keyboard Maintainer: QMK Community and blindassassin111 +Hardware Supported: Omnikey blackheart PCB +Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html + +Make example for this keyboard (after setting up your build environment): + + make omnikey_blackheart: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/omnikey_blackheart/rules.mk b/keyboards/omnikey_blackheart/rules.mk new file mode 100644 index 00000000000..3d4422e9867 --- /dev/null +++ b/keyboards/omnikey_blackheart/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = at90usb1286 + +# 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 ?= no \ No newline at end of file diff --git a/keyboards/orthodox/keymaps/drashna/README.md b/keyboards/orthodox/keymaps/drashna/README.md index c6116177470..6c208d2c886 100644 --- a/keyboards/orthodox/keymaps/drashna/README.md +++ b/keyboards/orthodox/keymaps/drashna/README.md @@ -21,6 +21,4 @@ All layers have RGB specific indicators, so you can see what layer you're on by Orthodox Specific Code ---------------------- -Left side is designed to have RGB underglow and Faux Clicking enabled, while the right has Audio enabled. - -The make commend ensures that the correct settings are retained. +Shift, Control and Alt all light up a specific RGB LED for a certain color, based on it's status, adding a visual indicator of OSMs or regular mods are held down. diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index f8a85039423..1c3620616ce 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -59,8 +59,10 @@ along with this program. If not, see . #ifdef AUDIO_ENABLE #define C6_AUDIO +#ifdef RGBLIGHT_ENABLE #define NO_MUSIC_MODE -#endif +#endif //RGBLIGHT_ENABLE +#endif //AUDIO_ENABLE #undef PRODUCT #ifdef KEYBOARD_orthodox_rev1 @@ -69,4 +71,9 @@ along with this program. If not, see . #define PRODUCT Drashna Hacked Orthodox Rev.3 #endif +#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW +#define QMK_LED B0 +#define QMK_SPEAKER C6 + #endif diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 480540144b4..fd10faa5ee4 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -32,7 +32,6 @@ along with this program. If not, see . #define _______ KC_TRNS #define XXXXXXX KC_NO -#define MG_NKRO MAGIC_TOGGLE_NKRO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -65,23 +64,87 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = 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_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ + 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, _______, _______ ), [_RAISE] = 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_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ + 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, _______, _______ ), [_ADJUST] = LAYOUT(\ KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), + 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 ) }; +#ifdef RGBLIGHT_ENABLE +uint32_t layer_state_set_keymap (uint32_t state) { + uint8_t modifiders = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); + + + if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1< +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" + +/* 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 200 +#define TAPPING_TOGGLE 3 + +#endif diff --git a/keyboards/orthodox/keymaps/oscillope/keymap.c b/keyboards/orthodox/keymaps/oscillope/keymap.c new file mode 100644 index 00000000000..28fea02c4d4 --- /dev/null +++ b/keyboards/orthodox/keymaps/oscillope/keymap.c @@ -0,0 +1,101 @@ +/* +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 "orthodox.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 _LOWER 1 +#define _RAISE 2 +#define _NAV 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + NAV, + CC_ARRW, + CC_PRN, + CC_BRC, + CC_CBR, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define NAV_TAP LT(_NAV, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KEYMAP( \ + 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( \ + 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( \ + 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( \ + _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case CC_ARRW: + SEND_STRING("->"); + return false; + case CC_PRN: + SEND_STRING("()"SS_TAP(X_LEFT)); + return false; + case CC_BRC: + SEND_STRING("[]"SS_TAP(X_LEFT)); + return false; + case CC_CBR: + SEND_STRING("{}"SS_TAP(X_LEFT)); + return false; + } + } + return true; +} diff --git a/keyboards/orthodox/keymaps/oscillope/rules.mk b/keyboards/orthodox/keymaps/oscillope/rules.mk new file mode 100644 index 00000000000..fb77881d96d --- /dev/null +++ b/keyboards/orthodox/keymaps/oscillope/rules.mk @@ -0,0 +1,3 @@ +SUBPROJECT_rev1 = no +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/paladin64/info.json b/keyboards/paladin64/info.json new file mode 100644 index 00000000000..42c3618bb21 --- /dev/null +++ b/keyboards/paladin64/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "paladin64", + "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}] + }, + + "LAYOUT_infinity": { + "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_aek_103": { + "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.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } + } \ No newline at end of file diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c index 1ac670fa0f8..8a3f57c0bf2 100755 --- a/keyboards/paladin64/keymaps/default/keymap.c +++ b/keyboards/paladin64/keymaps/default/keymap.c @@ -1,10 +1,10 @@ -#include "paladin64.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM fn_actions[] = {}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY */ - KEYMAP( + 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_GRV, 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_BSPC, MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), /* DVORAK */ - KEYMAP( + 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_LBRC, KC_RBRC, KC_GRV, 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_EQL, KC_BSPC, MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), /* COLEMAK */ - KEYMAP( + 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_GRV, KC_BSLS, 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_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), /* FUNCTION */ - KEYMAP( + 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, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), /* AutoMouse */ - KEYMAP( + 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_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/paladin64/paladin64.h b/keyboards/paladin64/paladin64.h index 1bbf9ea5300..9666b089884 100755 --- a/keyboards/paladin64/paladin64.h +++ b/keyboards/paladin64/paladin64.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_all( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, 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, \ @@ -20,4 +20,73 @@ { K70, K71, K72, K73, K74, K75, K76, K77 } \ } +#define LAYOUT_iso( \ + 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, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, 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, K41, 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 } \ +} + +#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 } \ +} + +#define LAYOUT_infinity( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, 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, K22, \ + 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, K22, K23, K24, K25, K26, 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 } \ +} + +#define LAYOUT_aek_103( \ + 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, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, 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 } \ +} + + #endif diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index b24dc49d061..3b79256abe3 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -58,3 +58,5 @@ RGBLIGHT_ENABLE ?= yes #PS2_MOUSE_ENABLE ?= yes #PS2_USE_USART ?= yes #PS2_USE_INT ?= yes + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/pearl/info.json b/keyboards/pearl/info.json new file mode 100644 index 00000000000..5bc4e049402 --- /dev/null +++ b/keyboards/pearl/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Pearl", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "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":"{", "x":11, "y":0}, {"label":"Backspace", "x":12, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"\\", "x":11.5, "y":1, "w":1.5}, {"label":"Caps Lock", "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":"Alt", "x":1.13, "y":3}, {"label":"Ctrl", "x":2.13, "y":3, "w":1.25}, {"label":"Win", "x":3.375, "y":3, "w":1.25}, {"label":"Shift", "x":4.625, "y":3, "w":2.25}, {"x":6.875, "y":3, "w":1.25}, {"x":8.125, "y":3, "w":1.5}, {"label":"Menu", "x":9.625, "y":3}, {"label":"Fn", "x":10.63, "y":3, "w":1.25}] + }, + + "LAYOUT_splits": { + "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":"{", "x":11, "y":0}, {"label":"}", "x":12, "y":0}, {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"Enter", "x":11.5, "y":1, "w":1.5}, {"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":1, "y":3}, {"label":"Win", "x":2, "y":3, "w":1.25}, {"label":"Alt", "x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2.25}, {"label":"Alt", "x":6.75, "y":3, "w":2.75}, {"label":"Win", "x":9.5, "y":3, "w":1.25}, {"label":"Menu", "x":10.75, "y":3}] + }, + + "LAYOUT_spacebar": { + "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":"{", "x":11, "y":0}, {"label":"}", "x":12, "y":0}, {"label":"Caps Lock", "x":0, "y":1, "w":1.5}, {"label":"A", "x":1.5, "y":1}, {"label":"S", "x":2.5, "y":1}, {"label":"D", "x":3.5, "y":1}, {"label":"F", "x":4.5, "y":1}, {"label":"G", "x":5.5, "y":1}, {"label":"H", "x":6.5, "y":1}, {"label":"J", "x":7.5, "y":1}, {"label":"K", "x":8.5, "y":1}, {"label":"L", "x":9.5, "y":1}, {"label":":", "x":10.5, "y":1}, {"label":"Enter", "x":11.5, "y":1, "w":1.5}, {"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":1, "y":3}, {"label":"Win", "x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":6.25}, {"label":"Win", "x":9.5, "y":3, "w":1.25}, {"label":"Menu", "x":10.75, "y":3}] + } + + } +} diff --git a/keyboards/pearl/keymaps/cijanzen/README.md b/keyboards/pearl/keymaps/cijanzen/README.md new file mode 100644 index 00000000000..745442955fa --- /dev/null +++ b/keyboards/pearl/keymaps/cijanzen/README.md @@ -0,0 +1,29 @@ +# cijanzen's Pearl 40% + +## Layout + +The firmware offers five layers: + +1. Base layer +2. Numbers and arrows (Fn1) +3. F-row and navigation (Fn2) +4. Media and RGB controls (Fn3) +5. Utils (Fn2+Fn3) + +A few specifics worth mentioning: +- Autoshift has been enabled to allow for easier access of shifted keys +- Tab will operate as tab key on tap and fn layer on hold +- Indicator LEDs indicate the current layer + + +![cijanzen's Pearl 40% layout](https://raw.githubusercontent.com/christopherjanzen/qmk_firmware/bab090ee24866e6c38892ffc5ffa53813aec3832/keyboards/pearl/keymaps/cijanzen/pearl-cijanzen-keymap.jpg) + +Base for this firmware copied from jetpacktuxedo's and rask's QMK firmware + +--- + +## Compiling and flashing + +To compile and flash the HEX follow the [Pearl 40% instructions](https://gist.github.com/clee/a43f198a70de0e6dae22d7638b41440a). + +You might need to check the comments at the bottom of the gist as well. diff --git a/keyboards/pearl/keymaps/cijanzen/config.h b/keyboards/pearl/keymaps/cijanzen/config.h new file mode 100644 index 00000000000..b34fdad90a0 --- /dev/null +++ b/keyboards/pearl/keymaps/cijanzen/config.h @@ -0,0 +1,27 @@ +/* +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 CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 3 + + +#endif diff --git a/keyboards/pearl/keymaps/cijanzen/keymap.c b/keyboards/pearl/keymaps/cijanzen/keymap.c new file mode 100644 index 00000000000..896e157fd63 --- /dev/null +++ b/keyboards/pearl/keymaps/cijanzen/keymap.c @@ -0,0 +1,77 @@ +#include QMK_KEYBOARD_H + +#define ____ KC_TRNS +// Tab on tap or Function layer 1 on hold +#define FN_TAB LT(1, KC_TAB) +#define KC_SLP KC_SYSTEM_SLEEP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // BASE LAYER + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + FN_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, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_BSPC, KC_SPC, MO(3), MO(1) + ), + // BASE LAYER TWO (Fn1) + [1] = 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_UP, KC_QUOT, KC_BSLS, + ____, ____, ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_RGHT, KC_RSFT, + ____, ____, ____, KC_DEL, KC_DEL, ____, KC_RGUI, ____ + ), + // FROW LAYER AND ARROWS (Fn2) + [2] = 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_PGUP, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, KC_HOME, KC_PGDN, KC_END, ____, + MO(4), ____, ____, ____, ____, ____, ____, ____ + ), + // MEDIA AND RGB (Fn3) + [3] = LAYOUT_all( + ____, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, + ____, ____, ____, RGB_HUI, RGB_SAI, RGB_VAI, ____, ____, ____, ____, ____, ____, + ____, RGB_MOD, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_TOGG, BL_STEP, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____ + ), + // UTIL (Fn1+Fn3) + [4] = LAYOUT_all( + KC_SLP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PSCR, RESET, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____ + ), +}; + +/** + * Status LED layer indicators courtesy of jetpacktuxedo's firmware + */ +uint32_t layer_state_set_kb(uint32_t state) +{ + if (state & (1<<1)) { // if we are on layer 1 + PORTD |= (1 << PD0); // light num lock led + } else if (state & (1<<2)) { // if we are on layer 2 + + if (state & (1<<4)) { + PORTD |= (1 << PD0); // light all indicator leds + PORTD |= (1 << PD1); + PORTD |= (1 << PD6); + } else { + PORTD &= ~(1 << PD0); + PORTD |= (1 << PD1); // light caps lock led + PORTD &= ~(1 << PD6); + } + } else if (state & (1<<3)) { // if we are on layer 3 + PORTD |= (1 << PD6); // light scroll lock led + } else if (state & (1<<4)) { // if we are stuck on layer 4 + PORTD |= (1 << PD0); // light all indicator leds + PORTD |= (1 << PD1); + PORTD |= (1 << PD6); + } else { + PORTD &= ~(1 << PD0); + PORTD &= ~(1 << PD1); + PORTD &= ~(1 << PD6); + } + + return state; +} diff --git a/keyboards/pearl/keymaps/cijanzen/pearl-cijanzen-keymap.jpg b/keyboards/pearl/keymaps/cijanzen/pearl-cijanzen-keymap.jpg new file mode 100644 index 00000000000..60e5c474640 Binary files /dev/null and b/keyboards/pearl/keymaps/cijanzen/pearl-cijanzen-keymap.jpg differ diff --git a/keyboards/pearl/keymaps/cijanzen/rules.mk b/keyboards/pearl/keymaps/cijanzen/rules.mk new file mode 100644 index 00000000000..863b9419ad6 --- /dev/null +++ b/keyboards/pearl/keymaps/cijanzen/rules.mk @@ -0,0 +1,11 @@ +# 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 +# TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes diff --git a/keyboards/pearl/keymaps/default/keymap.c b/keyboards/pearl/keymaps/default/keymap.c index 5efb6499b57..bffa9b14f15 100644 --- a/keyboards/pearl/keymaps/default/keymap.c +++ b/keyboards/pearl/keymaps/default/keymap.c @@ -15,16 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "pearl.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT_all( KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, 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, MT(MOD_LSFT, KC_CAPS), 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_LSFT, KC_SPC, KC_SPC, KC_APP, MO(1) ), - [1] = KEYMAP( + [1] = 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_EQL, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_QUOT, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, diff --git a/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c b/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c index d8e96f1a04e..b94fb673ff8 100644 --- a/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c @@ -1,25 +1,25 @@ -#include "pearl.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT_all( KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2,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_BSPC, KC_NO, LT(1, KC_SPC), MO(3), KC_RALT ), - [1] = KEYMAP( + [1] = 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, KC_TRNS, KC_TRNS, RGB_TOG, RGB_SMOD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = KEYMAP( + [2] = LAYOUT_all( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_TRNS, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_DQUO, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = KEYMAP( + [3] = LAYOUT_all( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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, BL_TOGG, KC_TRNS, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/pearl/keymaps/phil/keymap.c b/keyboards/pearl/keymaps/phil/keymap.c index a28fecd2621..56326d423fb 100755 --- a/keyboards/pearl/keymaps/phil/keymap.c +++ b/keyboards/pearl/keymaps/phil/keymap.c @@ -23,40 +23,40 @@ along with this program. If not, see . #define _FN2 4 #define LIGHT 5 -#include "pearl.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [COLEMAK] = KEYMAP( + [COLEMAK] = LAYOUT_all( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_NO, KC_BSPC, LGUI_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, LSFT_T(KC_DEL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_NO, LT(_FN2, KC_SPC), TG(QWERTY), TG(WIN) ), - [QWERTY] = KEYMAP( + [QWERTY] = LAYOUT_all( KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, KC_TRNS, KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS ), - [WIN] = KEYMAP( + [WIN] = 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_NO, KC_TRNS, LCTL_T(KC_ESC), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LGUI, KC_LALT, KC_LCTL, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS ), - [_FN1] = KEYMAP( + [_FN1] = LAYOUT_all( KC_GRV, KC_MNXT, KC_NO, KC_PIPE, KC_PLUS, KC_LBRC, KC_RBRC, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_TRNS, KC_TRNS, KC_MPLY, KC_SPC, KC_UNDS, KC_EQUAL, KC_LPRN, KC_RPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDOWN, KC_TRNS, KC_TRNS, KC_MPRV, KC_NO, KC_BSLS, KC_MINUS, KC_LCBR, KC_RCBR, KC_NO, KC_MUTE, KC_VOLU, KC_VOLD, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS ), - [_FN2] = KEYMAP( + [_FN2] = LAYOUT_all( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_NO, KC_TRNS, 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_CAPS, TG(LIGHT), KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS ), - [LIGHT] = KEYMAP( + [LIGHT] = LAYOUT_all( RESET, KC_NO, BL_ON, BL_INC, BL_BRTG, RGB_M_P, RGB_M_B, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_STEP, KC_NO, RGB_M_SN, RGB_M_K, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, BL_OFF, BL_DEC, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_M_SW, RGB_M_R, RGB_M_G, KC_NO, @@ -85,4 +85,4 @@ uint32_t layer_state_set_kb(uint32_t state) { PORTD |= (1 << PD6); } return state; -} \ No newline at end of file +} diff --git a/keyboards/pearl/keymaps/rask/keymap.c b/keyboards/pearl/keymaps/rask/keymap.c index b9f1350939b..bafb2b97387 100644 --- a/keyboards/pearl/keymaps/rask/keymap.c +++ b/keyboards/pearl/keymaps/rask/keymap.c @@ -1,38 +1,38 @@ -#include "pearl.h" +#include QMK_KEYBOARD_H #define ____ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // BASE LAYER - [0] = KEYMAP( + [0] = LAYOUT_all( 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, MO(2), 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, MO(3), KC_LCTL, KC_LALT, KC_BSPC, MO(1), MO(1), KC_SPC, KC_RALT, KC_LGUI ), // BASE LAYER TWO (Fn1) - [1] = KEYMAP( + [1] = 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_QUOT, KC_BSLS, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_RSFT, ____, ____, ____, ____, ____, ____, ____, ____ ), // FROW LAYER AND ARROWS (Fn2) - [2] = KEYMAP( + [2] = 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_UP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN,KC_RGHT, MO(4), ____, ____, ____, ____, ____, ____, ____, ____ ), // MEDIA AND RGB (Fn3) - [3] = KEYMAP( + [3] = LAYOUT_all( ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_MPRV,KC_MPLY, KC_MNXT, KC_DEL, ____, ____, ____, RGB_HUI, RGB_SAI,RGB_VAI,____, ____, ____, ____, ____, ____, ____, RGB_MOD, RGB_TOG, RGB_HUD, RGB_SAD,RGB_VAD,____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), // UTIL (Fn1+Fn3) - [4] = KEYMAP( + [4] = LAYOUT_all( ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PSCR, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP,____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_HOME, KC_PGDN,KC_END, ____, diff --git a/keyboards/pearl/pearl.h b/keyboards/pearl/pearl.h index 4ead4cedf91..900d4817a2f 100644 --- a/keyboards/pearl/pearl.h +++ b/keyboards/pearl/pearl.h @@ -21,7 +21,7 @@ along with this program. If not, see . #include "quantum.h" #include "pearl.h" -#define KEYMAP( \ +#define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ @@ -33,4 +33,29 @@ along with this program. If not, see . { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, KC_NO, K39, K3A, KC_NO, KC_NO}, \ } +#define LAYOUT_splits( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C,\ + 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, K34, K37, K39, K3A\ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO}, \ + { K30, K31, K32, KC_NO, K34, KC_NO, KC_NO, K37, KC_NO, K39, K3A, KC_NO, KC_NO}, \ +} + +#define LAYOUT_spacebar( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C,\ + 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, K35, K39, K3A\ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO}, \ + { K30, K31, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, KC_NO, K39, K3A, KC_NO, KC_NO}, \ +} + + #endif diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/keyboards/planck/keymaps/ajp10304/keymap.c index 02ba8fff766..10c0307330a 100644 --- a/keyboards/planck/keymaps/ajp10304/keymap.c +++ b/keyboards/planck/keymaps/ajp10304/keymap.c @@ -14,6 +14,8 @@ enum planck_layers { _MRSE, _FUNC, _MFNC, + _FUNC2, + _MFNC2, _ADJUST, _MOUSE }; @@ -23,6 +25,8 @@ enum planck_keycodes { MAC, FUNC, MFNC, + FUNC2, + MFNC2, LOWER, MLWR, RAISE, @@ -47,14 +51,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | + * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {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 }, - {MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC) } + {MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) } }, /* Function @@ -117,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | STOP | STOP | Prev | Vol- | Next | | | + * | PC/MC| | | | | STOP | STOP | Prev | Vol- | Next | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -147,32 +151,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, -[_MAC]= { +/* Function 2 (Right hand side) + * ,-----------------------------------------------------------------------------------. + * | | |WRDSEL| | | | LNDEL| | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | LNSEL| DUP | | | | |LNJOIN| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | UNDO | CUT | COPY | PASTE| | | | | | | MODE | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC2] = { + {_______, _______, 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] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, _______} + {MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 } }, [_MLWR] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, [_MRSE] = { - {_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_EQL) }, - {_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } + {_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) }, + {_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } }, [_MFNC]= { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) }, - {_______, KC_GRAVE, KC_NONUS_BSLASH, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } +}, + +[_MFNC2] = { + {_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______}, + {_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______}, + {_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, }, }; @@ -243,6 +272,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_MFNC); } return false; + case MFNC2: + if (record->event.pressed) { + layer_on(_FUNC2); + layer_on(_MFNC2); + } else { + layer_off(_FUNC2); + layer_off(_MFNC2); + } + return false; } return true; } @@ -262,6 +300,48 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t op case 2: // Word Select Mac SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); return false; + + case 3: // Line Select + SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); + return false; + + case 4: // Line Select Mac + SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); + return false; + + case 5: // Line Delete + SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); + SEND_STRING(SS_TAP(X_BSPACE)); + return false; + + case 6: // Line Delete Mac + SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); + SEND_STRING(SS_TAP(X_BSPACE)); + return false; + + case 7: // Duplicate Selection + SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); + return false; + + case 8: // Duplicate Selection Mac + SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); + return false; + + case 9: // Join line + SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); + return false; + + case 10: // Join line Mac + SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); + return false; + + case 98: // Print mode + SEND_STRING("PC"); + return false; + + case 99: // Print mode + SEND_STRING("OSX"); + return false; } } return MACRO_NONE; diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md index 3f92d76383a..8bf49028585 100644 --- a/keyboards/planck/keymaps/ajp10304/readme.md +++ b/keyboards/planck/keymaps/ajp10304/readme.md @@ -17,7 +17,7 @@ the second is the output when shift is applied. | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | -| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | ##### Function Layer Activated when `fn` held in the above `qwerty` layer. @@ -27,7 +27,7 @@ Activated when `fn` held in the above `qwerty` layer. | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| | Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | -| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | ##### Lower Layer Activated when `Lower` is held in the above `qwerty` layer. @@ -65,25 +65,40 @@ Activated when `Lower` and `Raise` are held together in the above `qwerty` layer * ????: Runs a macro for outputting a text string. Do not use this store passwords. * Reset: Enter bootloader for flashing firmware to the keyboard. * CAPS: Toggle caps lock. +* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. * MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, -MRSE with RAISE and MFNC with FUNC respectively. -* REC1, REC2: Start recording macro. -* PLAY1, PLAY2: Playback macro. -* STOP1, STOP2: Stop recording macro. +MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | -| CAPS | | | | | PLAY1| PLAY | Mute | Vol+ | Play | | | -| MAC | | | | | STOP | STOP | Prev | Vol- | Next | | | +| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | +| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | +| | | | | | | | | DYN | | | | + +##### Function 2 Layer +Activated when `fn` held in the above `qwerty` layer. +* WRDSEL: Select the word where the cursor is. +* LNDEL: Delete the line where the cursor is. +* LNSEL: Select the line where the cursor is. +* DUP: Duplicate the selected text. +* LNJOIN: Join the line where the cursor is with the following line. +* MODE: Print either `PC` or `OSX` depending on what layer mode is active. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | |WRDSEL| | | | LNDEL| | | | | | +| | | LNSEL| DUP | | | | |LNJOIN| | | | +| | UNDO | CUT | COPY | PASTE| | | | | | | MODE | | | | | | | | | | | | | | - -##### Mouse -Activated when `fn` and `Raise` are held together. -| | | | | | | | | | | | | -| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| -| | | | | | | | | | | | | -| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | -| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | | -| | | | | | | | | | | | | +##### Mouse Layer +Activated when `fn` and `raise` held together. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ESC | | | | | | | | | | | | +| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | +| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | +| | | | | | | | | | | | | diff --git a/keyboards/planck/keymaps/altgr/beakl.h b/keyboards/planck/keymaps/altgr/beakl.h new file mode 100644 index 00000000000..a684a6c43db --- /dev/null +++ b/keyboards/planck/keymaps/altgr/beakl.h @@ -0,0 +1,612 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................... BEAKL EZ +#ifdef BEAKLEZ + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | ; | , | J | . | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V }, + {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W }, + {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | : | ~ | J | ` | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | : | / | J | ? | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ..................................................................... BEAKL 8 +#ifdef BEAKL8 + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ~ | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL 8P +#ifdef BEAKL8P + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | < | > | ~ | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| \ | $ | * | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ................................................................... BEAKL 8TX +#ifdef BEAKL8TX + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, + {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | ! | = | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | $ | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | " | I | / | Caps |^Shift| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, + {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ................................................................... BEAKL 8TT +#ifdef BEAKL8TT + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | Fn | Caps | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | ; | " | I | , | Num | Regex| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, + {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ |Cursor| Mouse| C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | ! | = | ` | Num | Regex| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, + {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL 10 +#ifdef BEAKL10 + // ,-----------------------------------------------------------------------------------. + // | Q | H | O | U | X | ^Alt | ^GUI | G | D | N | M | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | I | E | A | . | ↑Alt | ↑GUI | C | S | R | T | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | , | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V }, + {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, + {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | < | = | > | ~ | ↑Alt | ↑GUI | C | S | R | T | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | ` | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, + {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, + {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | I | E | A | ? | ↑Alt | ↑GUI | C | ( | * | ) | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | / | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)}, + {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ............................................................... BEAKL Mash Up +#ifdef BEAKL810 + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | < | > | ~ | ↑Alt | ↑GUI | C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Caps |^Shift| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| \ | $ | * | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL MU +#ifdef BEAKLMU + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL SP +#ifdef BEAKLSP + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | ^ | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL GR +#ifdef BEAKLGR + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | ^ | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {SM_K, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W }, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#endif diff --git a/keyboards/planck/keymaps/altgr/colemak.h b/keyboards/planck/keymaps/altgr/colemak.h new file mode 100644 index 00000000000..8810ba82a5b --- /dev/null +++ b/keyboards/planck/keymaps/altgr/colemak.h @@ -0,0 +1,124 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .............................................................. Colemak Mod-DH +#ifdef COLEMAK + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | ; | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, + {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O }, + {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ..................................................................... ColemaX +#ifdef COLEMAX + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | ; | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, + {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O }, + {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif diff --git a/keyboards/planck/keymaps/altgr/common/chord_layout.h b/keyboards/planck/keymaps/altgr/common/chord_layout.h new file mode 100644 index 00000000000..2c785d56ca7 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/chord_layout.h @@ -0,0 +1,41 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. Short Cuts + + // .-----------------------------------------------------------------------------------. + // | | | Copy | Paste| | | | | | | | | + // |--------------------------------------------------------------+------+------+------| + // | Undo | Cut | Copy | Paste| | | | | PRIV | PUB | | | + // |-----------------------------------------------------------------------------------| + // | | | Nak | Eot | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | | f() | | | | | | + // | | | | | | | | f() | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_EDIT] = { + {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, + {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, + {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, + }, + +// ................................................................ Adjust Layer + + // ,-----------------------------------------------------------------------------------. + // |Plover| | | | | | | | | | | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // |Aud on| | | | | | | | | | | | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Reset| | | | | | | | | | | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | | | | | f() | | | | + // `-----------------------------------------------------------------------------------' + + [_ADJUST] = { + {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/altgr/common/init.h b/keyboards/planck/keymaps/altgr/common/init.h new file mode 100644 index 00000000000..6366a19f65e --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/init.h @@ -0,0 +1,56 @@ + +// ....................................................................... Audio + +void matrix_init_user(void) +{ +#ifdef STENO_ENABLE + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI +#endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} + +#ifdef AUDIO_ENABLE +#ifdef BACKLIGHT_ENABLE +void led_set_user(uint8_t usb_led) +{ + static uint8_t old_usb_led = 0; + _delay_ms(10); // gets rid of tick + if (!is_playing_notes()) { + if ((usb_led & (1<event.pressed) { + key_timer = timer_read(); + register_code(modifier); + if (modifier2) { + register_code(modifier2); + } + } + else { + unregister_code(modifier); + if (modifier2) { + unregister_code(modifier2); + } + if (timer_elapsed(key_timer) < TAPPING_TERM) { + shift_key(keycode); + } + key_timer = 0; + } +} + +// ................................................................... Mod Masks + +// tap dance persistant mods, see process_record_user() +// keyboard_report->mods (?) appears to be cleared by tap dance +static uint8_t mods = 0; + +void tap_mods(keyrecord_t *record, uint16_t keycode) +{ + if (record->event.pressed) { + mods |= MOD_BIT(keycode); + } + else { + mods &= ~(MOD_BIT(keycode)); + } +} + +// (un)register modifiers +void modifier(void (*f)(uint8_t)) +{ + if (mods & MOD_BIT(KC_LCTL)) { + (*f)(KC_LCTL); + } + if (mods & MOD_BIT(KC_LGUI)) { + (*f)(KC_LGUI); + } + if (mods & MOD_BIT(KC_LALT)) { + (*f)(KC_LALT); + } +} + +// .................................................... Triple Dance Shift/Layer + +static uint8_t dt_shift = 0; + +void double_shift(uint16_t keycode, uint8_t layer) +{ + tap_key (keycode); + if (DT_SHIFT) { + // set_oneshot_mods(MOD_LSFT); + // layer_on(layer); + layer_on (_SHIFT); + set_oneshot_layer(_SHIFT, ONESHOT_START); + dt_shift = 1; + } + else { + layer_on(layer); + } +} + +// tap dance LT (LAYER, KEY) emulation with -> and auto-repeat extensions! +void tap_shift(qk_tap_dance_state_t *state, uint16_t keycode, uint8_t layer) +{ + // double tap plus down + if (state->count > 2) { + // double enter shift + if (keycode == KC_ENT) { + tap_key (keycode); + double_shift(keycode, layer); + } + // repeating keycode + else { + register_code(keycode); + } + } + // tap plus down (or double tap): keycode (one shot) shift + else if (state->count > 1) { + double_shift(keycode, layer); + } + // down: shift + else if (state->pressed) { + layer_on(layer); + } + // tap: keycode + else { + modifier(register_code); + tap_key (keycode); + modifier(unregister_code); + } +} + +void tap_reset(uint16_t keycode, uint8_t layer) +{ + unregister_code(keycode); + if (DT_SHIFT && dt_shift) { + clear_oneshot_layer_state(ONESHOT_PRESSED); + dt_shift = 0; + } + else { + layer_off(layer); + } +} + +// augment pseudo LT (_RSHIFT, KC_ENT) handling below for rapid sequences +void enter(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_ENT, _RSHIFT); +} + +void enter_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_ENT, _RSHIFT); +} + +// augment pseudo LT (_LSHIFT, KC_SPC) handling below for rapid sequences +void space(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_SPC, _LSHIFT); +} + +void space_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_SPC, _LSHIFT); +} + +// ......................................................... Triple Dance Insert + +void double_max(uint8_t count, uint8_t shift, uint16_t keycode) +{ + if (shift) { + shift_key(keycode); + if (count > 1) { + shift_key(keycode); + } + } + else { + tap_key(keycode); + if (count > 1) { + tap_key(keycode); + } + } +} + +void colon(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_SCLN); + shift_key(KC_SCLN); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_SCLN); + } + reset_tap_dance(state); +} + +void eql(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key(KC_SPC); + tap_key(KC_SLSH); + tap_key(KC_EQL); + tap_key(KC_SPC); + } + else { + double_max(state->count, NOSHIFT, KC_EQL); + } + reset_tap_dance(state); +} + +void greater(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + tap_key (KC_MINS); + shift_key(KC_DOT); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_DOT); + } + reset_tap_dance(state); +} + +void lesser(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_COMM); + tap_key (KC_MINS); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_COMM); + } + reset_tap_dance(state); +} + +void tilde(qk_tap_dance_state_t *state, void *user_data) +{ + // double tap plus down: repeating keycode + if (state->count > 2) { + register_code(KC_LSFT); + register_code(KC_GRV); + } + // tap: keycode + else { + shift_key(KC_GRV); + // double tap: unix home directory + if (state->count > 1) { + tap_key(KC_SLSH); + } + } +} + +void tilde_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_GRV); + unregister_code(KC_LSFT); +} + +// ............................................................. Tap Dance Pairs + +// tap dance shift rules +#define S_NEVER 0 +#define S_SINGLE 1 +#define S_DOUBLE 2 +#define S_ALWAYS S_SINGLE | S_DOUBLE + +void symbol_pair(uint8_t shift, uint16_t left, uint16_t right) +{ + if (shift & S_DOUBLE) { + shift_key(left); + shift_key(right); + } + else { + tap_key(left); + tap_key(right); + } +} + +#define CLOSE 1 + +// tap dance symbol pairs +void tap_pair(qk_tap_dance_state_t *state, uint8_t shift, uint16_t left, uint16_t right, uint16_t modifier, uint8_t close) +{ + // triple tap: left right with cursor between symbol pair a la vim :-) + if (state->count > 2) { + symbol_pair(shift, left, right); + tap_key (KC_LEFT); + } + // double tap: left right + else if (state->count > 1) { + symbol_pair(shift, left, right); + } + // down: modifier + else if (state->pressed) { + if (modifier) { + register_code(modifier); + } + } + // tap: left (close: right) + else { + if (shift & S_SINGLE) { + shift_key(close ? right : left); + } + else { + tap_key(close ? right : left); + } + } + if (!modifier) { + reset_tap_dance(state); + } +} + +void doublequote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_QUOT, KC_QUOT, 0, 0); +} + +void grave(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_GRV, KC_GRV, 0, 0); +} + +void lbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, 0); +} + +void lcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, 0); +} + +void lparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, KC_LCTL, 0); +} + +void lparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +void quote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_QUOT, KC_QUOT, 0, 0); +} + +void rangle(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_COMM, KC_DOT, 0, CLOSE); +} + +void rbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, 0, CLOSE); +} + +void rparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +// ............................................................ Tap Dance Insert + +void comma(qk_tap_dance_state_t *state, void *user_data) +{ + tap_key(KC_COMM); + if (state->count > 1) { + tap_key(KC_SPC); + } + reset_tap_dance(state); +} + +void dot(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + shift_key(KC_COLN); + } + else { + tap_key(KC_DOT); + } + reset_tap_dance(state); +} + +// compile time macro string, see functions/hardware planck script +void private(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { +#ifdef PRIVATE_STRING +#include "private_string.h" +#endif + } + reset_tap_dance(state); +} + +// config.h defined string +void send(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + SEND_STRING(PUBLIC_STRING); + } + reset_tap_dance(state); +} + +// .......................................................... Tap Dance One Shot + +void caps(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + tap_key(KC_CAPS); + } + else { + set_oneshot_mods(MOD_LSFT); + register_code (KC_LSFT); // on hold down + } +} + +void caps_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LSFT); +} + +// ................................................................... Tap Dance + +qk_tap_dance_action_t tap_dance_actions[] = { + [_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, caps_reset) + ,[_COLN] = ACTION_TAP_DANCE_FN (colon) + ,[_COMM] = ACTION_TAP_DANCE_FN (comma) + ,[_DOT] = ACTION_TAP_DANCE_FN (dot) + ,[_DQOT] = ACTION_TAP_DANCE_FN (doublequote) + ,[_ENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, enter, enter_reset) + ,[_EQL] = ACTION_TAP_DANCE_FN (eql) + ,[_GRV] = ACTION_TAP_DANCE_FN (grave) + ,[_GT] = ACTION_TAP_DANCE_FN (greater) + ,[_LBRC] = ACTION_TAP_DANCE_FN (lbrace) + ,[_LCBR] = ACTION_TAP_DANCE_FN (lcurly) + ,[_LPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lparen, lparen_reset) + ,[_LT] = ACTION_TAP_DANCE_FN (lesser) + ,[_PRIV] = ACTION_TAP_DANCE_FN (private) + ,[_QUOT] = ACTION_TAP_DANCE_FN (quote) + ,[_RBRC] = ACTION_TAP_DANCE_FN (rbrace) + ,[_RCBR] = ACTION_TAP_DANCE_FN (rcurly) + ,[_RNGL] = ACTION_TAP_DANCE_FN (rangle) + ,[_RPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rparen, rparen_reset) + ,[_SEND] = ACTION_TAP_DANCE_FN (send) + ,[_SPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, space, space_reset) + ,[_TILD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tilde, tilde_reset) +}; + +// .............................................................. Dynamic Layers + +#define LEFT 1 +#define RIGHT 2 +static uint8_t thumb = 0; + +// LEFT (KC_SPC, S(KC_BSLS)), RIGHT (KC_LEFT, S(KC_LEFT)) opposite thumb combinations, see process_record_user() +// up, up -> _BASE +// up, down -> _SYMBOL +// down, up -> _NUMBER +// down, down -> _MOUSE // see layer keycodes that raise mouse layer +#define THUMBS_DOWN _MOUSE // layer + +static uint8_t overlayer = 0; + +// left right thumb layer combinations +void thumb_layer(keyrecord_t *record, uint8_t side, uint8_t shift, uint16_t keycode, uint8_t thumb_dn_layer, uint8_t thumb_up_layer) +{ + if (record->event.pressed) { + // layer_on via tap_layer(), see process_record_user() + key_timer = timer_read(); + thumb = thumb | side; + } + else { + layer_off(thumb_dn_layer); + // opposite thumb_layer() thumb may have switched effective layer! + if (overlayer) { + layer_off(overlayer); + overlayer = 0; + } + if (!key_press(shift, keycode)) { + layer_off(THUMBS_DOWN); // both thumbs needed + // opposite thumb down? see left right combination layer table above + if (thumb & (side == LEFT ? RIGHT : LEFT)) { + layer_on(thumb_up_layer); + overlayer = thumb_up_layer; + } + } + clear_mods(); + thumb = thumb & ~side; + key_timer = 0; + } +} + +// #ifdef STENO_ENABLE +// // LT for steno keycode +// void stn_layer(keyrecord_t *record, uint16_t keycode, uint8_t layer) +// { +// if (record->event.pressed) { +// key_timer = timer_read(); +// if (keycode) { +// process_steno(keycode, record); +// } +// layer_on(layer); +// } +// else { +// layer_off(layer); +// if (keycode) { +// if (timer_elapsed(key_timer) < TAPPING_TERM) { +// process_steno(keycode, record); +// } +// else { +// // clear pressed state (request push of updated) process_steno.c and .h +// // steno_clear_state(); +// } +// } +// key_timer = 0; +// } +// } +// #endif + +// LT for S(keycode) +void lt_shift(keyrecord_t *record, uint16_t keycode, uint8_t layer) +{ + if (record->event.pressed) { + key_timer = timer_read(); + layer_on(layer); + } + else { + layer_off(layer); + // for shifted keycodes, hence, LT_SHIFT + key_press(SHIFT, keycode); + clear_mods(); + key_timer = 0; + } +} + +// set layer asap to overcome macro latency errors, notably tap dance and LT usage +// this routine inexplicably (?) sets layer_on() faster than can be done in thumb_layer() +void tap_layer(keyrecord_t *record, uint8_t layer) +{ + if (record->event.pressed) { + layer_on(layer); + } + else { + layer_off(layer); + } +} + +// ..................................................................... Keymaps + +// void persistant_default_layer_set(uint16_t default_layer) +// { +// eeconfig_update_default_layer(default_layer); +// default_layer_set (default_layer); +// } + +void clear_layers(void) +{ + uint8_t layer; + for (layer = 0; layer < _END_LAYERS; layer++) { + layer_off(layer); + } +} + +#ifdef CENTER_TT +static uint16_t tt_keycode = 0; // current TT keycode + +void clear_tt(void) +{ + if (tt_keycode == KC_CAPS) { + tap_key(KC_CAPS); // clear capslock + } + tt_keycode = 0; + clear_layers(); + set_single_persistent_default_layer(_BASE); +} +#endif + +// txbolt plover run state +static uint8_t plover = 0; + +void toggle_plover(uint8_t state) +{ + if (plover != state) { +#ifdef PLOVER_KEYBIND +#include "plover_keybind.h" +#endif + plover = state; + } +} + +void base_layer(void) +{ +#ifdef AUDIO_ENABLE + if (plover) { + PLAY_SONG(song_plover_gb); + } + else { + PLAY_SONG(song_qwerty); + } +#endif + clear_layers(); + set_single_persistent_default_layer(_BASE); + toggle_plover(0); +} + +void steno(keyrecord_t *record) +{ + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_plover); +#endif + clear_layers(); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + if (!plover) { + toggle_plover(1); + } + } +} + +void steno_exit(keyrecord_t *record) +{ + if (record->event.pressed) { + base_layer(); + toggle_plover(0); + } +} diff --git a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h new file mode 100644 index 00000000000..528020e7417 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h @@ -0,0 +1,86 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer +#ifdef SHIFT_SYMBOLS + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, +#else + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | X | G | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | f() | | 0 | = | | + // | | f() | | = | 0 | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | { | & | ? | : | } | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | ( | $ | % | ^ | ) | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | [ | < | ~ | > | ] | + // |-----------------------------------------------------------------------------------| + // | | f() | | \ | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMSYM] = { + {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR}, + {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN}, + {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC}, + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___}, + }, +#endif + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | | | f() | | + | | | | | + // | | | | | f() | | | + | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_FNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.save.h b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.save.h new file mode 100644 index 00000000000..7022863724e --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.save.h @@ -0,0 +1,86 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer +#ifdef SHIFT_SYMBOLS + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | Ctrl | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, +#else + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | Ctrl | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | X | G | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | { | & | ? | : | } | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | ( | $ | % | ^ | ) | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | [ | < | ~ | > | ] | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | \ | | | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMSYM] = { + {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR}, + {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN}, + {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC}, + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___}, + }, +#endif + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | | | f() | | + | | | | | + // | | | | | f() | | | + | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_FNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/altgr/common/plover_keybind.h b/keyboards/planck/keymaps/altgr/common/plover_keybind.h new file mode 100644 index 00000000000..cb4ef92ef84 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/plover_keybind.h @@ -0,0 +1,9 @@ + +// simple window manager specific plover keybind hook + +// toggle plover application, see herbstluftwm/config/appbinds +register_code (KC_LGUI); +register_code (KC_LCTL); +tap_key (KC_EQL); +unregister_code(KC_LCTL); +unregister_code(KC_LGUI); diff --git a/keyboards/planck/keymaps/altgr/common/sounds.h b/keyboards/planck/keymaps/altgr/common/sounds.h new file mode 100644 index 00000000000..1bfc7a6da0c --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/sounds.h @@ -0,0 +1,14 @@ + +// ................................................................ Audio Sounds + +#ifdef AUDIO_ENABLE +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_colemak [][2] = SONG(COLEMAK_SOUND); +float song_qwerty [][2] = SONG(QWERTY_SOUND); +float song_plover [][2] = SONG(PLOVER_SOUND); +float song_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float song_caps_on [][2] = SONG(CAPS_LOCK_ON_SOUND); +float song_caps_off [][2] = SONG(CAPS_LOCK_OFF_SOUND); +float music_scale [][2] = SONG(MUSIC_SCALE_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +#endif diff --git a/keyboards/planck/keymaps/altgr/common/steno_layout.h b/keyboards/planck/keymaps/altgr/common/steno_layout.h new file mode 100644 index 00000000000..ab4a6fe011c --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/steno_layout.h @@ -0,0 +1,39 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Plover +#ifdef STENO_ENABLE + // ,-----------------------------------------------------------------------------------. + // | # | # | # | # | # | # | # | # | # | # | # | # | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, + }, +#else + // ,-----------------------------------------------------------------------------------. + // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_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 }, + {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, + }, +#endif diff --git a/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h new file mode 100644 index 00000000000..79861087075 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h @@ -0,0 +1,75 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ..................................................... Symbol Navigation Layer +#ifdef SHIFT_SYMBOLS + // .-----------------------------------------------------------------------------------. + // | | ~ | * | & | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | ^ | % | $ | | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | # | @ | ! | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | |Adjust| \ | | f() | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, +#else + // .-----------------------------------------------------------------------------------. + // | { | . | * | & | } | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | ( | ^ | % | $ | ) | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | [ | # | @ | ! | ] | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | \ | | f() | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN}, + {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, + + // .-----------------------------------------------------------------------------------. + // | | ? | + | ~ | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | < | = | > | | | | | f() | | | | + // |-----------------------------------------------------------------------------------| + // | | 3 | 2 | 1 | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | f() | | + // '-----------------------------------------------------------------------------------' + + [_SYMREG] = { + {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___}, + {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___}, + {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, +#endif + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | f() | | f() | | + // '-----------------------------------------------------------------------------------' + + [_MOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/altgr/common/tapdance.h b/keyboards/planck/keymaps/altgr/common/tapdance.h new file mode 100644 index 00000000000..d778286bf1e --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/tapdance.h @@ -0,0 +1,49 @@ + +// tap dance keys +enum tap_dance { + _CAPS = 0 + ,_COLN + ,_COMM + ,_DOT + ,_DQOT + ,_ENT + ,_EQL + ,_GRV + ,_GT + ,_LBRC + ,_LCBR + ,_LPRN + ,_LT + ,_PRIV + ,_QUOT + ,_RBRC + ,_RCBR + ,_RNGL + ,_RPRN + ,_SEND + ,_SPC + ,_TILD +}; + +#define TD_CAPS TD(_CAPS) +#define TD_COLN TD(_COLN) +#define TD_COMM TD(_COMM) +#define TD_DOT TD(_DOT) +#define TD_DQOT TD(_DQOT) +#define TD_ENT TD(_ENT) +#define TD_EQL TD(_EQL) +#define TD_GRV TD(_GRV) +#define TD_GT TD(_GT) +#define TD_LBRC TD(_LBRC) +#define TD_LCBR TD(_LCBR) +#define TD_LPRN TD(_LPRN) +#define TD_LT TD(_LT) +#define TD_PRIV TD(_PRIV) // compile time macro string, provided in private_string.h +#define TD_QUOT TD(_QUOT) +#define TD_RBRC TD(_RBRC) +#define TD_RCBR TD(_RCBR) +#define TD_RNGL TD(_RNGL) +#define TD_RPRN TD(_RPRN) +#define TD_SEND TD(_SEND) // config.h defined macro string +#define TD_SPC TD(_SPC) // see process_record_user() for extended handling of Spc +#define TD_TILD TD(_TILD) diff --git a/keyboards/planck/keymaps/altgr/common/toggle_layout.h b/keyboards/planck/keymaps/altgr/common/toggle_layout.h new file mode 100644 index 00000000000..713d27bbcfc --- /dev/null +++ b/keyboards/planck/keymaps/altgr/common/toggle_layout.h @@ -0,0 +1,102 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | Space| | | 0 | = | | | | + // | | | | f() | Space| | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_TTNUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, +#else + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | + | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTFNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, + }, + +// ....................................................................... Regex + + // ,-----------------------------------------------------------------------------------. + // | | ~ | { | } | & | | | % | [ | ] | @ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | ^ | < | > | ? | | | | | ( | ) | $ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | : | ! | = | / | | | \ | * | . | # | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | - | | | + | Space| | | | + // `-----------------------------------------------------------------------------------' + + [_TTREGEX] = { + {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, + {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, + {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, + {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, + }, + +// ............................................................ Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTCURSOR] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTMOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/altgr/config.h b/keyboards/planck/keymaps/altgr/config.h new file mode 100644 index 00000000000..d55258c02bd --- /dev/null +++ b/keyboards/planck/keymaps/altgr/config.h @@ -0,0 +1,50 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// required because lower/raise modifiers are redefined by colemak-dh +#define PREVENT_STUCK_MODIFIERS + +// tap dance key press termination interval +#define TAPPING_TERM 250 + +// smooth mouse motion +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 7 +// #define MOUSEKEY_WHEEL_DELAY 0 + +// compile time macro string, see functions/hardware planck script (undefine otherwise) +#define PRIVATE_STRING + +// compile time macro string, must be in quotes +#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" + +// thumb key tap-shift() double tap: one shot shift (0) off (1) on +#define DT_SHIFT 1 + +// number layer 0 position KEYPAD_0, THUMB_0 +#define THUMB_0 + +// home block shift symbol clustes defined (no overlays required for extended symbols, undefine otherwise) +#define SHIFT_SYMBOLS + +// center column TT assignments (undefine for OSM chords) +#define CENTER_TT +#define TAPPING_TOGGLE 1 + +// home row modifiers +#define HOME_MODS +// fix dual function timing +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) +#define BEAKLGR + +// sync app with window manager keybind hook defined in plover_keybind.h +#define PLOVER_KEYBIND + +#endif diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c new file mode 100644 index 00000000000..516f481fc09 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/keymap.c @@ -0,0 +1,490 @@ +// 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. +// +// To flash planck firmware +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// Reset keyboard or press hw reset button on base (hole) +// +// cd qmk_firmware/keyboards/planck +// sudo make KEYMAP=sdothum dfu +// +// sudo make clean (good practice before flashing) +// sudo make KEYMAP=sdothum (to compile check) +// +// Package requirements (for arch linux) +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// avr-gcc-atmel +// avr-libc-atmel +// dfu-programmer +// +// Notes +// ▔▔▔▔▔ +// ** E R G O W I D E S P L I T ** Layout +// +// Autocompletion tap dance key pairs (),[],{} are available from the +// number/symbol layer, as well as, numerous (un)shift key values +// +// The navigation pad provides a single hand right thumb activated cluster +// with left hand modifiers +// +// #define PRIVATE_STRING includes private_string.h, a user defined code +// block for the PRIV tap dance e.g. SEND_STRING("secret messape"), +// see function private() +// +// Modifier clusters +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// The num and sym keys together access the navigation pad layer +// +// ,-----------------------------------------------------------------------------------. +// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| +// `-----------------------------------------------------------------------------------' +// +// Hint +// ▔▔▔▔ +// For sculpted keycaps such as Cherry or OEM profile, reverse the Alt, Num, +// Shift, Shift, Nav, Sym keycaps for more ergonomic thumb orientation and +// actuation +// +// Code +// ▔▔▔▔ +// This source is shamelessly based on the "default" planck layout +// +// #ifdef/#endif block structures are not indented, as syntax highlighting +// in vim is sufficient for identification +// +// c++ commenting style is used throughout +// +// Change history +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// See http://thedarnedestthing.com/planck%20constant +// See http://thedarnedestthing.com/planck%20done + + + +// === N O T E === +// +// sudo CPATH=/common make ... + + +#include "config.h" +#include "planck.h" +#include "action_layer.h" +#ifdef STENO_ENABLE +#include "keymap_steno.h" +#endif +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE = 0 + ,_SHIFT + ,_LSHIFT + ,_RSHIFT + ,_PLOVER + ,_NUMBER + ,_SYMBOL + ,_FNCKEY + ,_MOUSE +#ifdef CENTER_TT + ,_TTNUMBER + ,_TTREGEX + ,_TTFNCKEY + ,_TTCURSOR + ,_TTMOUSE +#endif +#ifndef SHIFT_SYMBOLS + ,_NUMSYM + ,_SYMREG +#endif + ,_EDIT + ,_QWERTY + ,_ADJUST + ,_END_LAYERS +}; + +enum planck_keycodes { + BASE = SAFE_RANGE + ,BASE1 + ,BASE2 + ,PLOVER + ,PLOEXIT + ,SM_CIRC // pseudo GUI_T(S(KC_6)) for shifted key-codes, see process_record_user() + ,SM_DLR // pseudo SFT_T(S(KC_4)) for shifted key-codes, see process_record_user() + ,SM_G // pseudo MT (MOD_LALT | MOD_LSFT, S(KC_G)) for shifted key-codes, see process_record_user() + ,SM_K // pseudo MT (MOD_LGUI | MOD_LSFT, S(KC_K)) for shifted key-codes, see process_record_user() + ,SM_PERC // pseudo ALT_T(S(KC_5)) for shifted key-codes, see process_record_user() + ,SM_LPRN // pseudo CTL_T(S(KC_9)) for shifted key-codes, see process_record_user() + ,SM_W // pseudo MT (MOD_LGUI | MOD_LSFT, S(KC_W)) for shifted key-codes, see process_record_user() + ,SL_LEFT // pseudo LT (_MOUSE, S(KC_LEFT)) for shifted key-codes, see process_record_user() + ,SP_DEL // pseudo LT (_MOUSE, KC_DEL) for shifted key-codes, see process_record_user() + ,SL_PIPE // pseudo LT (_ADJUST, S(KC_BSLS)) for shifted key-codes, see process_record_user() + ,SL_TAB // pseudo LT (_FNCKEY, S(KC_TAB)) for shifted key-codes, see process_record_user() +#ifdef CENTER_TT + ,TT_ESC +#endif +#ifdef STENO_ENABLE + ,PS_STNA = STN_A + ,PS_STNO = STN_O + ,PS_STNE = STN_E + ,PS_STNU = STN_U +#else + ,LT_C = LT (_NUMBER, KC_C) + ,LT_V = LT (_FNCKEY, KC_V) + ,LT_N = LT (_EDIT, KC_N) + ,LT_M = LT (_SYMBOL, KC_M) +#endif + ,PS_BASE +}; + +// modifier keys +#define AT_B ALT_T(KC_B) +#define AT_DOWN ALT_T(KC_DOWN) +#define CT_RGHT CTL_T(KC_RGHT) +#define GT_C GUI_T(KC_C) +#define GT_UP GUI_T(KC_UP) +#define MT_E MT (MOD_LCTL | MOD_LALT, KC_E) +#define MT_X MT (MOD_LALT | MOD_LSFT, KC_X) +#define ST_A SFT_T(KC_A) +#ifdef HOME_MODS +#define HOME_K GUI_T(KC_K) +#define HOME_H CTL_T(KC_H) +#define HOME_E ALT_T(KC_E) +#define HOME_A SFT_T(KC_A) +#if defined(BEAKLMU) || defined(BEAKLSP) || defined(BEAKLGR) +#define HOME_T SFT_T(KC_T) +#define HOME_R ALT_T(KC_R) +#define HOME_S CTL_T(KC_S) +#define HOME_W GUI_T(KC_W) +#else +#define HOME_T SFT_T(KC_T) +#define HOME_S ALT_T(KC_S) +#define HOME_N GUI_T(KC_N) +#define HOME_B CTL_T(KC_B) +#endif +#else +#define HOME_K KC_K +#define HOME_H KC_H +#define HOME_E KC_E +#define HOME_A KC_A +#define HOME_T KC_T +#define HOME_S KC_S +#define HOME_N KC_N +#define HOME_B KC_B +#endif + +#define S_DOWN S (KC_DOWN) +#define S_LEFT S (KC_LEFT) +#define S_RGHT S (KC_RGHT) +#define S_TAB S (KC_TAB) +#define S_UP S (KC_UP) + +#include "tapdance.h" + +// keycodes +#define ___x___ KC_TRNS +#define ___fn__ KC_TRNS +#ifdef _______ +#undef _______ +#endif +#define _______ KC_NO + +#define COPY LCTL(KC_C) +#define CUT LCTL(KC_X) +#define EOT LCTL(KC_D) +#define NAK LCTL(KC_U) +#define PASTE LCTL(KC_V) +#define UNDO LCTL(KC_Z) +#define TMCOPY LALT(LCTL(KC_C)) +#define TMPASTE LALT(LCTL(KC_V)) +#define LT_BSLS LT (_MOUSE, KC_BSLS) // see process_record_user() for extended handling +#define LT_BSPC LT (_EDIT, KC_BSPC) +#define SP_LEFT LT (_EDIT, KC_LEFT) +#define LT_ESC LT (_NUMBER, KC_ESC) +#define LT_LEFT LT (_SYMBOL, KC_LEFT) // see process_record_user() for extended handling +#define SP_BSPC LT (_SYMBOL, KC_BSPC) // see process_record_user() for extended handling +#define LT_TAB LT (_FNCKEY, KC_TAB) +#define LT_INS LT (_FNCKEY, KC_INS) +#define LT_ALTG LT (_FNCKEY, KC_RALT) +#define ADJUST MO (_ADJUST) +#define OS_ALT OSM (MOD_LALT) +#define OS_CTL OSM (MOD_LCTL) +#define OS_GUI OSM (MOD_LGUI) +#define OS_SFT OSM (MOD_LSFT) +#define OS_CALT OSM (MOD_LALT | MOD_LCTL) +#define OS_CGUI OSM (MOD_LGUI | MOD_LCTL) +#define OS_CSFT OSM (MOD_LSFT | MOD_LCTL) +#define OS_SALT OSM (MOD_LALT | MOD_LSFT) +#define OS_SGUI OSM (MOD_LGUI | MOD_LSFT) + +#ifdef CENTER_TT +#ifdef BEAKLSP +#define CNTR_TL OSM (MOD_LSFT) +#else +#define CNTR_TL TT (_TTFNCKEY) +#endif +#define CNTR_TR KC_CAPS +#define CNTR_HL TT (_TTCURSOR) +#define CNTR_HR TT (_TTMOUSE) +#define CNTR_BL TT (_TTNUMBER) +#define CNTR_BR TT (_TTREGEX) +#else +#define CNTR_TL OSM (MOD_LALT | MOD_LCTL) +#define CNTR_TR OSM (MOD_LGUI | MOD_LCTL) +#define CNTR_HL OSM (MOD_LALT | MOD_LSFT) +#define CNTR_HR OSM (MOD_LGUI | MOD_LSFT) +#define CNTR_BL TD (_CAPS) +#define CNTR_BR OSM (MOD_LSFT | MOD_LCTL) +#endif + +#ifdef THUMB_0 +#define LT_EQL LT (_ADJUST, KC_EQL) +#else +#define LT_0 LT (_ADJUST, KC_0) +#endif +#ifndef SHIFT_SYMBOLS +#define LT_A LT (_NUMSYM, KC_A) +#define LT_LFTX LT (_SYMREG, KC_LEFT) +#endif + +// ........................................................ Default Alpha Layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#include "beakl.h" +#include "colemak.h" +#include "qwerty.h" +#include "steno_layout.h" + +// ...................................................... Number / Function Keys + +#include "number_fkey_layout.h" + +// ......................................................... Symbol / Navigation + +#include "symbol_guifn_layout.h" + +// ............................................................... Toggle Layers + +#ifdef CENTER_TT +#include "toggle_layout.h" +#endif + +// ......................................................... Short Cuts / Adjust + +#include "chord_layout.h" + +}; + +// ...................................................................... Sounds + +#include "sounds.h" + +// ........................................................... User Keycode Trap + +#include "keycode_functions.h" + +#define BASE_1 1 +#define BASE_2 2 +#define BASE_12 3 +static uint8_t base_n = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case BASE1: + if (record->event.pressed) { + base_n = base_n | BASE_1; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_1; + } + return false; + case BASE2: + if (record->event.pressed) { + base_n = base_n | BASE_2; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_2; + } + return false; + case AT_DOWN: +#ifdef HOME_MODS + case HOME_E: +#if defined(BEAKLMU) || defined(BEAKLSP) || defined(BEAKLGR) + case HOME_R: +#else + case HOME_S: +#endif +#endif + tap_mods(record, KC_LALT); + break; + case CT_RGHT: +#ifdef HOME_MODS + case HOME_K: +#if defined(BEAKLMU) || defined(BEAKLSP) || defined(BEAKLGR) + case HOME_W: +#else + case HOME_B: +#endif +#endif + tap_mods(record, KC_LGUI); + break; + case GT_UP: +#ifdef HOME_MODS + case HOME_H: +#if defined(BEAKLMU) || defined(BEAKLSP) || defined(BEAKLGR) + case HOME_S: +#else + case HOME_N: +#endif +#endif + tap_mods(record, KC_LCTL); + break; +#ifdef HOME_MODS + case HOME_A: + case HOME_T: + tap_mods(record, KC_LSFT); + break; +#endif +#ifdef CENTER_TT + case TT_ESC: + clear_tt(); // exit TT layer + return false; +#endif + case LT_ESC: +#ifdef CENTER_TT + if (tt_keycode != 0) { + clear_tt(); // exit TT layer + return false; + } +#endif + tap_layer(record, _NUMBER); + break; + case LT_LEFT: + case SP_BSPC: + tap_layer(record, _SYMBOL); + // LT (_SYMBOL, KC_LEFT) left right combination layer + thumb_layer(record, RIGHT, 0, 0, _SYMBOL, _LSHIFT); + break; + case OS_ALT: + tap_mods(record, KC_LALT); + break; + case OS_CTL: + tap_mods(record, KC_LCTL); + break; + case OS_GUI: + tap_mods(record, KC_LGUI); + break; + case SM_CIRC: + // GUI_T(S(KC_6)) + mt_shift(record, KC_LGUI, 0, KC_6); + break; + case SM_DLR: + // SFT_T(S(KC_4)) + mt_shift(record, KC_LSFT, 0, KC_4); + break; + case SM_G: + // MT(MOD_LALT | MOD_LSFT, S(KC_G)) + mt_shift(record, KC_LALT, KC_LSFT, KC_G); + break; + case SM_K: + // MT(MOD_LGUI | MOD_LSFT, S(KC_K)) + mt_shift(record, KC_LGUI, KC_LSFT, KC_K); + break; + case SM_W: + // MT(MOD_LGUI | MOD_LSFT, S(KC_W)) + mt_shift(record, KC_LGUI, KC_LSFT, KC_W); + break; + case SM_LPRN: + // CTL_T(S(KC_9)) + mt_shift(record, KC_LCTL, 0, KC_9); + break; + case SM_PERC: + // ALT_T(S(KC_5)) + mt_shift(record, KC_LALT, 0, KC_5); + break; + case LT_BSLS: + tap_layer(record, _MOUSE); + // LT (_MOUSE, KC_BSLS) left right combination layer, see #define LT_BSLS + thumb_layer(record, LEFT, 0, 0, _MOUSE, _SYMBOL); + break; + case SL_LEFT: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, SHIFT, KC_LEFT, _MOUSE, _LSHIFT); + break; + case SP_DEL: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, NOSHIFT, KC_DEL, _MOUSE, _LSHIFT); + break; + case SL_PIPE: + // LT (_ADJUST, S(KC_BSLS)) emulation + lt_shift(record, KC_BSLS, _ADJUST); + break; + case SL_TAB: + // LT (_FNCKEY, S(KC_TAB)) emulation + lt_shift(record, KC_TAB, _FNCKEY); + break; + case TD_ENT: + tap_layer(record, _RSHIFT); + // LT (_RSHIFT, KC_ENT) emulation, see tap dance enter + break; + case TD_SPC: + tap_layer(record, _LSHIFT); + // LT (_LSHIFT, KC_SPC) left right combination layer, see tap dance TD_SPC + thumb_layer(record, LEFT, 0, 0, _LSHIFT, _SYMBOL); + break; +#ifdef CENTER_TT + case CNTR_TL: + case CNTR_TR: + case CNTR_HL: + case CNTR_HR: + case CNTR_BL: + case CNTR_BR: + if (tt_keycode != keycode && tt_keycode != 0) { + clear_tt(); // return to base layer first if different TT layer selected + } + tt_keycode = keycode; + break; +#endif +// #ifdef STENO_ENABLE +// case PS_STNA: +// stn_layer(record, STN_A, _NUMBER); +// break; +// case PS_STNO: +// stn_layer(record, STN_O, _FNCKEY); +// break; +// case PS_STNE: +// stn_layer(record, STN_E, _EDIT); +// break; +// case PS_STNU: +// stn_layer(record, STN_U, _SYMBOL); +// break; +// #endif + case PS_BASE: + if (record->event.pressed) { + base_layer(); + } + return false; + case PLOVER: + steno(record); + return false; + case PLOEXIT: + steno_exit(record); + return false; + } + return true; +} + +#include "init.h" diff --git a/keyboards/planck/keymaps/altgr/private_string.h b/keyboards/planck/keymaps/altgr/private_string.h new file mode 100644 index 00000000000..6ea34cc8e87 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/private_string.h @@ -0,0 +1 @@ +SEND_STRING("the keys of enoch"); diff --git a/keyboards/planck/keymaps/altgr/qwerty.h b/keyboards/planck/keymaps/altgr/qwerty.h new file mode 100644 index 00000000000..d11d0478b3f --- /dev/null +++ b/keyboards/planck/keymaps/altgr/qwerty.h @@ -0,0 +1,64 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Qwerty +#ifdef QWERTY + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | ; | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + diff --git a/keyboards/planck/keymaps/altgr/readme.md b/keyboards/planck/keymaps/altgr/readme.md new file mode 100644 index 00000000000..58f73e3b445 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/readme.md @@ -0,0 +1,10 @@ +# The sdothum extended Default Planck Layout + +- Colemak-DH layout layer with shift/tab key overlays +- Number and symbol/function key layer +- Hexadecimal keypad layer +- Navigation keypad layer +- Dynamic macro layer +- Autocompletion tap key pairs (),[],{} +- Normalized enter and esc key position across keyboard layers +- Extensive use of tap keys diff --git a/keyboards/planck/keymaps/altgr/rules.mk b/keyboards/planck/keymaps/altgr/rules.mk new file mode 100644 index 00000000000..40f153844c1 --- /dev/null +++ b/keyboards/planck/keymaps/altgr/rules.mk @@ -0,0 +1,26 @@ +# 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 = no # 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 +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. +STENO_ENABLE = yes # enable TX Bolt protocol, requires VIRTSER and may not work with mouse keys + +# do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend + +TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} + +ifndef QUANTUM_DIR +include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c new file mode 100644 index 00000000000..a0db05daafd --- /dev/null +++ b/keyboards/planck/keymaps/danielhklein/keymap.c @@ -0,0 +1,142 @@ +#include "planck.h" +#include "action_layer.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. +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, + _ARROW +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ARROW +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Enter | + * |-----+------+------+------+------+------|------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |-----+------+------+------+------+------|------+------+------+------+------+------| + * |Lshft| Z | X | C | V | B | N | M | , | . | / |Rshft | + * |-----+------+------+------+------+------|------+------+------+------+------+------| + * |Arrow| LCtrl| LAlt | LGui | Lower| Bspc | Space| Raise| RGui | RAlt |RCtrl | - | + * `----------------------------------------------------------------------------------' + */ + +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {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_RSFT}, + {ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | 7 | 8 | 9 | / | \ | ` | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | 4 | 5 | 6 | * | ( | ) | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Lshft| | | | | | 1 | 2 | 3 | - | [ | ] | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | LGui | | | 0 | . | = | + | { | } | + * `-----------------------------------------------------------------------------------' + */ + +[_LOWER] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC}, + {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | >/|| | Mute | Vol- | Vol+ | |<< | >>| | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' +*/ + +[_RAISE] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Arrow + * ,----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+------|-----+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|-----+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|-----+------+------+------+------+------| + * | | | | Gui | | | | | | | | | + * `----------------------------------------------------------------------------------' + */ + +[_ARROW] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +}; + +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 LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + case ARROW: + if (record->event.pressed) { + layer_on(_ARROW); + } else { + layer_off(_ARROW); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/danielhklein/rules.mk b/keyboards/planck/keymaps/danielhklein/rules.mk new file mode 100644 index 00000000000..a73d8518337 --- /dev/null +++ b/keyboards/planck/keymaps/danielhklein/rules.mk @@ -0,0 +1,14 @@ +BOOTMAGIC_ENABLE = yes # 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 = 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = 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 +TAP_DANCE_ENABLE = no # Enable Tap Dance \ No newline at end of file diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h index 8b0abf976ab..fbd2fdb2720 100644 --- a/keyboards/planck/keymaps/default/config.h +++ b/keyboards/planck/keymaps/default/config.h @@ -13,8 +13,6 @@ } #endif -#define MUSIC_MASK (keycode != KC_NO) - /* * MIDI options */ @@ -39,7 +37,6 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - // Most tactile encoders have detents every 4 stages #define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index b523c184ede..e6ab69d43e1 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -35,12 +35,13 @@ enum planck_keycodes { COLEMAK, DVORAK, PLOVER, - LOWER, - RAISE, BACKLIT, EXT_PLV }; +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -178,6 +179,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif +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: @@ -199,26 +204,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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); @@ -347,3 +332,13 @@ void matrix_scan_user(void) { muse_counter = (muse_counter + 1) % muse_tempo; } } + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/dr_notsokind/Readme.md b/keyboards/planck/keymaps/dr_notsokind/Readme.md index 35f3975c6a7..e7e29cb7dd2 100644 --- a/keyboards/planck/keymaps/dr_notsokind/Readme.md +++ b/keyboards/planck/keymaps/dr_notsokind/Readme.md @@ -70,7 +70,7 @@ When you are done, press `Media` and `Enter`. You will finally hear a tune confi Press `Media` and the key where you stored your Macro, either `;` or `'`. The Macro will play. -![Imgur](https://i.imgur.com/TCsD6Ro.png) +![Imgur](https://i.imgur.com/ri4lEcl.png) http://www.keyboard-layout-editor.com/#/gists/4cfb26f84bbb4fabe5e6c7cc22c85e24 @@ -82,13 +82,13 @@ The Lock mode toggle disables the double-tap `CAPS` and disables `GUI` keys (WIN Lower + Raise gives access to the layer switching, plus keyboard modes (such as enabling music mode for annoying your coworkers), reset, SysReq and Lock Mode, which disables the double shift tap for CapsLock (taken from the *circuit* layout, see the comments below). Also provides another distribution for the F keys. -![Adjust](https://i.imgur.com/ADNLR6n.png) +![Adjust](https://i.imgur.com/6m6baos.png) http://www.keyboard-layout-editor.com/#/gists/12462bfba17d16bb40b54ed914209d92 ## Numpad Layer -![Numpad](https://i.imgur.com/iTyhjNZ.png) +![Numpad](https://i.imgur.com/od1plfz.png) http://www.keyboard-layout-editor.com/#/gists/5ab730ab278d2050c5250498806e8edc diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index b360b39da11..8555a959a46 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -87,9 +87,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* NUMPAD * ,-----------------------------------------------------------------------------------. - * |QWERTY| NULL | NULL | NULL | NULL | NULL | NULL | / | 7 | 8 | 9 | - | + * |QWERTY| NULL | Up | NULL | NULL | NULL | NULL | / | 7 | 8 | 9 | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | NULL | NULL | NULL | NULL | NULL | NULL | * | 4 | 5 | 6 | + | + * | | Left | Down | Right| NULL | NULL | NULL | * | 4 | 5 | 6 | + | * |------+------+------+------+------+------+------+------+------+------+------+------| * | |NumLck| NULL | NULL | NULL | NULL | NULL |BckSp | 1 | 2 | 3 | Ent | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -97,8 +97,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUMPAD] = { - {QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS}, + {QWERTY, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS}, + {_______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS}, {_______, KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL} }, @@ -123,55 +123,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* RAISE * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | F1 | F2 | F3 | F4 | F5 | | - | = | [ | ] | \ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |LShift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | NULL | PgUp | Enter| + * |LShift| F6 | F7 | F8 | F9 | F10 | |ISO # |ISO / | NULL | PgUp | Enter| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | Vol+ | | NULL | | | Home | PgDn | End | + * | | | | F11 | | F12 | | | Home | PgDn | End | * `-----------------------------------------------------------------------------------' */ [_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_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT }, - {_______, _______, _______, KC_VOLU, _______, XXXXXXX, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, 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_DEL}, + {KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT }, + {_______, _______, _______, KC_F11, _______, KC_F12, KC_F12, _______, _______, KC_HOME, KC_PGDN, KC_END } }, /* LOWER * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F13 | F14 | F15 | F16 | F17 | F18 | _ | + | { | } | | | + * | Del | F1 | F2 | F3 | F4 | F5 | | _ | + | { | } | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |LShift| F19 | F20 | F21 | F22 | F23 | F24 |ISO ~ |ISO | | NULL | PgUp | Enter| + * |LShift| F6 | F7 | F8 | F9 | F10 | |ISO ~ |ISO | | NULL | PgUp | Enter| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | Vol- | | NULL | | | Home | PgDn | End | + * | | | | F11 | | F12 | | | Home | PgDn | End | * `-----------------------------------------------------------------------------------' */ [_LOWER] = { - {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_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_LSFT, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT }, - {_______, _______, _______, KC_VOLD, _______, XXXXXXX, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END } + {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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT }, + {_______, _______, _______, KC_F11, _______, KC_F12, KC_F12, _______, _______, KC_HOME, KC_PGDN, KC_END } }, /* MEDIA AND COMMANDS * ,-----------------------------------------------------------------------------------. - * |Sleep | NULL |WbHome| NULL | NULL | NULL |Again | NULL |Insert| NULL |PrntSc|Power | + * | NULL | NULL |WbHome| NULL | NULL | NULL |Again | NULL |Insert| NULL |PrntSc| NULL | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Wake | NULL |WbSrch| NULL | Find | NULL | NULL | NULL | Calc | NULL |PlyMc1|PlyMc2| + * | NULL | NULL |WbSrch| NULL | Find | NULL | NULL | NULL | NULL | NULL |PlyMc1|PlyMc2| * |------+------+------+------+------+------+------+------+------+------+------+------| - * |LShift| Undo | Cut | Copy | Paste| NULL | NULL | NULL |ZoomOu|ZoomIn| Prev | NULL | + * |LShift| NULL | NULL | Calc | NULL | NULL | NULL | NULL |ZoomOu|ZoomIn| Prev |RecStp| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | NULL | NULL | NULL | | Vol- | Mute | Vol+ | NULL | Stop | Next | Play | + * |ONESHT| NULL | NULL | | Vol- | Mute | Vol+ |Zoom 0| Stop | Next | Play | * `-----------------------------------------------------------------------------------' */ [_MEDIA] = { - {KC_SLEP, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, KC_PWR}, - {KC_WAKE, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2 }, - {KC_LSFT, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP }, + {XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2 }, + {KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP }, {ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY } }, @@ -195,18 +195,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNCTIONS * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * | SLEEP| NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | POWER| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | + * | WAKE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NULL | Reset| NULL |AudOff|MusOff|QWERTY|NUMPAD|Mus On|Aud On| NULL |Voice+|SysReq| + * | NULL | NULL | NULL |AudOff|MusOff|QWERTY|NUMPAD|Mus On|Aud On| NULL |Voice+|SysReq| * |------+------+------+------+------+-------------+------+------+------+------+------| - * | NULL | NULL | Lock | NULL | | NULL | | NULL |AGNorm|Voice-|AGSwap| + * | Reset| NULL | LOCK | NULL | | NULL | | NULL |AGNorm|Voice-|AGSwap| * `-----------------------------------------------------------------------------------' */ [_FUNCTN] = { - {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 }, + {KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR }, + {KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, {XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ}, {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP} } diff --git a/keyboards/planck/keymaps/hiea/common/chord_layout.h b/keyboards/planck/keymaps/hiea/common/chord_layout.h new file mode 100644 index 00000000000..2c785d56ca7 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/chord_layout.h @@ -0,0 +1,41 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. Short Cuts + + // .-----------------------------------------------------------------------------------. + // | | | Copy | Paste| | | | | | | | | + // |--------------------------------------------------------------+------+------+------| + // | Undo | Cut | Copy | Paste| | | | | PRIV | PUB | | | + // |-----------------------------------------------------------------------------------| + // | | | Nak | Eot | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | | f() | | | | | | + // | | | | | | | | f() | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_EDIT] = { + {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, + {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, + {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, + }, + +// ................................................................ Adjust Layer + + // ,-----------------------------------------------------------------------------------. + // |Plover| | | | | | | | | | | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // |Aud on| | | | | | | | | | | | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Reset| | | | | | | | | | | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | | | | | f() | | | | + // `-----------------------------------------------------------------------------------' + + [_ADJUST] = { + {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hiea/common/init.h b/keyboards/planck/keymaps/hiea/common/init.h new file mode 100644 index 00000000000..6366a19f65e --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/init.h @@ -0,0 +1,56 @@ + +// ....................................................................... Audio + +void matrix_init_user(void) +{ +#ifdef STENO_ENABLE + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI +#endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} + +#ifdef AUDIO_ENABLE +#ifdef BACKLIGHT_ENABLE +void led_set_user(uint8_t usb_led) +{ + static uint8_t old_usb_led = 0; + _delay_ms(10); // gets rid of tick + if (!is_playing_notes()) { + if ((usb_led & (1<event.pressed) { + key_timer = timer_read(); + register_code(modifier); + if (modifier2) { + register_code(modifier2); + } + } + else { + unregister_code(modifier); + if (modifier2) { + unregister_code(modifier2); + } + if (timer_elapsed(key_timer) < TAPPING_TERM) { + shift_key(keycode); + } + key_timer = 0; + } +} + +// ................................................................... Mod Masks + +// tap dance persistant mods, see process_record_user() +// keyboard_report->mods (?) appears to be cleared by tap dance +static uint8_t mods = 0; + +void tap_mods(keyrecord_t *record, uint16_t keycode) +{ + if (record->event.pressed) { + mods |= MOD_BIT(keycode); + } + else { + mods &= ~(MOD_BIT(keycode)); + } +} + +// (un)register modifiers +void modifier(void (*f)(uint8_t)) +{ + if (mods & MOD_BIT(KC_LCTL)) { + (*f)(KC_LCTL); + } + if (mods & MOD_BIT(KC_LGUI)) { + (*f)(KC_LGUI); + } + if (mods & MOD_BIT(KC_LALT)) { + (*f)(KC_LALT); + } +} + +// .................................................... Triple Dance Shift/Layer + +static uint8_t dt_shift = 0; + +void double_shift(uint16_t keycode, uint8_t layer) +{ + tap_key (keycode); + if (DT_SHIFT) { + // set_oneshot_mods(MOD_LSFT); + // layer_on(layer); + layer_on (_SHIFT); + set_oneshot_layer(_SHIFT, ONESHOT_START); + dt_shift = 1; + } + else { + layer_on(layer); + } +} + +// tap dance LT (LAYER, KEY) emulation with -> and auto-repeat extensions! +void tap_shift(qk_tap_dance_state_t *state, uint16_t keycode, uint8_t layer) +{ + // double tap plus down + if (state->count > 2) { + // double enter shift + if (keycode == KC_ENT) { + tap_key (keycode); + double_shift(keycode, layer); + } + // repeating keycode + else { + register_code(keycode); + } + } + // tap plus down (or double tap): keycode (one shot) shift + else if (state->count > 1) { + double_shift(keycode, layer); + } + // down: shift + else if (state->pressed) { + layer_on(layer); + } + // tap: keycode + else { + modifier(register_code); + tap_key (keycode); + modifier(unregister_code); + } +} + +void tap_reset(uint16_t keycode, uint8_t layer) +{ + unregister_code(keycode); + if (DT_SHIFT && dt_shift) { + clear_oneshot_layer_state(ONESHOT_PRESSED); + dt_shift = 0; + } + else { + layer_off(layer); + } +} + +// augment pseudo LT (_RSHIFT, KC_ENT) handling below for rapid sequences +void enter(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_ENT, _RSHIFT); +} + +void enter_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_ENT, _RSHIFT); +} + +// augment pseudo LT (_LSHIFT, KC_SPC) handling below for rapid sequences +void space(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_SPC, _LSHIFT); +} + +void space_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_SPC, _LSHIFT); +} + +// ......................................................... Triple Dance Insert + +void double_max(uint8_t count, uint8_t shift, uint16_t keycode) +{ + if (shift) { + shift_key(keycode); + if (count > 1) { + shift_key(keycode); + } + } + else { + tap_key(keycode); + if (count > 1) { + tap_key(keycode); + } + } +} + +void colon(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_SCLN); + shift_key(KC_SCLN); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_SCLN); + } + reset_tap_dance(state); +} + +void eql(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key(KC_SPC); + tap_key(KC_SLSH); + tap_key(KC_EQL); + tap_key(KC_SPC); + } + else { + double_max(state->count, NOSHIFT, KC_EQL); + } + reset_tap_dance(state); +} + +void greater(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + tap_key (KC_MINS); + shift_key(KC_DOT); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_DOT); + } + reset_tap_dance(state); +} + +void lesser(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_COMM); + tap_key (KC_MINS); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_COMM); + } + reset_tap_dance(state); +} + +void tilde(qk_tap_dance_state_t *state, void *user_data) +{ + // double tap plus down: repeating keycode + if (state->count > 2) { + register_code(KC_LSFT); + register_code(KC_GRV); + } + // tap: keycode + else { + shift_key(KC_GRV); + // double tap: unix home directory + if (state->count > 1) { + tap_key(KC_SLSH); + } + } +} + +void tilde_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_GRV); + unregister_code(KC_LSFT); +} + +// ............................................................. Tap Dance Pairs + +// tap dance shift rules +#define S_NEVER 0 +#define S_SINGLE 1 +#define S_DOUBLE 2 +#define S_ALWAYS S_SINGLE | S_DOUBLE + +void symbol_pair(uint8_t shift, uint16_t left, uint16_t right) +{ + if (shift & S_DOUBLE) { + shift_key(left); + shift_key(right); + } + else { + tap_key(left); + tap_key(right); + } +} + +#define CLOSE 1 + +// tap dance symbol pairs +void tap_pair(qk_tap_dance_state_t *state, uint8_t shift, uint16_t left, uint16_t right, uint16_t modifier, uint8_t close) +{ + // triple tap: left right with cursor between symbol pair a la vim :-) + if (state->count > 2) { + symbol_pair(shift, left, right); + tap_key (KC_LEFT); + } + // double tap: left right + else if (state->count > 1) { + symbol_pair(shift, left, right); + } + // down: modifier + else if (state->pressed) { + if (modifier) { + register_code(modifier); + } + } + // tap: left (close: right) + else { + if (shift & S_SINGLE) { + shift_key(close ? right : left); + } + else { + tap_key(close ? right : left); + } + } + if (!modifier) { + reset_tap_dance(state); + } +} + +void doublequote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_QUOT, KC_QUOT, 0, 0); +} + +void grave(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_GRV, KC_GRV, 0, 0); +} + +void lbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, 0); +} + +void lcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, 0); +} + +void lparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, KC_LCTL, 0); +} + +void lparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +void quote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_QUOT, KC_QUOT, 0, 0); +} + +void rangle(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_COMM, KC_DOT, 0, CLOSE); +} + +void rbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, 0, CLOSE); +} + +void rparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +// ............................................................ Tap Dance Insert + +void comma(qk_tap_dance_state_t *state, void *user_data) +{ + tap_key(KC_COMM); + if (state->count > 1) { + tap_key(KC_SPC); + } + reset_tap_dance(state); +} + +void dot(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + shift_key(KC_COLN); + } + else { + tap_key(KC_DOT); + } + reset_tap_dance(state); +} + +// compile time macro string, see functions/hardware planck script +void private(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { +#ifdef PRIVATE_STRING +#include "private_string.h" +#endif + } + reset_tap_dance(state); +} + +// config.h defined string +void send(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + SEND_STRING(PUBLIC_STRING); + } + reset_tap_dance(state); +} + +// .......................................................... Tap Dance One Shot + +void caps(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + tap_key(KC_CAPS); + } + else { + set_oneshot_mods(MOD_LSFT); + register_code (KC_LSFT); // on hold down + } +} + +void caps_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LSFT); +} + +// ................................................................... Tap Dance + +qk_tap_dance_action_t tap_dance_actions[] = { + [_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, caps_reset) + ,[_COLN] = ACTION_TAP_DANCE_FN (colon) + ,[_COMM] = ACTION_TAP_DANCE_FN (comma) + ,[_DOT] = ACTION_TAP_DANCE_FN (dot) + ,[_DQOT] = ACTION_TAP_DANCE_FN (doublequote) + ,[_ENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, enter, enter_reset) + ,[_EQL] = ACTION_TAP_DANCE_FN (eql) + ,[_GRV] = ACTION_TAP_DANCE_FN (grave) + ,[_GT] = ACTION_TAP_DANCE_FN (greater) + ,[_LBRC] = ACTION_TAP_DANCE_FN (lbrace) + ,[_LCBR] = ACTION_TAP_DANCE_FN (lcurly) + ,[_LPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lparen, lparen_reset) + ,[_LT] = ACTION_TAP_DANCE_FN (lesser) + ,[_PRIV] = ACTION_TAP_DANCE_FN (private) + ,[_QUOT] = ACTION_TAP_DANCE_FN (quote) + ,[_RBRC] = ACTION_TAP_DANCE_FN (rbrace) + ,[_RCBR] = ACTION_TAP_DANCE_FN (rcurly) + ,[_RNGL] = ACTION_TAP_DANCE_FN (rangle) + ,[_RPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rparen, rparen_reset) + ,[_SEND] = ACTION_TAP_DANCE_FN (send) + ,[_SPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, space, space_reset) + ,[_TILD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tilde, tilde_reset) +}; + +// .............................................................. Dynamic Layers + +#define LEFT 1 +#define RIGHT 2 +static uint8_t thumb = 0; + +// LEFT (KC_SPC, S(KC_BSLS)), RIGHT (KC_LEFT, S(KC_LEFT)) opposite thumb combinations, see process_record_user() +// up, up -> _BASE +// up, down -> _SYMBOL +// down, up -> _NUMBER +// down, down -> _MOUSE // see layer keycodes that raise mouse layer +#define THUMBS_DOWN _MOUSE // layer + +static uint8_t overlayer = 0; + +// left right thumb layer combinations +void thumb_layer(keyrecord_t *record, uint8_t side, uint8_t shift, uint16_t keycode, uint8_t thumb_dn_layer, uint8_t thumb_up_layer) +{ + if (record->event.pressed) { + // layer_on via tap_layer(), see process_record_user() + key_timer = timer_read(); + thumb = thumb | side; + } + else { + layer_off(thumb_dn_layer); + // opposite thumb_layer() thumb may have switched effective layer! + if (overlayer) { + layer_off(overlayer); + overlayer = 0; + } + if (!key_press(shift, keycode)) { + layer_off(THUMBS_DOWN); // both thumbs needed + // opposite thumb down? see left right combination layer table above + if (thumb & (side == LEFT ? RIGHT : LEFT)) { + layer_on(thumb_up_layer); + overlayer = thumb_up_layer; + } + } + clear_mods(); + thumb = thumb & ~side; + key_timer = 0; + } +} + +// #ifdef STENO_ENABLE +// // LT for steno keycode +// void stn_layer(keyrecord_t *record, uint16_t keycode, uint8_t layer) +// { +// if (record->event.pressed) { +// key_timer = timer_read(); +// if (keycode) { +// process_steno(keycode, record); +// } +// layer_on(layer); +// } +// else { +// layer_off(layer); +// if (keycode) { +// if (timer_elapsed(key_timer) < TAPPING_TERM) { +// process_steno(keycode, record); +// } +// else { +// // clear pressed state (request push of updated) process_steno.c and .h +// // steno_clear_state(); +// } +// } +// key_timer = 0; +// } +// } +// #endif + +// LT for S(keycode) +void lt_shift(keyrecord_t *record, uint16_t keycode, uint8_t layer) +{ + if (record->event.pressed) { + key_timer = timer_read(); + layer_on(layer); + } + else { + layer_off(layer); + // for shifted keycodes, hence, LT_SHIFT + key_press(SHIFT, keycode); + clear_mods(); + key_timer = 0; + } +} + +// set layer asap to overcome macro latency errors, notably tap dance and LT usage +// this routine inexplicably (?) sets layer_on() faster than can be done in thumb_layer() +void tap_layer(keyrecord_t *record, uint8_t layer) +{ + if (record->event.pressed) { + layer_on(layer); + } + else { + layer_off(layer); + } +} + +// ..................................................................... Keymaps + +// void persistant_default_layer_set(uint16_t default_layer) +// { +// eeconfig_update_default_layer(default_layer); +// default_layer_set (default_layer); +// } + +void clear_layers(void) +{ + uint8_t layer; + for (layer = 0; layer < _END_LAYERS; layer++) { + layer_off(layer); + } +} + +#ifdef CENTER_TT +static uint16_t tt_keycode = 0; // current TT keycode + +void clear_tt(void) +{ + if (tt_keycode == KC_CAPS) { + tap_key(KC_CAPS); // clear capslock + } + tt_keycode = 0; + clear_layers(); + set_single_persistent_default_layer(_BASE); +} +#endif + +// txbolt plover run state +static uint8_t plover = 0; + +void toggle_plover(uint8_t state) +{ + if (plover != state) { +#ifdef PLOVER_KEYBIND +#include "plover_keybind.h" +#endif + plover = state; + } +} + +void base_layer(void) +{ +#ifdef AUDIO_ENABLE + if (plover) { + PLAY_SONG(song_plover_gb); + } + else { + PLAY_SONG(song_qwerty); + } +#endif + clear_layers(); + set_single_persistent_default_layer(_BASE); + toggle_plover(0); +} + +void steno(keyrecord_t *record) +{ + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_plover); +#endif + clear_layers(); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + if (!plover) { + toggle_plover(1); + } + } +} + +void steno_exit(keyrecord_t *record) +{ + if (record->event.pressed) { + base_layer(); + toggle_plover(0); + } +} diff --git a/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h new file mode 100644 index 00000000000..321482b2919 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h @@ -0,0 +1,46 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | | | f() | | + | | | | | + // | | | | | f() | | | + | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_FNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hiea/common/plover_keybind.h b/keyboards/planck/keymaps/hiea/common/plover_keybind.h new file mode 100644 index 00000000000..cb4ef92ef84 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/plover_keybind.h @@ -0,0 +1,9 @@ + +// simple window manager specific plover keybind hook + +// toggle plover application, see herbstluftwm/config/appbinds +register_code (KC_LGUI); +register_code (KC_LCTL); +tap_key (KC_EQL); +unregister_code(KC_LCTL); +unregister_code(KC_LGUI); diff --git a/keyboards/planck/keymaps/hiea/common/sounds.h b/keyboards/planck/keymaps/hiea/common/sounds.h new file mode 100644 index 00000000000..1bfc7a6da0c --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/sounds.h @@ -0,0 +1,14 @@ + +// ................................................................ Audio Sounds + +#ifdef AUDIO_ENABLE +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_colemak [][2] = SONG(COLEMAK_SOUND); +float song_qwerty [][2] = SONG(QWERTY_SOUND); +float song_plover [][2] = SONG(PLOVER_SOUND); +float song_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float song_caps_on [][2] = SONG(CAPS_LOCK_ON_SOUND); +float song_caps_off [][2] = SONG(CAPS_LOCK_OFF_SOUND); +float music_scale [][2] = SONG(MUSIC_SCALE_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +#endif diff --git a/keyboards/planck/keymaps/hiea/common/steno_layout.h b/keyboards/planck/keymaps/hiea/common/steno_layout.h new file mode 100644 index 00000000000..ab4a6fe011c --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/steno_layout.h @@ -0,0 +1,39 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Plover +#ifdef STENO_ENABLE + // ,-----------------------------------------------------------------------------------. + // | # | # | # | # | # | # | # | # | # | # | # | # | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, + }, +#else + // ,-----------------------------------------------------------------------------------. + // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_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 }, + {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, + }, +#endif diff --git a/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h new file mode 100644 index 00000000000..677e46409ba --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h @@ -0,0 +1,40 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ..................................................... Symbol Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | ~ | * | & | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | ^ | % | $ | | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | # | @ | ! | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | |Adjust| \ | | f() | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | f() | | f() | | + // '-----------------------------------------------------------------------------------' + + [_MOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hiea/common/tapdance.h b/keyboards/planck/keymaps/hiea/common/tapdance.h new file mode 100644 index 00000000000..d778286bf1e --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/tapdance.h @@ -0,0 +1,49 @@ + +// tap dance keys +enum tap_dance { + _CAPS = 0 + ,_COLN + ,_COMM + ,_DOT + ,_DQOT + ,_ENT + ,_EQL + ,_GRV + ,_GT + ,_LBRC + ,_LCBR + ,_LPRN + ,_LT + ,_PRIV + ,_QUOT + ,_RBRC + ,_RCBR + ,_RNGL + ,_RPRN + ,_SEND + ,_SPC + ,_TILD +}; + +#define TD_CAPS TD(_CAPS) +#define TD_COLN TD(_COLN) +#define TD_COMM TD(_COMM) +#define TD_DOT TD(_DOT) +#define TD_DQOT TD(_DQOT) +#define TD_ENT TD(_ENT) +#define TD_EQL TD(_EQL) +#define TD_GRV TD(_GRV) +#define TD_GT TD(_GT) +#define TD_LBRC TD(_LBRC) +#define TD_LCBR TD(_LCBR) +#define TD_LPRN TD(_LPRN) +#define TD_LT TD(_LT) +#define TD_PRIV TD(_PRIV) // compile time macro string, provided in private_string.h +#define TD_QUOT TD(_QUOT) +#define TD_RBRC TD(_RBRC) +#define TD_RCBR TD(_RCBR) +#define TD_RNGL TD(_RNGL) +#define TD_RPRN TD(_RPRN) +#define TD_SEND TD(_SEND) // config.h defined macro string +#define TD_SPC TD(_SPC) // see process_record_user() for extended handling of Spc +#define TD_TILD TD(_TILD) diff --git a/keyboards/planck/keymaps/hiea/common/toggle_layout.h b/keyboards/planck/keymaps/hiea/common/toggle_layout.h new file mode 100644 index 00000000000..713d27bbcfc --- /dev/null +++ b/keyboards/planck/keymaps/hiea/common/toggle_layout.h @@ -0,0 +1,102 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | Space| | | 0 | = | | | | + // | | | | f() | Space| | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_TTNUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, +#else + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | + | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTFNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, + }, + +// ....................................................................... Regex + + // ,-----------------------------------------------------------------------------------. + // | | ~ | { | } | & | | | % | [ | ] | @ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | ^ | < | > | ? | | | | | ( | ) | $ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | : | ! | = | / | | | \ | * | . | # | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | - | | | + | Space| | | | + // `-----------------------------------------------------------------------------------' + + [_TTREGEX] = { + {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, + {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, + {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, + {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, + }, + +// ............................................................ Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTCURSOR] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTMOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hiea/config.h b/keyboards/planck/keymaps/hiea/config.h new file mode 100644 index 00000000000..9bb5e087350 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/config.h @@ -0,0 +1,50 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// required because lower/raise modifiers are redefined by colemak-dh +#define PREVENT_STUCK_MODIFIERS + +// tap dance key press termination interval +#define TAPPING_TERM 250 + +// smooth mouse motion +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 7 +// #define MOUSEKEY_WHEEL_DELAY 0 + +// compile time macro string, see functions/hardware planck script (undefine otherwise) +#define PRIVATE_STRING + +// compile time macro string, must be in quotes +#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" + +// thumb key tap-shift() double tap: one shot shift (0) off (1) on +#define DT_SHIFT 1 + +// number layer 0 position KEYPAD_0, THUMB_0 +#define THUMB_0 + +// home block shift symbol clustes defined (no overlays required for extended symbols, undefine otherwise) +#define SHIFT_SYMBOLS + +// center column TT assignments (undefine for OSM chords) +#define CENTER_TT +#define TAPPING_TOGGLE 1 + +// home row modifiers +#define HOME_MODS +// fix dual function timing +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) +#define DEFAULT + +// sync app with window manager keybind hook defined in plover_keybind.h +#define PLOVER_KEYBIND + +#endif diff --git a/keyboards/planck/keymaps/hiea/hiea.h b/keyboards/planck/keymaps/hiea/hiea.h new file mode 100644 index 00000000000..093802aef16 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/hiea.h @@ -0,0 +1,63 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. BEAKL HIEA +#ifdef DEFAULT + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | K | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | ^ | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {SM_H, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W }, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#endif diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c new file mode 100644 index 00000000000..2f573f9a45d --- /dev/null +++ b/keyboards/planck/keymaps/hiea/keymap.c @@ -0,0 +1,429 @@ +// 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. +// +// To flash planck firmware +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// Reset keyboard or press hw reset button on base (hole) +// +// cd qmk_firmware/keyboards/planck +// sudo make KEYMAP=sdothum dfu +// +// sudo make clean (good practice before flashing) +// sudo make KEYMAP=sdothum (to compile check) +// +// Package requirements (for arch linux) +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// avr-gcc-atmel +// avr-libc-atmel +// dfu-programmer +// +// Notes +// ▔▔▔▔▔ +// ** E R G O W I D E S P L I T ** Layout +// +// Autocompletion tap dance key pairs (),[],{} are available from the +// number/symbol layer, as well as, numerous (un)shift key values +// +// The navigation pad provides a single hand right thumb activated cluster +// with left hand modifiers +// +// #define PRIVATE_STRING includes private_string.h, a user defined code +// block for the PRIV tap dance e.g. SEND_STRING("secret messape"), +// see function private() +// +// Modifier clusters +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// The num and sym keys together access the navigation pad layer +// +// ,-----------------------------------------------------------------------------------. +// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| +// `-----------------------------------------------------------------------------------' +// +// Hint +// ▔▔▔▔ +// For sculpted keycaps such as Cherry or OEM profile, reverse the Alt, Num, +// Shift, Shift, Nav, Sym keycaps for more ergonomic thumb orientation and +// actuation +// +// Code +// ▔▔▔▔ +// This source is shamelessly based on the "default" planck layout +// +// #ifdef/#endif block structures are not indented, as syntax highlighting +// in vim is sufficient for identification +// +// c++ commenting style is used throughout +// +// Change history +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// See http://thedarnedestthing.com/planck%20constant +// See http://thedarnedestthing.com/planck%20done + + + +// === N O T E === +// +// sudo CPATH=/common make ... + + +#include "config.h" +#include "planck.h" +#include "action_layer.h" +#ifdef STENO_ENABLE +#include "keymap_steno.h" +#endif +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE = 0 + ,_SHIFT + ,_LSHIFT + ,_RSHIFT + ,_PLOVER + ,_NUMBER + ,_SYMBOL + ,_FNCKEY + ,_MOUSE +#ifdef CENTER_TT + ,_TTNUMBER + ,_TTREGEX + ,_TTFNCKEY + ,_TTCURSOR + ,_TTMOUSE +#endif + ,_EDIT + ,_ADJUST + ,_END_LAYERS +}; + +enum planck_keycodes { + BASE = SAFE_RANGE + ,BASE1 + ,BASE2 + ,PLOVER + ,SM_CIRC // pseudo GUI_T(S(KC_6)) for shifted key-codes, see process_record_user() + ,SM_DLR // pseudo SFT_T(S(KC_4)) for shifted key-codes, see process_record_user() + ,SM_G // pseudo MT (MOD_LALT | MOD_LSFT, S(KC_G)) for shifted key-codes, see process_record_user() + ,SM_H // pseudo MT (MOD_LCTL | MOD_LSFT, S(KC_H)) for shifted key-codes, see process_record_user() + ,SM_PERC // pseudo ALT_T(S(KC_5)) for shifted key-codes, see process_record_user() + ,SM_W // pseudo MT (MOD_LGUI | MOD_LSFT, S(KC_W)) for shifted key-codes, see process_record_user() + ,SL_LEFT // pseudo LT (_MOUSE, S(KC_LEFT)) for shifted key-codes, see process_record_user() + ,SP_DEL // pseudo LT (_MOUSE, KC_DEL) for shifted key-codes, see process_record_user() + ,SL_TAB // pseudo LT (_FNCKEY, S(KC_TAB)) for shifted key-codes, see process_record_user() +#ifdef CENTER_TT + ,TT_ESC +#endif +#ifdef STENO_ENABLE + ,PS_STNA = STN_A + ,PS_STNO = STN_O + ,PS_STNE = STN_E + ,PS_STNU = STN_U +#else + ,LT_C = LT (_NUMBER, KC_C) + ,LT_V = LT (_FNCKEY, KC_V) + ,LT_N = LT (_EDIT, KC_N) + ,LT_M = LT (_SYMBOL, KC_M) +#endif +}; + +// modifier keys +#define AT_B ALT_T(KC_B) +#define AT_DOWN ALT_T(KC_DOWN) +#define CT_RGHT CTL_T(KC_RGHT) +#define GT_C GUI_T(KC_C) +#define GT_UP GUI_T(KC_UP) +#define MT_E MT (MOD_LCTL | MOD_LALT, KC_E) +#define ST_A SFT_T(KC_A) +#ifdef HOME_MODS +#define HOME_H GUI_T(KC_H) +#define HOME_I CTL_T(KC_I) +#define HOME_E ALT_T(KC_E) +#define HOME_A SFT_T(KC_A) +#define HOME_T SFT_T(KC_T) +#define HOME_R ALT_T(KC_R) +#define HOME_S CTL_T(KC_S) +#define HOME_W GUI_T(KC_W) +#else +#define HOME_H KC_H +#define HOME_I KC_I +#define HOME_E KC_E +#define HOME_A KC_A +#define HOME_T KC_T +#define HOME_R KC_R +#define HOME_S KC_S +#define HOME_W KC_W +#endif + +#define S_DOWN S (KC_DOWN) +#define S_LEFT S (KC_LEFT) +#define S_RGHT S (KC_RGHT) +#define S_TAB S (KC_TAB) +#define S_UP S (KC_UP) + +#include "tapdance.h" + +// keycodes +#define ___x___ KC_TRNS +#define ___fn__ KC_TRNS +#ifdef _______ +#undef _______ +#endif +#define _______ KC_NO + +#define COPY LCTL(KC_C) +#define CUT LCTL(KC_X) +#define EOT LCTL(KC_D) +#define NAK LCTL(KC_U) +#define PASTE LCTL(KC_V) +#define UNDO LCTL(KC_Z) +#define TMCOPY LALT(LCTL(KC_C)) +#define TMPASTE LALT(LCTL(KC_V)) +#define LT_BSLS LT (_MOUSE, KC_BSLS) // see process_record_user() for extended handling +#define LT_BSPC LT (_EDIT, KC_BSPC) +#define SP_LEFT LT (_EDIT, KC_LEFT) +#define LT_ESC LT (_NUMBER, KC_ESC) +#define LT_LEFT LT (_SYMBOL, KC_LEFT) // see process_record_user() for extended handling +#define SP_BSPC LT (_SYMBOL, KC_BSPC) // see process_record_user() for extended handling +#define LT_TAB LT (_FNCKEY, KC_TAB) +#define LT_INS LT (_FNCKEY, KC_INS) +#define ADJUST MO (_ADJUST) +#define OS_ALT OSM (MOD_LALT) +#define OS_CTL OSM (MOD_LCTL) +#define OS_GUI OSM (MOD_LGUI) +#define OS_SFT OSM (MOD_LSFT) + +#ifdef CENTER_TT +#define CNTR_TL TT (_TTFNCKEY) +#define CNTR_TR KC_CAPS +#define CNTR_HL TT (_TTCURSOR) +#define CNTR_HR TT (_TTMOUSE) +#define CNTR_BL TT (_TTNUMBER) +#define CNTR_BR TT (_TTREGEX) +#else +#define CNTR_TL OSM (MOD_LALT | MOD_LCTL) +#define CNTR_TR OSM (MOD_LGUI | MOD_LCTL) +#define CNTR_HL OSM (MOD_LALT | MOD_LSFT) +#define CNTR_HR OSM (MOD_LGUI | MOD_LSFT) +#define CNTR_BL TD (_CAPS) +#define CNTR_BR OSM (MOD_LSFT | MOD_LCTL) +#endif + +#ifdef THUMB_0 +#define LT_EQL LT (_ADJUST, KC_EQL) +#else +#define LT_0 LT (_ADJUST, KC_0) +#endif + +// ........................................................ Default Alpha Layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#include "hiea.h" +#include "steno_layout.h" + +// ...................................................... Number / Function Keys + +#include "number_fkey_layout.h" + +// ......................................................... Symbol / Navigation + +#include "symbol_guifn_layout.h" + +// ............................................................... Toggle Layers + +#ifdef CENTER_TT +#include "toggle_layout.h" +#endif + +// ......................................................... Short Cuts / Adjust + +#include "chord_layout.h" + +}; + +// ...................................................................... Sounds + +#include "sounds.h" + +// ........................................................... User Keycode Trap + +#include "keycode_functions.h" + +#define BASE_1 1 +#define BASE_2 2 +#define BASE_12 3 +static uint8_t base_n = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case BASE1: + if (record->event.pressed) { + base_n = base_n | BASE_1; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_1; + } + return false; + case BASE2: + if (record->event.pressed) { + base_n = base_n | BASE_2; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_2; + } + return false; + case AT_DOWN: +#ifdef HOME_MODS + case HOME_E: + case HOME_R: +#endif + tap_mods(record, KC_LALT); + break; + case CT_RGHT: +#ifdef HOME_MODS + case HOME_H: + case HOME_W: +#endif + tap_mods(record, KC_LGUI); + break; + case GT_UP: +#ifdef HOME_MODS + case HOME_I: + case HOME_S: +#endif + tap_mods(record, KC_LCTL); + break; +#ifdef HOME_MODS + case HOME_A: + case HOME_T: + tap_mods(record, KC_LSFT); + break; +#endif +#ifdef CENTER_TT + case TT_ESC: + clear_tt(); // exit TT layer + return false; +#endif + case LT_ESC: +#ifdef CENTER_TT + if (tt_keycode != 0) { + clear_tt(); // exit TT layer + return false; + } +#endif + tap_layer(record, _NUMBER); + break; + case LT_LEFT: + case SP_BSPC: + tap_layer(record, _SYMBOL); + // LT (_SYMBOL, KC_LEFT) left right combination layer + thumb_layer(record, RIGHT, 0, 0, _SYMBOL, _LSHIFT); + break; + case OS_ALT: + tap_mods(record, KC_LALT); + break; + case OS_CTL: + tap_mods(record, KC_LCTL); + break; + case OS_GUI: + tap_mods(record, KC_LGUI); + break; + case SM_CIRC: + // GUI_T(S(KC_6)) + mt_shift(record, KC_LGUI, 0, KC_6); + break; + case SM_DLR: + // SFT_T(S(KC_4)) + mt_shift(record, KC_LSFT, 0, KC_4); + break; + case SM_G: + // MT(MOD_LALT | MOD_LSFT, S(KC_G)) + mt_shift(record, KC_LALT, KC_LSFT, KC_G); + break; + case SM_H: + // MT(MOD_LCTL | MOD_LSFT, S(KC_K)) + mt_shift(record, KC_LCTL, KC_LSFT, KC_H); + break; + case SM_W: + // MT(MOD_LGUI | MOD_LSFT, S(KC_W)) + mt_shift(record, KC_LGUI, KC_LSFT, KC_W); + break; + case SM_PERC: + // ALT_T(S(KC_5)) + mt_shift(record, KC_LALT, 0, KC_5); + break; + case LT_BSLS: + tap_layer(record, _MOUSE); + // LT (_MOUSE, KC_BSLS) left right combination layer, see #define LT_BSLS + thumb_layer(record, LEFT, 0, 0, _MOUSE, _SYMBOL); + break; + case SL_LEFT: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, SHIFT, KC_LEFT, _MOUSE, _LSHIFT); + break; + case SP_DEL: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, NOSHIFT, KC_DEL, _MOUSE, _LSHIFT); + break; + case SL_TAB: + // LT (_FNCKEY, S(KC_TAB)) emulation + lt_shift(record, KC_TAB, _FNCKEY); + break; + case TD_ENT: + tap_layer(record, _RSHIFT); + // LT (_RSHIFT, KC_ENT) emulation, see tap dance enter + break; + case TD_SPC: + tap_layer(record, _LSHIFT); + // LT (_LSHIFT, KC_SPC) left right combination layer, see tap dance TD_SPC + thumb_layer(record, LEFT, 0, 0, _LSHIFT, _SYMBOL); + break; +#ifdef CENTER_TT + case CNTR_TL: + case CNTR_TR: + case CNTR_HL: + case CNTR_HR: + case CNTR_BL: + case CNTR_BR: + if (tt_keycode != keycode && tt_keycode != 0) { + clear_tt(); // return to base layer first if different TT layer selected + } + tt_keycode = keycode; + break; +#endif +// #ifdef STENO_ENABLE +// case PS_STNA: +// stn_layer(record, STN_A, _NUMBER); +// break; +// case PS_STNO: +// stn_layer(record, STN_O, _FNCKEY); +// break; +// case PS_STNE: +// stn_layer(record, STN_E, _EDIT); +// break; +// case PS_STNU: +// stn_layer(record, STN_U, _SYMBOL); +// break; +// #endif + case PLOVER: + steno(record); + return false; + } + return true; +} + +#include "init.h" diff --git a/keyboards/planck/keymaps/hiea/qwerty.h b/keyboards/planck/keymaps/hiea/qwerty.h new file mode 100644 index 00000000000..d11d0478b3f --- /dev/null +++ b/keyboards/planck/keymaps/hiea/qwerty.h @@ -0,0 +1,64 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Qwerty +#ifdef QWERTY + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | ; | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + diff --git a/keyboards/planck/keymaps/hiea/readme.md b/keyboards/planck/keymaps/hiea/readme.md new file mode 100644 index 00000000000..58f73e3b445 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/readme.md @@ -0,0 +1,10 @@ +# The sdothum extended Default Planck Layout + +- Colemak-DH layout layer with shift/tab key overlays +- Number and symbol/function key layer +- Hexadecimal keypad layer +- Navigation keypad layer +- Dynamic macro layer +- Autocompletion tap key pairs (),[],{} +- Normalized enter and esc key position across keyboard layers +- Extensive use of tap keys diff --git a/keyboards/planck/keymaps/hiea/rules.mk b/keyboards/planck/keymaps/hiea/rules.mk new file mode 100644 index 00000000000..40f153844c1 --- /dev/null +++ b/keyboards/planck/keymaps/hiea/rules.mk @@ -0,0 +1,26 @@ +# 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 = no # 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 +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. +STENO_ENABLE = yes # enable TX Bolt protocol, requires VIRTSER and may not work with mouse keys + +# do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend + +TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} + +ifndef QUANTUM_DIR +include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/hieax/common/chord_layout.h b/keyboards/planck/keymaps/hieax/common/chord_layout.h new file mode 100644 index 00000000000..2c785d56ca7 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/chord_layout.h @@ -0,0 +1,41 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. Short Cuts + + // .-----------------------------------------------------------------------------------. + // | | | Copy | Paste| | | | | | | | | + // |--------------------------------------------------------------+------+------+------| + // | Undo | Cut | Copy | Paste| | | | | PRIV | PUB | | | + // |-----------------------------------------------------------------------------------| + // | | | Nak | Eot | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | | f() | | | | | | + // | | | | | | | | f() | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_EDIT] = { + {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, + {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, + {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, + }, + +// ................................................................ Adjust Layer + + // ,-----------------------------------------------------------------------------------. + // |Plover| | | | | | | | | | | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // |Aud on| | | | | | | | | | | | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Reset| | | | | | | | | | | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | | | | | f() | | | | + // `-----------------------------------------------------------------------------------' + + [_ADJUST] = { + {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hieax/common/init.h b/keyboards/planck/keymaps/hieax/common/init.h new file mode 100644 index 00000000000..6366a19f65e --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/init.h @@ -0,0 +1,56 @@ + +// ....................................................................... Audio + +void matrix_init_user(void) +{ +#ifdef STENO_ENABLE + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI +#endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} + +#ifdef AUDIO_ENABLE +#ifdef BACKLIGHT_ENABLE +void led_set_user(uint8_t usb_led) +{ + static uint8_t old_usb_led = 0; + _delay_ms(10); // gets rid of tick + if (!is_playing_notes()) { + if ((usb_led & (1<event.pressed) { + key_timer = timer_read(); + register_code(modifier); + if (modifier2) { + register_code(modifier2); + } + } + else { + unregister_code(modifier); + if (modifier2) { + unregister_code(modifier2); + } + if (timer_elapsed(key_timer) < TAPPING_TERM) { + shift_key(keycode); + } + key_timer = 0; + } +} + +// ................................................................... Mod Masks + +// tap dance persistant mods, see process_record_user() +// keyboard_report->mods (?) appears to be cleared by tap dance +static uint8_t mods = 0; + +void tap_mods(keyrecord_t *record, uint16_t keycode) +{ + if (record->event.pressed) { + mods |= MOD_BIT(keycode); + } + else { + mods &= ~(MOD_BIT(keycode)); + } +} + +// (un)register modifiers +void modifier(void (*f)(uint8_t)) +{ + if (mods & MOD_BIT(KC_LCTL)) { + (*f)(KC_LCTL); + } + if (mods & MOD_BIT(KC_LGUI)) { + (*f)(KC_LGUI); + } + if (mods & MOD_BIT(KC_LALT)) { + (*f)(KC_LALT); + } + if (mods & MOD_BIT(KC_LSFT)) { + (*f)(KC_LSFT); + } + if (mods & MOD_BIT(KC_RSFT)) { + (*f)(KC_RSFT); + } +} + +// .................................................... Triple Dance Shift/Layer + +static uint8_t dt_shift = 0; + +void double_shift(uint16_t keycode, uint8_t layer) +{ + tap_key (keycode); + if (DT_SHIFT) { + // set_oneshot_mods(MOD_LSFT); + // layer_on(layer); + layer_on (_SHIFT); + set_oneshot_layer(_SHIFT, ONESHOT_START); + dt_shift = 1; + } + else { + layer_on(layer); + } +} + +// tap dance LT (LAYER, KEY) emulation with -> and auto-repeat extensions! +void tap_shift(qk_tap_dance_state_t *state, uint16_t keycode, uint8_t layer) +{ + // double tap plus down + if (state->count > 2) { + // double enter shift + if (keycode == KC_ENT) { + tap_key (keycode); + double_shift(keycode, layer); + } + // repeating keycode + else { + register_code(keycode); + } + } + // tap plus down (or double tap): keycode (one shot) shift + else if (state->count > 1) { + double_shift(keycode, layer); + } + // down: shift + else if (state->pressed) { + layer_on(layer); + } + // tap: keycode + else { + modifier(register_code); + tap_key (keycode); + modifier(unregister_code); + } +} + +void tap_reset(uint16_t keycode, uint8_t layer) +{ + unregister_code(keycode); + if (DT_SHIFT && dt_shift) { + clear_oneshot_layer_state(ONESHOT_PRESSED); + dt_shift = 0; + } + else { + layer_off(layer); + } +} + +// augment pseudo LT (_RSHIFT, KC_ENT) handling below for rapid sequences +void enter(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_ENT, _RSHIFT); +} + +void enter_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_ENT, _RSHIFT); +} + +// augment pseudo LT (_LSHIFT, KC_SPC) handling below for rapid sequences +void space(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_SPC, _LSHIFT); +} + +void space_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_SPC, _LSHIFT); +} + +// ......................................................... Triple Dance Insert + +void double_max(uint8_t count, uint8_t shift, uint16_t keycode) +{ + if (shift) { + shift_key(keycode); + if (count > 1) { + shift_key(keycode); + } + } + else { + tap_key(keycode); + if (count > 1) { + tap_key(keycode); + } + } +} + +void colon(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_SCLN); + shift_key(KC_SCLN); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_SCLN); + } + reset_tap_dance(state); +} + +void eql(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key(KC_SPC); + tap_key(KC_SLSH); + tap_key(KC_EQL); + tap_key(KC_SPC); + } + else { + double_max(state->count, NOSHIFT, KC_EQL); + } + reset_tap_dance(state); +} + +void greater(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + tap_key (KC_MINS); + shift_key(KC_DOT); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_DOT); + } + reset_tap_dance(state); +} + +void lesser(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_COMM); + tap_key (KC_MINS); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_COMM); + } + reset_tap_dance(state); +} + +void tilde(qk_tap_dance_state_t *state, void *user_data) +{ + // double tap plus down: repeating keycode + if (state->count > 2) { + register_code(KC_LSFT); + register_code(KC_GRV); + } + // tap: keycode + else { + shift_key(KC_GRV); + // double tap: unix home directory + if (state->count > 1) { + tap_key(KC_SLSH); + } + } +} + +void tilde_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_GRV); + unregister_code(KC_LSFT); +} + +// ............................................................. Tap Dance Pairs + +// tap dance shift rules +#define S_NEVER 0 +#define S_SINGLE 1 +#define S_DOUBLE 2 +#define S_ALWAYS S_SINGLE | S_DOUBLE + +void symbol_pair(uint8_t shift, uint16_t left, uint16_t right) +{ + if (shift & S_DOUBLE) { + shift_key(left); + shift_key(right); + } + else { + tap_key(left); + tap_key(right); + } +} + +#define CLOSE 1 + +// tap dance symbol pairs +void tap_pair(qk_tap_dance_state_t *state, uint8_t shift, uint16_t left, uint16_t right, uint16_t modifier, uint8_t close) +{ + // triple tap: left right with cursor between symbol pair a la vim :-) + if (state->count > 2) { + symbol_pair(shift, left, right); + tap_key (KC_LEFT); + } + // double tap: left right + else if (state->count > 1) { + symbol_pair(shift, left, right); + } + // down: modifier + else if (state->pressed) { + if (modifier) { + register_code(modifier); + } + } + // tap: left (close: right) + else { + if (shift & S_SINGLE) { + shift_key(close ? right : left); + } + else { + tap_key(close ? right : left); + } + } + if (!modifier) { + reset_tap_dance(state); + } +} + +void doublequote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_QUOT, KC_QUOT, 0, 0); +} + +void grave(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_GRV, KC_GRV, 0, 0); +} + +void lbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, 0); +} + +void lcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, 0); +} + +void lparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, KC_LCTL, 0); +} + +void lparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +void quote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_QUOT, KC_QUOT, 0, 0); +} + +void rangle(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_COMM, KC_DOT, 0, CLOSE); +} + +void rbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, 0, CLOSE); +} + +void rparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +// ............................................................ Tap Dance Insert + +void comma(qk_tap_dance_state_t *state, void *user_data) +{ + tap_key(KC_COMM); + if (state->count > 1) { + tap_key(KC_SPC); + } + reset_tap_dance(state); +} + +void dot(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + shift_key(KC_COLN); + } + else { + tap_key(KC_DOT); + } + reset_tap_dance(state); +} + +// compile time macro string, see functions/hardware planck script +void private(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { +#ifdef PRIVATE_STRING +#include "private_string.h" +#endif + } + reset_tap_dance(state); +} + +// config.h defined string +void send(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + SEND_STRING(PUBLIC_STRING); + } + reset_tap_dance(state); +} + +// .......................................................... Tap Dance One Shot + +void caps(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + tap_key(KC_CAPS); + } + else { + set_oneshot_mods(MOD_LSFT); + register_code (KC_LSFT); // on hold down + } +} + +void caps_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LSFT); +} + +// ................................................................... Tap Dance + +qk_tap_dance_action_t tap_dance_actions[] = { + [_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, caps_reset) + ,[_COLN] = ACTION_TAP_DANCE_FN (colon) + ,[_COMM] = ACTION_TAP_DANCE_FN (comma) + ,[_DOT] = ACTION_TAP_DANCE_FN (dot) + ,[_DQOT] = ACTION_TAP_DANCE_FN (doublequote) + ,[_ENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, enter, enter_reset) + ,[_EQL] = ACTION_TAP_DANCE_FN (eql) + ,[_GRV] = ACTION_TAP_DANCE_FN (grave) + ,[_GT] = ACTION_TAP_DANCE_FN (greater) + ,[_LBRC] = ACTION_TAP_DANCE_FN (lbrace) + ,[_LCBR] = ACTION_TAP_DANCE_FN (lcurly) + ,[_LPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lparen, lparen_reset) + ,[_LT] = ACTION_TAP_DANCE_FN (lesser) + ,[_PRIV] = ACTION_TAP_DANCE_FN (private) + ,[_QUOT] = ACTION_TAP_DANCE_FN (quote) + ,[_RBRC] = ACTION_TAP_DANCE_FN (rbrace) + ,[_RCBR] = ACTION_TAP_DANCE_FN (rcurly) + ,[_RNGL] = ACTION_TAP_DANCE_FN (rangle) + ,[_RPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rparen, rparen_reset) + ,[_SEND] = ACTION_TAP_DANCE_FN (send) + ,[_SPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, space, space_reset) + ,[_TILD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tilde, tilde_reset) +}; + +// .............................................................. Dynamic Layers + +#define LEFT 1 +#define RIGHT 2 +static uint8_t thumb = 0; + +// LEFT (KC_SPC, S(KC_BSLS)), RIGHT (KC_LEFT, S(KC_LEFT)) opposite thumb combinations, see process_record_user() +// up, up -> _BASE +// up, down -> _SYMBOL +// down, up -> _NUMBER +// down, down -> _MOUSE // see layer keycodes that raise mouse layer +#define THUMBS_DOWN _MOUSE // layer + +static uint8_t overlayer = 0; + +// left right thumb layer combinations +void thumb_layer(keyrecord_t *record, uint8_t side, uint8_t shift, uint16_t keycode, uint8_t thumb_dn_layer, uint8_t thumb_up_layer) +{ + if (record->event.pressed) { + // layer_on via tap_layer(), see process_record_user() + key_timer = timer_read(); + thumb = thumb | side; + } + else { + layer_off(thumb_dn_layer); + // opposite thumb_layer() thumb may have switched effective layer! + if (overlayer) { + layer_off(overlayer); + overlayer = 0; + } + if (!key_press(shift, keycode)) { + layer_off(THUMBS_DOWN); // both thumbs needed + // opposite thumb down? see left right combination layer table above + if (thumb & (side == LEFT ? RIGHT : LEFT)) { + layer_on(thumb_up_layer); + overlayer = thumb_up_layer; + } + } + clear_mods(); + thumb = thumb & ~side; + key_timer = 0; + } +} + +// #ifdef STENO_ENABLE +// // LT for steno keycode +// void stn_layer(keyrecord_t *record, uint16_t keycode, uint8_t layer) +// { +// if (record->event.pressed) { +// key_timer = timer_read(); +// if (keycode) { +// process_steno(keycode, record); +// } +// layer_on(layer); +// } +// else { +// layer_off(layer); +// if (keycode) { +// if (timer_elapsed(key_timer) < TAPPING_TERM) { +// process_steno(keycode, record); +// } +// else { +// // clear pressed state (request push of updated) process_steno.c and .h +// // steno_clear_state(); +// } +// } +// key_timer = 0; +// } +// } +// #endif + +// LT macro for nested LT layers +void lt(keyrecord_t *record, uint8_t shift, uint16_t keycode, uint16_t modifier, uint8_t layer) +{ + if (record->event.pressed) { + key_timer = timer_read(); + if (modifier) { + register_code(modifier); + } + layer_on(layer); + } + else { + if (modifier) { + unregister_code(modifier); + } + layer_off(layer); + // for shifted keycodes, hence, LT_SHIFT + key_press(shift, keycode); + clear_mods(); + key_timer = 0; + } +} + +// LT for S(keycode) +void lt_shift(keyrecord_t *record, uint16_t keycode, uint8_t layer) +{ + lt(record, SHIFT, keycode, 0, layer); +} + +// set layer asap to overcome macro latency errors, notably tap dance and LT usage +// this routine inexplicably (?) sets layer_on() faster than can be done in thumb_layer() +void tap_layer(keyrecord_t *record, uint8_t layer) +{ + if (record->event.pressed) { + layer_on(layer); + } + else { + layer_off(layer); + } +} + +// ..................................................................... Keymaps + +// void persistant_default_layer_set(uint16_t default_layer) +// { +// eeconfig_update_default_layer(default_layer); +// default_layer_set (default_layer); +// } + +void clear_layers(void) +{ + uint8_t layer; + for (layer = 0; layer < _END_LAYERS; layer++) { + layer_off(layer); + } +} + +#ifdef HOME_MODS +// home row layer/shift key state, see tap_mods() and keymap.c +#define LSYMBOL MOD_BIT(KC_LSFT) +#define RSYMBOL MOD_BIT(KC_RSFT) + +void home_state(void) { + // if only the shift key, raise the opposite hand symbol layer + if (mods == LSYMBOL) { + layer_on(_LSYMBOL); + } + else if (mods == RSYMBOL) { + layer_on(_RSYMBOL); + } + // or combine modifiers + else if (mods & LSYMBOL) { + register_code(KC_LSFT); + } + else if (mods & RSYMBOL) { + register_code(KC_RSFT); + } +} + +// home row layer/shift +void symbol_shift(keyrecord_t *record, uint16_t keycode) +{ + if (keycode) { + if (record->event.pressed) { + key_timer = timer_read(); + home_state(); + } + else { + // clear layer/shift state + if (keycode == KC_A) { + layer_off(_LSYMBOL); + unregister_code(KC_LSFT); + } + else if (keycode == KC_T) { + layer_off(_RSYMBOL); + unregister_code(KC_RSFT); + } + // no other modifier enabled, issue keycode + if (~mods) { + key_press(NOSHIFT, keycode); + } + key_timer = 0; + } + } + else { + // a non-shift modifier disables symbol layer + layer_off(_LSYMBOL); + layer_off(_RSYMBOL); + // update home layer/shift state + home_state(); + } +} +#endif + +#ifdef CENTER_TT +static uint16_t tt_keycode = 0; // current TT keycode + +void clear_tt(void) +{ + if (tt_keycode == KC_CAPS) { + tap_key(KC_CAPS); // clear capslock + } + tt_keycode = 0; + clear_layers(); + set_single_persistent_default_layer(_BASE); +} +#endif + +// txbolt plover run state +static uint8_t plover = 0; + +void toggle_plover(uint8_t state) +{ + if (plover != state) { +#ifdef PLOVER_KEYBIND +#include "plover_keybind.h" +#endif + plover = state; + } +} + +void base_layer(void) +{ +#ifdef AUDIO_ENABLE + if (plover) { + PLAY_SONG(song_plover_gb); + } + else { + PLAY_SONG(song_qwerty); + } +#endif + clear_layers(); + set_single_persistent_default_layer(_BASE); + toggle_plover(0); +} + +void steno(keyrecord_t *record) +{ + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_plover); +#endif + clear_layers(); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + if (!plover) { + toggle_plover(1); + } + } +} + +void steno_exit(keyrecord_t *record) +{ + if (record->event.pressed) { + base_layer(); + toggle_plover(0); + } +} diff --git a/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h new file mode 100644 index 00000000000..321482b2919 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h @@ -0,0 +1,46 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | | | f() | | + | | | | | + // | | | | | f() | | | + | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_FNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hieax/common/plover_keybind.h b/keyboards/planck/keymaps/hieax/common/plover_keybind.h new file mode 100644 index 00000000000..cb4ef92ef84 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/plover_keybind.h @@ -0,0 +1,9 @@ + +// simple window manager specific plover keybind hook + +// toggle plover application, see herbstluftwm/config/appbinds +register_code (KC_LGUI); +register_code (KC_LCTL); +tap_key (KC_EQL); +unregister_code(KC_LCTL); +unregister_code(KC_LGUI); diff --git a/keyboards/planck/keymaps/hieax/common/sounds.h b/keyboards/planck/keymaps/hieax/common/sounds.h new file mode 100644 index 00000000000..1bfc7a6da0c --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/sounds.h @@ -0,0 +1,14 @@ + +// ................................................................ Audio Sounds + +#ifdef AUDIO_ENABLE +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_colemak [][2] = SONG(COLEMAK_SOUND); +float song_qwerty [][2] = SONG(QWERTY_SOUND); +float song_plover [][2] = SONG(PLOVER_SOUND); +float song_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float song_caps_on [][2] = SONG(CAPS_LOCK_ON_SOUND); +float song_caps_off [][2] = SONG(CAPS_LOCK_OFF_SOUND); +float music_scale [][2] = SONG(MUSIC_SCALE_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +#endif diff --git a/keyboards/planck/keymaps/hieax/common/steno_layout.h b/keyboards/planck/keymaps/hieax/common/steno_layout.h new file mode 100644 index 00000000000..ab4a6fe011c --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/steno_layout.h @@ -0,0 +1,39 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Plover +#ifdef STENO_ENABLE + // ,-----------------------------------------------------------------------------------. + // | # | # | # | # | # | # | # | # | # | # | # | # | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, + }, +#else + // ,-----------------------------------------------------------------------------------. + // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_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 }, + {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, + }, +#endif diff --git a/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h new file mode 100644 index 00000000000..677e46409ba --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h @@ -0,0 +1,40 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ..................................................... Symbol Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | ~ | * | & | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | ^ | % | $ | | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | # | @ | ! | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | |Adjust| \ | | f() | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | f() | | f() | | + // '-----------------------------------------------------------------------------------' + + [_MOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hieax/common/tapdance.h b/keyboards/planck/keymaps/hieax/common/tapdance.h new file mode 100644 index 00000000000..d778286bf1e --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/tapdance.h @@ -0,0 +1,49 @@ + +// tap dance keys +enum tap_dance { + _CAPS = 0 + ,_COLN + ,_COMM + ,_DOT + ,_DQOT + ,_ENT + ,_EQL + ,_GRV + ,_GT + ,_LBRC + ,_LCBR + ,_LPRN + ,_LT + ,_PRIV + ,_QUOT + ,_RBRC + ,_RCBR + ,_RNGL + ,_RPRN + ,_SEND + ,_SPC + ,_TILD +}; + +#define TD_CAPS TD(_CAPS) +#define TD_COLN TD(_COLN) +#define TD_COMM TD(_COMM) +#define TD_DOT TD(_DOT) +#define TD_DQOT TD(_DQOT) +#define TD_ENT TD(_ENT) +#define TD_EQL TD(_EQL) +#define TD_GRV TD(_GRV) +#define TD_GT TD(_GT) +#define TD_LBRC TD(_LBRC) +#define TD_LCBR TD(_LCBR) +#define TD_LPRN TD(_LPRN) +#define TD_LT TD(_LT) +#define TD_PRIV TD(_PRIV) // compile time macro string, provided in private_string.h +#define TD_QUOT TD(_QUOT) +#define TD_RBRC TD(_RBRC) +#define TD_RCBR TD(_RCBR) +#define TD_RNGL TD(_RNGL) +#define TD_RPRN TD(_RPRN) +#define TD_SEND TD(_SEND) // config.h defined macro string +#define TD_SPC TD(_SPC) // see process_record_user() for extended handling of Spc +#define TD_TILD TD(_TILD) diff --git a/keyboards/planck/keymaps/hieax/common/toggle_layout.h b/keyboards/planck/keymaps/hieax/common/toggle_layout.h new file mode 100644 index 00000000000..ea4ead56b92 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/common/toggle_layout.h @@ -0,0 +1,102 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | GUI | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | Space| | | 0 | = | | | | + // | | | | f() | Space| | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_TTNUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______}, +#else + {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | + | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTFNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______}, + }, + +// ....................................................................... Regex + + // ,-----------------------------------------------------------------------------------. + // | | . | * | & | ~ | | | ` | [ | ] | ^ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | < | % | > | ? | | | | | ( | ) | $ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | : | @ | ! | / | | | \ | { | } | # | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | = | | | + | Space| | | | + // `-----------------------------------------------------------------------------------' + + [_TTREGEX] = { + {___x___, KC_DOT, KC_ASTR, KC_AMPR, KC_TILD, ___x___, ___x___, KC_GRV, KC_LBRC, KC_RBRC, KC_CIRC, ___x___}, + {___x___, KC_LT, KC_PERC, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, + {___x___, KC_COLN, KC_AT, KC_EXLM, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, ___x___}, + {_______, _______, _______, TT_ESC, KC_EQL, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______}, + }, + +// ............................................................ Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | GUI | Ctrl | Alt | Shift| | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTCURSOR] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTMOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hieax/config.h b/keyboards/planck/keymaps/hieax/config.h new file mode 100644 index 00000000000..9bb5e087350 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/config.h @@ -0,0 +1,50 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// required because lower/raise modifiers are redefined by colemak-dh +#define PREVENT_STUCK_MODIFIERS + +// tap dance key press termination interval +#define TAPPING_TERM 250 + +// smooth mouse motion +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 7 +// #define MOUSEKEY_WHEEL_DELAY 0 + +// compile time macro string, see functions/hardware planck script (undefine otherwise) +#define PRIVATE_STRING + +// compile time macro string, must be in quotes +#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" + +// thumb key tap-shift() double tap: one shot shift (0) off (1) on +#define DT_SHIFT 1 + +// number layer 0 position KEYPAD_0, THUMB_0 +#define THUMB_0 + +// home block shift symbol clustes defined (no overlays required for extended symbols, undefine otherwise) +#define SHIFT_SYMBOLS + +// center column TT assignments (undefine for OSM chords) +#define CENTER_TT +#define TAPPING_TOGGLE 1 + +// home row modifiers +#define HOME_MODS +// fix dual function timing +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) +#define DEFAULT + +// sync app with window manager keybind hook defined in plover_keybind.h +#define PLOVER_KEYBIND + +#endif diff --git a/keyboards/planck/keymaps/hieax/hiea.h b/keyboards/planck/keymaps/hieax/hiea.h new file mode 100644 index 00000000000..64541d633e7 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/hiea.h @@ -0,0 +1,99 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. BEAKL HIEA +#ifdef DEFAULT + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | K | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#ifdef HOME_MODS + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | ` | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | f() | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| \ | { | } | # | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | + | Space| Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSYMBOL] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, KC_PLUS, SL_SPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | . | * | & | ~ | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | < | % | > | ? |Cursor| Mouse| C | f() | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | @ | ! | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | = | Ins | Left | Ent | Bksp | Down | Up | Right| + // | | ↑Tab | = | Ent | Bksp | | + // `-----------------------------------------------------------------------------------' + + [_RSYMBOL] = { + {S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W }, + {S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, TD_EQL, LT_INS, SP_LEFT, TD_ENT, LT_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, +#endif +#endif diff --git a/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h b/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h new file mode 100644 index 00000000000..53ffb886128 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/hiea.sync-conflict-20180501-144403-SMV4TP4.h @@ -0,0 +1,97 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. BEAKL HIEA +#ifdef DEFAULT + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | K | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | ? |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#endif + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | ` | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | f() | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | K | / | Num | Regex| \ | { | } | # | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | Esc | Space| + | Space| | + // `-----------------------------------------------------------------------------------' + + [_LSYMBOL] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V)}, + {_______, _______, _______, _______, LT_ESC, TD_SPC, KC_PLUS, KC_SPC, _______, _______, _______, _______}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | . | * | & | ~ | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | < | % | > | ? |Cursor| Mouse| C | f() | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | @ | ! | / | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | ↑Tab | = | Ent | Bksp | | + // `-----------------------------------------------------------------------------------' + + [_RSYMBOL] = { + {S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W }, + {S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {_______, _______, _______, _______, S_TAB, TD_EQL, TD_ENT, LT_BSPC, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c new file mode 100644 index 00000000000..d761ee6777c --- /dev/null +++ b/keyboards/planck/keymaps/hieax/keymap.c @@ -0,0 +1,446 @@ +// 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. +// +// To flash planck firmware +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// Reset keyboard or press hw reset button on base (hole) +// +// cd qmk_firmware/keyboards/planck +// sudo make KEYMAP=sdothum dfu +// +// sudo make clean (good practice before flashing) +// sudo make KEYMAP=sdothum (to compile check) +// +// Package requirements (for arch linux) +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// avr-gcc-atmel +// avr-libc-atmel +// dfu-programmer +// +// Notes +// ▔▔▔▔▔ +// ** E R G O W I D E S P L I T ** Layout +// +// Autocompletion tap dance key pairs (),[],{} are available from the +// number/symbol layer, as well as, numerous (un)shift key values +// +// The navigation pad provides a single hand right thumb activated cluster +// with left hand modifiers +// +// #define PRIVATE_STRING includes private_string.h, a user defined code +// block for the PRIV tap dance e.g. SEND_STRING("secret messape"), +// see function private() +// +// Modifier clusters +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// The num and sym keys together access the navigation pad layer +// +// ,-----------------------------------------------------------------------------------. +// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| +// `-----------------------------------------------------------------------------------' +// +// Hint +// ▔▔▔▔ +// For sculpted keycaps such as Cherry or OEM profile, reverse the Alt, Num, +// Shift, Shift, Nav, Sym keycaps for more ergonomic thumb orientation and +// actuation +// +// Code +// ▔▔▔▔ +// This source is shamelessly based on the "default" planck layout +// +// #ifdef/#endif block structures are not indented, as syntax highlighting +// in vim is sufficient for identification +// +// c++ commenting style is used throughout +// +// Change history +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// See http://thedarnedestthing.com/planck%20constant +// See http://thedarnedestthing.com/planck%20done + + + +// === N O T E === +// +// sudo CPATH=/common make ... + + +#include "config.h" +#include "planck.h" +#include "action_layer.h" +#ifdef STENO_ENABLE +#include "keymap_steno.h" +#endif +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE = 0 + ,_SHIFT + ,_LSHIFT + ,_RSHIFT + ,_LSYMBOL + ,_RSYMBOL + ,_PLOVER + ,_NUMBER + ,_SYMBOL + ,_FNCKEY + ,_MOUSE + ,_EDIT + ,_ADJUST +#ifdef CENTER_TT + ,_TTNUMBER + ,_TTREGEX + ,_TTFNCKEY + ,_TTCURSOR + ,_TTMOUSE +#endif + ,_END_LAYERS +}; + +enum planck_keycodes { + BASE = SAFE_RANGE + ,BASE1 + ,BASE2 + ,PLOVER + ,SM_CIRC // pseudo GUI_T(S(KC_6)) for shifted key-codes, see process_record_user() + ,SM_DLR // pseudo SFT_T(S(KC_4)) for shifted key-codes, see process_record_user() + ,SM_G // pseudo MT (MOD_LALT | MOD_LSFT, S(KC_G)) for shifted key-codes, see process_record_user() + ,SM_H // pseudo MT (MOD_LCTL | MOD_LSFT, S(KC_H)) for shifted key-codes, see process_record_user() + ,SM_PERC // pseudo ALT_T(S(KC_5)) for shifted key-codes, see process_record_user() + ,SM_W // pseudo MT (MOD_LGUI | MOD_LSFT, S(KC_W)) for shifted key-codes, see process_record_user() + ,SL_LEFT // pseudo LT (_MOUSE, S(KC_LEFT)) for shifted key-codes, see process_record_user() + ,SP_DEL // pseudo LT (_MOUSE, KC_DEL) for shifted key-codes, see process_record_user() + ,SL_TAB // pseudo LT (_FNCKEY, S(KC_TAB)) for shifted key-codes, see process_record_user() + ,SL_SPC // pseudo LT (S(_SYMBOL), KC_SPC) for home row shifted GUIFN +#ifdef HOME_MODS + ,HOME_A // pseudo SFT_T(KC_A) + ,HOME_T // pseudo SFT_T(KC_T) +#endif +#ifdef CENTER_TT + ,TT_ESC +#endif +#ifdef STENO_ENABLE + ,PS_STNA = STN_A + ,PS_STNO = STN_O + ,PS_STNE = STN_E + ,PS_STNU = STN_U +#else + ,LT_C = LT (_NUMBER, KC_C) + ,LT_V = LT (_FNCKEY, KC_V) + ,LT_N = LT (_EDIT, KC_N) + ,LT_M = LT (_SYMBOL, KC_M) +#endif +}; + +// modifier keys +#define AT_B ALT_T(KC_B) +#define AT_DOWN ALT_T(KC_DOWN) +#define CT_RGHT CTL_T(KC_RGHT) +#define GT_C GUI_T(KC_C) +#define GT_UP GUI_T(KC_UP) +#define MT_E MT (MOD_LCTL | MOD_LALT, KC_E) +#define ST_A SFT_T(KC_A) +#ifdef HOME_MODS +#define HOME_H GUI_T(KC_H) +#define HOME_I CTL_T(KC_I) +#define HOME_E ALT_T(KC_E) +#define HOME_R ALT_T(KC_R) +#define HOME_S CTL_T(KC_S) +#define HOME_W GUI_T(KC_W) +#else +#define HOME_H KC_H +#define HOME_I KC_I +#define HOME_E KC_E +#define HOME_A KC_A +#define HOME_T KC_T +#define HOME_R KC_R +#define HOME_S KC_S +#define HOME_W KC_W +#endif + +#define S_DOWN S (KC_DOWN) +#define S_LEFT S (KC_LEFT) +#define S_RGHT S (KC_RGHT) +#define S_TAB S (KC_TAB) +#define S_UP S (KC_UP) + +#include "tapdance.h" + +// keycodes +#define ___x___ KC_TRNS +#define ___fn__ KC_TRNS +#ifdef _______ +#undef _______ +#endif +#define _______ KC_NO + +#define COPY LCTL(KC_C) +#define CUT LCTL(KC_X) +#define EOT LCTL(KC_D) +#define NAK LCTL(KC_U) +#define PASTE LCTL(KC_V) +#define UNDO LCTL(KC_Z) +#define TMCOPY LALT(LCTL(KC_C)) +#define TMPASTE LALT(LCTL(KC_V)) +#define LT_BSLS LT (_MOUSE, KC_BSLS) // see process_record_user() for extended handling +#define LT_BSPC LT (_EDIT, KC_BSPC) +#define SP_LEFT LT (_EDIT, KC_LEFT) +#define LT_ESC LT (_NUMBER, KC_ESC) +#define LT_LEFT LT (_SYMBOL, KC_LEFT) // see process_record_user() for extended handling +#define SP_BSPC LT (_SYMBOL, KC_BSPC) // see process_record_user() for extended handling +#define LT_TAB LT (_FNCKEY, KC_TAB) +#define LT_INS LT (_FNCKEY, KC_INS) +#define ADJUST MO (_ADJUST) +#define OS_ALT OSM (MOD_LALT) +#define OS_CTL OSM (MOD_LCTL) +#define OS_GUI OSM (MOD_LGUI) +#define OS_SFT OSM (MOD_LSFT) + +#ifdef CENTER_TT +#define CNTR_TL TT (_TTFNCKEY) +#define CNTR_TR KC_CAPS +#define CNTR_HL TT (_TTCURSOR) +#define CNTR_HR TT (_TTMOUSE) +#define CNTR_BL TT (_TTNUMBER) +#define CNTR_BR TT (_TTREGEX) +#else +#define CNTR_TL OSM (MOD_LALT | MOD_LCTL) +#define CNTR_TR OSM (MOD_LGUI | MOD_LCTL) +#define CNTR_HL OSM (MOD_LALT | MOD_LSFT) +#define CNTR_HR OSM (MOD_LGUI | MOD_LSFT) +#define CNTR_BL TD (_CAPS) +#define CNTR_BR OSM (MOD_LSFT | MOD_LCTL) +#endif + +// LT can only reference layers 0-15 +#ifdef THUMB_0 +#define LT_EQL LT (_ADJUST, KC_EQL) +#else +#define LT_0 LT (_ADJUST, KC_0) +#endif + +// ........................................................ Default Alpha Layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#include "hiea.h" +#include "steno_layout.h" + +// ...................................................... Number / Function Keys + +#include "number_fkey_layout.h" + +// ......................................................... Symbol / Navigation + +#include "symbol_guifn_layout.h" + +// ............................................................... Toggle Layers + +#ifdef CENTER_TT +#include "toggle_layout.h" +#endif + +// ......................................................... Short Cuts / Adjust + +#include "chord_layout.h" + +}; + +// ...................................................................... Sounds + +#include "sounds.h" + +// ........................................................... User Keycode Trap + +#include "keycode_functions.h" + +#define BASE_1 1 +#define BASE_2 2 +#define BASE_12 3 +static uint8_t base_n = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case BASE1: + if (record->event.pressed) { + base_n = base_n | BASE_1; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_1; + } + return false; + case BASE2: + if (record->event.pressed) { + base_n = base_n | BASE_2; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_2; + } + return false; +#ifdef HOME_MODS + case HOME_E: + case HOME_R: + tap_mods(record, KC_LALT); + symbol_shift(record, 0); + break; + case HOME_H: + case HOME_W: + tap_mods(record, KC_LGUI); + symbol_shift(record, 0); + break; + case HOME_I: + case HOME_S: + tap_mods(record, KC_LCTL); + symbol_shift(record, 0); + break; + case HOME_A: + tap_mods(record, KC_LSFT); + symbol_shift(record, KC_A); + break; + case HOME_T: + tap_mods(record, KC_RSFT); + symbol_shift(record, KC_T); + break; +#else + case AT_DOWN: + tap_mods(record, KC_LALT); + break; + case CT_RGHT: + tap_mods(record, KC_LGUI); + break; + case GT_UP: + tap_mods(record, KC_LCTL); + break; +#endif + case SL_SPC: + lt(record, NOSHIFT, KC_SPC, KC_LSFT, _SYMBOL); + break; +#ifdef CENTER_TT + case TT_ESC: + clear_tt(); // exit TT layer + return false; +#endif + case LT_ESC: +#ifdef CENTER_TT + if (tt_keycode != 0) { + clear_tt(); // exit TT layer + return false; + } +#endif + tap_layer(record, _NUMBER); + break; + case LT_LEFT: + case SP_BSPC: + tap_layer(record, _SYMBOL); + // LT (_SYMBOL, KC_LEFT) left right combination layer + thumb_layer(record, RIGHT, 0, 0, _SYMBOL, _LSHIFT); + break; + case OS_ALT: + tap_mods(record, KC_LALT); + break; + case OS_CTL: + tap_mods(record, KC_LCTL); + break; + case OS_GUI: + tap_mods(record, KC_LGUI); + break; + case SM_CIRC: + // GUI_T(S(KC_6)) + mt_shift(record, KC_LGUI, 0, KC_6); + break; + case SM_DLR: + // SFT_T(S(KC_4)) + mt_shift(record, KC_LSFT, 0, KC_4); + break; + case SM_G: + // MT(MOD_LALT | MOD_LSFT, S(KC_G)) + mt_shift(record, KC_LALT, KC_LSFT, KC_G); + break; + case SM_H: + // MT(MOD_LCTL | MOD_LSFT, S(KC_K)) + mt_shift(record, KC_LCTL, KC_LSFT, KC_H); + break; + case SM_W: + // MT(MOD_LGUI | MOD_LSFT, S(KC_W)) + mt_shift(record, KC_LGUI, KC_LSFT, KC_W); + break; + case SM_PERC: + // ALT_T(S(KC_5)) + mt_shift(record, KC_LALT, 0, KC_5); + break; + case LT_BSLS: + tap_layer(record, _MOUSE); + // LT (_MOUSE, KC_BSLS) left right combination layer, see #define LT_BSLS + thumb_layer(record, LEFT, 0, 0, _MOUSE, _SYMBOL); + break; + case SL_LEFT: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, SHIFT, KC_LEFT, _MOUSE, _LSHIFT); + break; + case SP_DEL: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, NOSHIFT, KC_DEL, _MOUSE, _LSHIFT); + break; + case SL_TAB: + // LT (_FNCKEY, S(KC_TAB)) emulation + lt_shift(record, KC_TAB, _FNCKEY); + break; + case TD_ENT: + tap_layer(record, _RSHIFT); + // LT (_RSHIFT, KC_ENT) emulation, see tap dance enter + break; + case TD_SPC: + tap_layer(record, _LSHIFT); + // LT (_LSHIFT, KC_SPC) left right combination layer, see tap dance TD_SPC + thumb_layer(record, LEFT, 0, 0, _LSHIFT, _SYMBOL); + break; +#ifdef CENTER_TT + case CNTR_TL: + case CNTR_TR: + case CNTR_HL: + case CNTR_HR: + case CNTR_BL: + case CNTR_BR: + if (tt_keycode != keycode && tt_keycode != 0) { + clear_tt(); // return to base layer first if different TT layer selected + } + tt_keycode = keycode; + break; +#endif +// #ifdef STENO_ENABLE +// case PS_STNA: +// stn_layer(record, STN_A, _NUMBER); +// break; +// case PS_STNO: +// stn_layer(record, STN_O, _FNCKEY); +// break; +// case PS_STNE: +// stn_layer(record, STN_E, _EDIT); +// break; +// case PS_STNU: +// stn_layer(record, STN_U, _SYMBOL); +// break; +// #endif + case PLOVER: + steno(record); + return false; + } + return true; +} + +#include "init.h" diff --git a/keyboards/planck/keymaps/hieax/readme.md b/keyboards/planck/keymaps/hieax/readme.md new file mode 100644 index 00000000000..58f73e3b445 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/readme.md @@ -0,0 +1,10 @@ +# The sdothum extended Default Planck Layout + +- Colemak-DH layout layer with shift/tab key overlays +- Number and symbol/function key layer +- Hexadecimal keypad layer +- Navigation keypad layer +- Dynamic macro layer +- Autocompletion tap key pairs (),[],{} +- Normalized enter and esc key position across keyboard layers +- Extensive use of tap keys diff --git a/keyboards/planck/keymaps/hieax/rules.mk b/keyboards/planck/keymaps/hieax/rules.mk new file mode 100644 index 00000000000..40f153844c1 --- /dev/null +++ b/keyboards/planck/keymaps/hieax/rules.mk @@ -0,0 +1,26 @@ +# 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 = no # 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 +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. +STENO_ENABLE = yes # enable TX Bolt protocol, requires VIRTSER and may not work with mouse keys + +# do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend + +TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} + +ifndef QUANTUM_DIR +include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/rambo/keymap.c b/keyboards/planck/keymaps/rambo/keymap.c deleted file mode 100644 index 37e22afb902..00000000000 --- a/keyboards/planck/keymaps/rambo/keymap.c +++ /dev/null @@ -1,98 +0,0 @@ -#include "planck.h" - -//alias for clarity in layering -#define _______ KC_TRNS -#define A_BSPC LALT(KC_BSPC) -#define A_LEFT LALT(KC_LEFT) -#define A_RGHT LALT(KC_RGHT) -#define C_TAB LCTL(KC_TAB) -#define GSL LGUI(S(KC_LEFT)) -#define GSR LGUI(S(KC_RGHT)) -#define G_TAB LGUI(KC_TAB) -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application -#define SftEnt SFT_T(KC_ENT) -#define NAV LT(2, KC_TAB) - -#define _COLEMAK 0 -#define _SYMBOL 1 -#define _NAVIGATION 2 - -//tapdance declarations -enum { - SFT_LCK -}; - -//alias for tapdance -#define SftLck TD(SFT_LCK) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | ESC` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |SftLck| Z | X | C | V | B | K | M | , | . | /? |SftEnt| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | GUI | Ctrl | Alt | GUI | Space |Symbol| Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' -*/ - -[_COLEMAK] = { - {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, - -/* Symbol - * ,-----------------------------------------------------------------------------------. - * | [ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ] | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Home | End | ScUp | ScDn | F1 | F2 | -_ |Pg Up | | / | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | | - * `-----------------------------------------------------------------------------------' - */ -[_SYMBOL] = { - {KC_LBRC, KC_1, KC_2, KC_3, KC_4 , KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC}, - {KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - {_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D,KC_F1 , KC_F2 , KC_MINS, KC_PGUP, _______, _______, _______}, - {KC_GRV, _______, _______, _______, A_BSPC, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE} - }, - -/* Navigation*/ - -[_NAVIGATION] = { - {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - {_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______}, - {RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} -}; - -// Shift vs capslock function. From bbaserdem's Planck keymap. -void caps_tap (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_LSFT); - } else if (state->count == 2) { - unregister_code (KC_LSFT); - register_code (KC_CAPS); - } -} -void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_LSFT); - } else { - unregister_code (KC_CAPS); - } -} - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Shift, twice for Caps Lock - [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) -}; \ No newline at end of file diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c new file mode 100644 index 00000000000..0ec7c01b5c7 --- /dev/null +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -0,0 +1,37 @@ +#include "backlight.h" +#include "planck.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = { + /* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bksp │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; : │ Entr │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , < │ . > │ / ? │ ' " │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Alt │ GUI │ \ | │ - _ │ = + │ Spce │ 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) } + }, +[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 │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Powr │ Rset │ VoUp │ VoDn │ Play │ Stop │ Prev │ Next │ Alt │ Ctrl │ GUI │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + { 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 } + } +}; diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/planck/keymaps/sdothum/beakl.h b/keyboards/planck/keymaps/sdothum/beakl.h new file mode 100644 index 00000000000..de3da34a5d3 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/beakl.h @@ -0,0 +1,551 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................... BEAKL EZ +#ifdef BEAKLEZ + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | ; | , | J | . | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V }, + {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W }, + {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | : | ~ | J | ` | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | H | I | E | A | " | ↑Alt | ↑GUI | L | S | T | N | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | : | / | J | ? | X | Caps |^Shift| B | D | M | P | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)}, + {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)}, + {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ..................................................................... BEAKL 8 +#ifdef BEAKL8 + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ~ | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | D | S | T | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL 8P +#ifdef BEAKL8P + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | < | > | ~ | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| \ | $ | * | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ................................................................... BEAKL 8TX +#ifdef BEAKL8TX + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | ; | " | I | , | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, + {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ | ↑Alt | ↑GUI | C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | ! | = | ` | Caps |^Shift| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | $ | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | " | I | / | Caps |^Shift| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, + {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ................................................................... BEAKL 8TT +#ifdef BEAKL8TT + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | Fn | Caps | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | ; | " | I | , | Num | Regex| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B }, + {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ |Cursor| Mouse| C | T | S | N | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | ! | = | ` | Num | Regex| W | M | L | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | B | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)}, + {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL 10 +#ifdef BEAKL10 + // ,-----------------------------------------------------------------------------------. + // | Q | H | O | U | X | ^Alt | ^GUI | G | D | N | M | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | I | E | A | . | ↑Alt | ↑GUI | C | S | R | T | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | , | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V }, + {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, + {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | < | = | > | ~ | ↑Alt | ↑GUI | C | S | R | T | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | ` | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)}, + {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)}, + {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Y | I | E | A | ? | ↑Alt | ↑GUI | C | ( | * | ) | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | / | Z | Caps |^Shift| B | P | L | F | K | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)}, + {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ............................................................... BEAKL Mash Up +#ifdef BEAKL810 + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . | ↑Alt | ↑GUI | C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Caps |^Shift| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | < | > | ~ | ↑Alt | ↑GUI | C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Caps |^Shift| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? | ↑Alt | ↑GUI | | | ( | ) | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Caps |^Shift| \ | $ | * | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL MU +#ifdef BEAKLMU + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | / | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// .................................................................... BEAKL SP +#ifdef BEAKLSP + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | . |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | ; | " | I | , | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X }, + {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W }, + {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V }, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | ^ | < | > | ~ |Cursor| Mouse| C | T | R | S | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | ! | = | ` | Num | Regex| B | P | L | F | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)}, + {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)}, + {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | K | H | E | A | ? |Cursor| Mouse| | | ( | ) | $ | W | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | J | : | " | I | / | Num | Regex| \ | * | . | P | V | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)}, + {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)}, + {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)}, + {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT }, + }, +#endif diff --git a/keyboards/planck/keymaps/sdothum/colemak.h b/keyboards/planck/keymaps/sdothum/colemak.h new file mode 100644 index 00000000000..b7e9df22c15 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/colemak.h @@ -0,0 +1,125 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .............................................................. Colemak Mod-DH +#ifdef COLEMAK + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | ; | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, + {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O }, + {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | G | ↑Alt | ↑GUI | M | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | D | V | Caps |^Shift| K | H | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + +// ..................................................................... ColemaX +#ifdef COLEMAX + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | ; | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, + {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O }, + {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | R | S | T | B | ↑Alt | ↑GUI | K | N | E | I | O | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | X | V | F | D | P | Caps |^Shift| M | H | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN}, + {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)}, + {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + diff --git a/keyboards/planck/keymaps/sdothum/common/chord_layout.h b/keyboards/planck/keymaps/sdothum/common/chord_layout.h new file mode 100644 index 00000000000..2c785d56ca7 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/chord_layout.h @@ -0,0 +1,41 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// .................................................................. Short Cuts + + // .-----------------------------------------------------------------------------------. + // | | | Copy | Paste| | | | | | | | | + // |--------------------------------------------------------------+------+------+------| + // | Undo | Cut | Copy | Paste| | | | | PRIV | PUB | | | + // |-----------------------------------------------------------------------------------| + // | | | Nak | Eot | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | | f() | | | | | | + // | | | | | | | | f() | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_EDIT] = { + {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______}, + {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______}, + {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______}, + }, + +// ................................................................ Adjust Layer + + // ,-----------------------------------------------------------------------------------. + // |Plover| | | | | | | | | | | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // |Aud on| | | | | | | | | | | | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Reset| | | | | | | | | | | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | | | f() | | | | | f() | | | | + // `-----------------------------------------------------------------------------------' + + [_ADJUST] = { + {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/sdothum/common/init.h b/keyboards/planck/keymaps/sdothum/common/init.h new file mode 100644 index 00000000000..6366a19f65e --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/init.h @@ -0,0 +1,56 @@ + +// ....................................................................... Audio + +void matrix_init_user(void) +{ +#ifdef STENO_ENABLE + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI +#endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif +} + +#ifdef AUDIO_ENABLE +#ifdef BACKLIGHT_ENABLE +void led_set_user(uint8_t usb_led) +{ + static uint8_t old_usb_led = 0; + _delay_ms(10); // gets rid of tick + if (!is_playing_notes()) { + if ((usb_led & (1<event.pressed) { + key_timer = timer_read(); + register_code(modifier); + if (modifier2) { + register_code(modifier2); + } + } + else { + unregister_code(modifier); + if (modifier2) { + unregister_code(modifier2); + } + if (timer_elapsed(key_timer) < TAPPING_TERM) { + shift_key(keycode); + } + key_timer = 0; + } +} + +// ................................................................... Mod Masks + +// tap dance persistant mods, see process_record_user() +// keyboard_report->mods (?) appears to be cleared by tap dance +static uint8_t mods = 0; + +void tap_mods(keyrecord_t *record, uint16_t keycode) +{ + if (record->event.pressed) { + mods |= MOD_BIT(keycode); + } + else { + mods &= ~(MOD_BIT(keycode)); + } +} + +// (un)register modifiers +void modifier(void (*f)(uint8_t)) +{ + if (mods & MOD_BIT(KC_LCTL)) { + (*f)(KC_LCTL); + } + if (mods & MOD_BIT(KC_LGUI)) { + (*f)(KC_LGUI); + } + if (mods & MOD_BIT(KC_LALT)) { + (*f)(KC_LALT); + } +} + +// .................................................... Triple Dance Shift/Layer + +static uint8_t dt_shift = 0; + +void double_shift(uint16_t keycode, uint8_t layer) +{ + tap_key (keycode); + if (DT_SHIFT) { + // set_oneshot_mods(MOD_LSFT); + // layer_on(layer); + layer_on (_SHIFT); + set_oneshot_layer(_SHIFT, ONESHOT_START); + dt_shift = 1; + } + else { + layer_on(layer); + } +} + +// tap dance LT (LAYER, KEY) emulation with -> and auto-repeat extensions! +void tap_shift(qk_tap_dance_state_t *state, uint16_t keycode, uint8_t layer) +{ + // double tap plus down + if (state->count > 2) { + // double enter shift + if (keycode == KC_ENT) { + tap_key (keycode); + double_shift(keycode, layer); + } + // repeating keycode + else { + register_code(keycode); + } + } + // tap plus down (or double tap): keycode (one shot) shift + else if (state->count > 1) { + double_shift(keycode, layer); + } + // down: shift + else if (state->pressed) { + layer_on(layer); + } + // tap: keycode + else { + modifier(register_code); + tap_key (keycode); + modifier(unregister_code); + } +} + +void tap_reset(uint16_t keycode, uint8_t layer) +{ + unregister_code(keycode); + if (DT_SHIFT && dt_shift) { + clear_oneshot_layer_state(ONESHOT_PRESSED); + dt_shift = 0; + } + else { + layer_off(layer); + } +} + +// augment pseudo LT (_RSHIFT, KC_ENT) handling below for rapid sequences +void enter(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_ENT, _RSHIFT); +} + +void enter_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_ENT, _RSHIFT); +} + +// augment pseudo LT (_LSHIFT, KC_SPC) handling below for rapid sequences +void space(qk_tap_dance_state_t *state, void *user_data) +{ + tap_shift(state, KC_SPC, _LSHIFT); +} + +void space_reset(qk_tap_dance_state_t *state, void *user_data) +{ + tap_reset(KC_SPC, _LSHIFT); +} + +// ......................................................... Triple Dance Insert + +void double_max(uint8_t count, uint8_t shift, uint16_t keycode) +{ + if (shift) { + shift_key(keycode); + if (count > 1) { + shift_key(keycode); + } + } + else { + tap_key(keycode); + if (count > 1) { + tap_key(keycode); + } + } +} + +void colon(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_SCLN); + shift_key(KC_SCLN); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_SCLN); + } + reset_tap_dance(state); +} + +void eql(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key(KC_SPC); + tap_key(KC_SLSH); + tap_key(KC_EQL); + tap_key(KC_SPC); + } + else { + double_max(state->count, NOSHIFT, KC_EQL); + } + reset_tap_dance(state); +} + +void greater(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + tap_key (KC_MINS); + shift_key(KC_DOT); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_DOT); + } + reset_tap_dance(state); +} + +void lesser(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_key (KC_SPC); + shift_key(KC_COMM); + tap_key (KC_MINS); + tap_key (KC_SPC); + } + else { + double_max(state->count, SHIFT, KC_COMM); + } + reset_tap_dance(state); +} + +void tilde(qk_tap_dance_state_t *state, void *user_data) +{ + // double tap plus down: repeating keycode + if (state->count > 2) { + register_code(KC_LSFT); + register_code(KC_GRV); + } + // tap: keycode + else { + shift_key(KC_GRV); + // double tap: unix home directory + if (state->count > 1) { + tap_key(KC_SLSH); + } + } +} + +void tilde_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_GRV); + unregister_code(KC_LSFT); +} + +// ............................................................. Tap Dance Pairs + +// tap dance shift rules +#define S_NEVER 0 +#define S_SINGLE 1 +#define S_DOUBLE 2 +#define S_ALWAYS S_SINGLE | S_DOUBLE + +void symbol_pair(uint8_t shift, uint16_t left, uint16_t right) +{ + if (shift & S_DOUBLE) { + shift_key(left); + shift_key(right); + } + else { + tap_key(left); + tap_key(right); + } +} + +#define CLOSE 1 + +// tap dance symbol pairs +void tap_pair(qk_tap_dance_state_t *state, uint8_t shift, uint16_t left, uint16_t right, uint16_t modifier, uint8_t close) +{ + // triple tap: left right with cursor between symbol pair a la vim :-) + if (state->count > 2) { + symbol_pair(shift, left, right); + tap_key (KC_LEFT); + } + // double tap: left right + else if (state->count > 1) { + symbol_pair(shift, left, right); + } + // down: modifier + else if (state->pressed) { + if (modifier) { + register_code(modifier); + } + } + // tap: left (close: right) + else { + if (shift & S_SINGLE) { + shift_key(close ? right : left); + } + else { + tap_key(close ? right : left); + } + } + if (!modifier) { + reset_tap_dance(state); + } +} + +void doublequote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_QUOT, KC_QUOT, 0, 0); +} + +void grave(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_GRV, KC_GRV, 0, 0); +} + +void lbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, 0); +} + +void lcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, 0); +} + +void lparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, KC_LCTL, 0); +} + +void lparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +void quote(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_QUOT, KC_QUOT, 0, 0); +} + +void rangle(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_COMM, KC_DOT, 0, CLOSE); +} + +void rbrace(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_NEVER, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rcurly(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_LBRC, KC_RBRC, 0, CLOSE); +} + +void rparen(qk_tap_dance_state_t *state, void *user_data) +{ + tap_pair(state, S_ALWAYS, KC_9, KC_0, 0, CLOSE); +} + +void rparen_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LCTL); +} + +// ............................................................ Tap Dance Insert + +void comma(qk_tap_dance_state_t *state, void *user_data) +{ + tap_key(KC_COMM); + if (state->count > 1) { + tap_key(KC_SPC); + } + reset_tap_dance(state); +} + +void dot(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + shift_key(KC_COLN); + } + else { + tap_key(KC_DOT); + } + reset_tap_dance(state); +} + +// compile time macro string, see functions/hardware planck script +void private(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { +#ifdef PRIVATE_STRING +#include "private_string.h" +#endif + } + reset_tap_dance(state); +} + +// config.h defined string +void send(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + SEND_STRING(PUBLIC_STRING); + } + reset_tap_dance(state); +} + +// .......................................................... Tap Dance One Shot + +void caps(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + tap_key(KC_CAPS); + } + else { + set_oneshot_mods(MOD_LSFT); + register_code (KC_LSFT); // on hold down + } +} + +void caps_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_code(KC_LSFT); +} + +// ................................................................... Tap Dance + +qk_tap_dance_action_t tap_dance_actions[] = { + [_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, caps_reset) + ,[_COLN] = ACTION_TAP_DANCE_FN (colon) + ,[_COMM] = ACTION_TAP_DANCE_FN (comma) + ,[_DOT] = ACTION_TAP_DANCE_FN (dot) + ,[_DQOT] = ACTION_TAP_DANCE_FN (doublequote) + ,[_ENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, enter, enter_reset) + ,[_EQL] = ACTION_TAP_DANCE_FN (eql) + ,[_GRV] = ACTION_TAP_DANCE_FN (grave) + ,[_GT] = ACTION_TAP_DANCE_FN (greater) + ,[_LBRC] = ACTION_TAP_DANCE_FN (lbrace) + ,[_LCBR] = ACTION_TAP_DANCE_FN (lcurly) + ,[_LPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lparen, lparen_reset) + ,[_LT] = ACTION_TAP_DANCE_FN (lesser) + ,[_PRIV] = ACTION_TAP_DANCE_FN (private) + ,[_QUOT] = ACTION_TAP_DANCE_FN (quote) + ,[_RBRC] = ACTION_TAP_DANCE_FN (rbrace) + ,[_RCBR] = ACTION_TAP_DANCE_FN (rcurly) + ,[_RNGL] = ACTION_TAP_DANCE_FN (rangle) + ,[_RPRN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rparen, rparen_reset) + ,[_SEND] = ACTION_TAP_DANCE_FN (send) + ,[_SPC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, space, space_reset) + ,[_TILD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tilde, tilde_reset) +}; + +// .............................................................. Dynamic Layers + +#define LEFT 1 +#define RIGHT 2 +static uint8_t thumb = 0; + +// LEFT (KC_SPC, S(KC_BSLS)), RIGHT (KC_LEFT, S(KC_LEFT)) opposite thumb combinations, see process_record_user() +// up, up -> _BASE +// up, down -> _SYMBOL +// down, up -> _NUMBER +// down, down -> _MOUSE // see layer keycodes that raise mouse layer +#define THUMBS_DOWN _MOUSE // layer + +static uint8_t overlayer = 0; + +// left right thumb layer combinations +void thumb_layer(keyrecord_t *record, uint8_t side, uint8_t shift, uint16_t keycode, uint8_t thumb_dn_layer, uint8_t thumb_up_layer) +{ + if (record->event.pressed) { + // layer_on via tap_layer(), see process_record_user() + key_timer = timer_read(); + thumb = thumb | side; + } + else { + layer_off(thumb_dn_layer); + // opposite thumb_layer() thumb may have switched effective layer! + if (overlayer) { + layer_off(overlayer); + overlayer = 0; + } + if (!key_press(shift, keycode)) { + layer_off(THUMBS_DOWN); // both thumbs needed + // opposite thumb down? see left right combination layer table above + if (thumb & (side == LEFT ? RIGHT : LEFT)) { + layer_on(thumb_up_layer); + overlayer = thumb_up_layer; + } + } + clear_mods(); + thumb = thumb & ~side; + key_timer = 0; + } +} + +// #ifdef STENO_ENABLE +// // LT for steno keycode +// void stn_layer(keyrecord_t *record, uint16_t keycode, uint8_t layer) +// { +// if (record->event.pressed) { +// key_timer = timer_read(); +// if (keycode) { +// process_steno(keycode, record); +// } +// layer_on(layer); +// } +// else { +// layer_off(layer); +// if (keycode) { +// if (timer_elapsed(key_timer) < TAPPING_TERM) { +// process_steno(keycode, record); +// } +// else { +// // clear pressed state (request push of updated) process_steno.c and .h +// // steno_clear_state(); +// } +// } +// key_timer = 0; +// } +// } +// #endif + +// LT for S(keycode) +void lt_shift(keyrecord_t *record, uint16_t keycode, uint8_t layer) +{ + if (record->event.pressed) { + key_timer = timer_read(); + layer_on(layer); + } + else { + layer_off(layer); + // for shifted keycodes, hence, LT_SHIFT + key_press(SHIFT, keycode); + clear_mods(); + key_timer = 0; + } +} + +// set layer asap to overcome macro latency errors, notably tap dance and LT usage +// this routine inexplicably (?) sets layer_on() faster than can be done in thumb_layer() +void tap_layer(keyrecord_t *record, uint8_t layer) +{ + if (record->event.pressed) { + layer_on(layer); + } + else { + layer_off(layer); + } +} + +// ..................................................................... Keymaps + +// void persistant_default_layer_set(uint16_t default_layer) +// { +// eeconfig_update_default_layer(default_layer); +// default_layer_set (default_layer); +// } + +void clear_layers(void) +{ + uint8_t layer; + for (layer = 0; layer < _END_LAYERS; layer++) { + layer_off(layer); + } +} + +#ifdef CENTER_TT +static uint16_t tt_keycode = 0; // current TT keycode + +void clear_tt(void) +{ + if (tt_keycode == KC_CAPS) { + tap_key(KC_CAPS); // clear capslock + } + tt_keycode = 0; + clear_layers(); + set_single_persistent_default_layer(_BASE); +} +#endif + +// txbolt plover run state +static uint8_t plover = 0; + +void base_layer(void) +{ +#ifdef AUDIO_ENABLE + if (plover) { + PLAY_SONG(song_plover_gb); + } + else { + PLAY_SONG(song_qwerty); + } +#endif + clear_layers(); + set_single_persistent_default_layer(_BASE); +} + +void toggle_plover(uint8_t state) +{ + if (plover != state) { +#ifdef PLOVER_KEYBIND +#include "plover_keybind.h" +#endif + plover = state; + } +} + +void steno(keyrecord_t *record) +{ + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_plover); +#endif + clear_layers(); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + if (!plover) { + toggle_plover(1); + } + } +} + +void steno_exit(keyrecord_t *record) +{ + if (record->event.pressed) { + base_layer(); + toggle_plover(0); + } +} diff --git a/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h new file mode 100644 index 00000000000..4824b82a070 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h @@ -0,0 +1,87 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer +#ifdef SHIFT_SYMBOLS + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | Ctrl | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, +#else + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | Ctrl | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | X | G | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | 0 | = | | | | + // | | | | f() | | | | = | 0 | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___}, +#else + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___}, +#endif + }, + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | { | & | ? | : | } | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | ( | $ | % | ^ | ) | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | [ | < | ~ | > | ] | + // |-----------------------------------------------------------------------------------| + // | | | | f() | | | | \ | | | | | | + // '-----------------------------------------------------------------------------------' + + [_NUMSYM] = { + {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR}, + {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN}, + {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC}, + {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___}, + }, +#endif + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | | | | | f() | | + | | | | | + // | | | | | f() | | | + | | | | | see _PLOVER + // '-----------------------------------------------------------------------------------' + + [_FNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______}, + }, + diff --git a/keyboards/planck/keymaps/sdothum/common/plover_keybind.h b/keyboards/planck/keymaps/sdothum/common/plover_keybind.h new file mode 100644 index 00000000000..88ec727bfd6 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/plover_keybind.h @@ -0,0 +1,7 @@ + +// simple window manager specific plover keybind hook + +// toggle plover application, see herbstluftwm/config/appbinds +register_code (KC_LGUI); +shift_key (KC_RGHT); +unregister_code(KC_LGUI); diff --git a/keyboards/planck/keymaps/sdothum/common/sounds.h b/keyboards/planck/keymaps/sdothum/common/sounds.h new file mode 100644 index 00000000000..1bfc7a6da0c --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/sounds.h @@ -0,0 +1,14 @@ + +// ................................................................ Audio Sounds + +#ifdef AUDIO_ENABLE +float song_startup [][2] = SONG(STARTUP_SOUND); +float song_colemak [][2] = SONG(COLEMAK_SOUND); +float song_qwerty [][2] = SONG(QWERTY_SOUND); +float song_plover [][2] = SONG(PLOVER_SOUND); +float song_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float song_caps_on [][2] = SONG(CAPS_LOCK_ON_SOUND); +float song_caps_off [][2] = SONG(CAPS_LOCK_OFF_SOUND); +float music_scale [][2] = SONG(MUSIC_SCALE_SOUND); +float song_goodbye [][2] = SONG(GOODBYE_SOUND); +#endif diff --git a/keyboards/planck/keymaps/sdothum/common/steno_layout.h b/keyboards/planck/keymaps/sdothum/common/steno_layout.h new file mode 100644 index 00000000000..ab4a6fe011c --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/steno_layout.h @@ -0,0 +1,39 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Plover +#ifdef STENO_ENABLE + // ,-----------------------------------------------------------------------------------. + // | # | # | # | # | # | # | # | # | # | # | # | # | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______}, + }, +#else + // ,-----------------------------------------------------------------------------------. + // | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | Base | S | T | P | H | * | * | F | P | L | T | D | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Base | S | K | W | R | * | * | R | B | G | S | Z | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | A | O | E | U | | + // `-----------------------------------------------------------------------------------' + + [_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 }, + {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______}, + }, +#endif diff --git a/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h new file mode 100644 index 00000000000..2edfe1a04a5 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h @@ -0,0 +1,75 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ..................................................... Symbol Navigation Layer +#ifdef SHIFT_SYMBOLS + // .-----------------------------------------------------------------------------------. + // | | ~ | * | & | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | Ctrl | ^ | % | $ | | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | # | @ | ! | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | |Adjust| \ | | | | f() | | | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_CTL, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, +#else + // .-----------------------------------------------------------------------------------. + // | { | . | * | & | } | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | ( | ^ | % | $ | ) | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | [ | # | @ | ! | ] | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | \ | | | | f() | | | | + // '-----------------------------------------------------------------------------------' + + [_SYMBOL] = { + {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN}, + {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, + + // .-----------------------------------------------------------------------------------. + // | | ? | + | ~ | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | < | = | > | | | | | f() | | | | + // |-----------------------------------------------------------------------------------| + // | | 3 | 2 | 1 | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | f() | | | | + // '-----------------------------------------------------------------------------------' + + [_SYMREG] = { + {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___}, + {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___}, + {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______}, + {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___}, + }, +#endif + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | | | | f() | | | | f() | | | | + // '-----------------------------------------------------------------------------------' + + [_MOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/sdothum/common/tapdance.h b/keyboards/planck/keymaps/sdothum/common/tapdance.h new file mode 100644 index 00000000000..d778286bf1e --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/tapdance.h @@ -0,0 +1,49 @@ + +// tap dance keys +enum tap_dance { + _CAPS = 0 + ,_COLN + ,_COMM + ,_DOT + ,_DQOT + ,_ENT + ,_EQL + ,_GRV + ,_GT + ,_LBRC + ,_LCBR + ,_LPRN + ,_LT + ,_PRIV + ,_QUOT + ,_RBRC + ,_RCBR + ,_RNGL + ,_RPRN + ,_SEND + ,_SPC + ,_TILD +}; + +#define TD_CAPS TD(_CAPS) +#define TD_COLN TD(_COLN) +#define TD_COMM TD(_COMM) +#define TD_DOT TD(_DOT) +#define TD_DQOT TD(_DQOT) +#define TD_ENT TD(_ENT) +#define TD_EQL TD(_EQL) +#define TD_GRV TD(_GRV) +#define TD_GT TD(_GT) +#define TD_LBRC TD(_LBRC) +#define TD_LCBR TD(_LCBR) +#define TD_LPRN TD(_LPRN) +#define TD_LT TD(_LT) +#define TD_PRIV TD(_PRIV) // compile time macro string, provided in private_string.h +#define TD_QUOT TD(_QUOT) +#define TD_RBRC TD(_RBRC) +#define TD_RCBR TD(_RCBR) +#define TD_RNGL TD(_RNGL) +#define TD_RPRN TD(_RPRN) +#define TD_SEND TD(_SEND) // config.h defined macro string +#define TD_SPC TD(_SPC) // see process_record_user() for extended handling of Spc +#define TD_TILD TD(_TILD) diff --git a/keyboards/planck/keymaps/sdothum/common/toggle_layout.h b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h new file mode 100644 index 00000000000..504a1ff579e --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h @@ -0,0 +1,102 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ......................................................... Number Keypad Layer + + // .-----------------------------------------------------------------------------------. + // | | F | E | D | | | | / | 7 | 8 | 9 | * | + // |-----------------------------------------------------------------------------------| + // | Ctrl | C | B | A | | | | . | 4 | 5 | 6 | - | + // |-----------------------------------------------------------------------------------| + // | | # | G | \ | | | | , | 1 | 2 | 3 | + | + // |-----------------------------------------------------------------------------------| + // | | f() | Space| 0 | = | | + // | | f() | Space| = | 0 | | + // '-----------------------------------------------------------------------------------' + + [_TTNUMBER] = { + {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR}, + {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS}, + {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS}, +#ifdef THUMB_0 + {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_0, LT_EQL, _______, _______, _______, _______}, +#else + {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_EQL, LT_0, _______, _______, _______, _______}, +#endif + }, + +// ............ .................................................. Function Keys + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | F7 | F8 | F9 | F12 | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | F4 | F5 | F6 | F11 | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | F1 | F2 | F3 | F10 | + // |-----------------------------------------------------------------------------------| + // | | f() | | + | | | + // '-----------------------------------------------------------------------------------' + + [_TTFNCKEY] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 }, + {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 }, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 }, + {_______, _______, _______, _______, TT_ESC, _______, KC_PLUS, _______, _______, _______, _______, _______}, + }, + +// ....................................................................... Regex + + // ,-----------------------------------------------------------------------------------. + // | | ~ | { | } | & | | | % | [ | ] | @ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | ^ | < | > | ? | | | | | ( | ) | $ | | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | | : | ! | = | / | | | \ | * | . | # | | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | | f() | - | + | Space| | + // `-----------------------------------------------------------------------------------' + + [_TTREGEX] = { + {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___}, + {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___}, + {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___}, + {_______, _______, _______, _______, TT_ESC, KC_MINS, KC_PLUS, KC_SPC, _______, _______, _______, _______}, + }, + +// ............................................................ Navigation Layer + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Home | Up | End | PgUp | + // |-----------------------------------------------------------------------------------| + // | Ctrl | GUI | Alt | Shift| | | | | Left | Down | Right| PgDn | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | f() | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTCURSOR] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______}, + }, + +// ............................................................... Mouse Actions + + // .-----------------------------------------------------------------------------------. + // | | | | | | | | | Left | Up | Right| Up | + // |-----------------------------------------------------------------------------------| + // | | Btn3 | Btn2 | Btn1 | | | | | Left | Down | Right| Down | + // |-----------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // |-----------------------------------------------------------------------------------| + // | | f() | | | | | + // '-----------------------------------------------------------------------------------' + + [_TTMOUSE] = { + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U}, + {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D}, + {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______}, + }, diff --git a/keyboards/planck/keymaps/sdothum/config.h b/keyboards/planck/keymaps/sdothum/config.h new file mode 100644 index 00000000000..4b2cdeece17 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/config.h @@ -0,0 +1,50 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// required because lower/raise modifiers are redefined by colemak-dh +#define PREVENT_STUCK_MODIFIERS + +// tap dance key press termination interval +#define TAPPING_TERM 250 + +// smooth mouse motion +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 7 +// #define MOUSEKEY_WHEEL_DELAY 0 + +// compile time macro string, see functions/hardware planck script (undefine otherwise) +#define PRIVATE_STRING + +// compile time macro string, must be in quotes +#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n" + +// thumb key tap-shift() double tap: one shot shift (0) off (1) on +#define DT_SHIFT 1 + +// number layer 0 position KEYPAD_0, THUMB_0 +#define THUMB_0 + +// home block shift symbol clustes defined (no overlays required for extended symbols, undefine otherwise) +#define SHIFT_SYMBOLS + +// center column TT assignments (undefine for OSM chords) +#define CENTER_TT +#define TAPPING_TOGGLE 1 + +// home row modifiers +#define HOME_MODS +// fix dual function timing +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +// layout ADNW*, BEAKL*, COLEKA*, QWERTY (default) +#define BEAKLSP + +// sync app with window manager keybind hook defined in plover_keybind.h +#define PLOVER_KEYBIND + +#endif diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c new file mode 100644 index 00000000000..ac509c41dc9 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/keymap.c @@ -0,0 +1,480 @@ +// 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. +// +// To flash planck firmware +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// Reset keyboard or press hw reset button on base (hole) +// +// cd qmk_firmware/keyboards/planck +// sudo make KEYMAP=sdothum dfu +// +// sudo make clean (good practice before flashing) +// sudo make KEYMAP=sdothum (to compile check) +// +// Package requirements (for arch linux) +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// avr-gcc-atmel +// avr-libc-atmel +// dfu-programmer +// +// Notes +// ▔▔▔▔▔ +// ** E R G O W I D E S P L I T ** Layout +// +// Autocompletion tap dance key pairs (),[],{} are available from the +// number/symbol layer, as well as, numerous (un)shift key values +// +// The navigation pad provides a single hand right thumb activated cluster +// with left hand modifiers +// +// #define PRIVATE_STRING includes private_string.h, a user defined code +// block for the PRIV tap dance e.g. SEND_STRING("secret messape"), +// see function private() +// +// Modifier clusters +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// The num and sym keys together access the navigation pad layer +// +// ,-----------------------------------------------------------------------------------. +// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| +// `-----------------------------------------------------------------------------------' +// +// Hint +// ▔▔▔▔ +// For sculpted keycaps such as Cherry or OEM profile, reverse the Alt, Num, +// Shift, Shift, Nav, Sym keycaps for more ergonomic thumb orientation and +// actuation +// +// Code +// ▔▔▔▔ +// This source is shamelessly based on the "default" planck layout +// +// #ifdef/#endif block structures are not indented, as syntax highlighting +// in vim is sufficient for identification +// +// c++ commenting style is used throughout +// +// Change history +// ▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +// See http://thedarnedestthing.com/planck%20constant +// See http://thedarnedestthing.com/planck%20done + + + +// === N O T E === +// +// sudo CPATH=/common make ... + + +#include "config.h" +#include "planck.h" +#include "action_layer.h" +#ifdef STENO_ENABLE +#include "keymap_steno.h" +#endif +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE = 0 + ,_SHIFT + ,_LSHIFT + ,_RSHIFT + ,_PLOVER + ,_NUMBER + ,_SYMBOL + ,_FNCKEY + ,_MOUSE +#ifdef CENTER_TT + ,_TTNUMBER + ,_TTREGEX + ,_TTFNCKEY + ,_TTCURSOR + ,_TTMOUSE +#endif +#ifndef SHIFT_SYMBOLS + ,_NUMSYM + ,_SYMREG +#endif + ,_EDIT + ,_QWERTY + ,_ADJUST + ,_END_LAYERS +}; + +enum planck_keycodes { + BASE = SAFE_RANGE + ,BASE1 + ,BASE2 + ,PLOVER + ,PLOEXIT + ,SM_CIRC // pseudo GUI_T(S(KC_6)) for shifted key-codes, see process_record_user() + ,SM_DLR // pseudo SFT_T(S(KC_4)) for shifted key-codes, see process_record_user() + ,SM_G // pseudo MT (MOD_LALT | MOD_LSFT, S(KC_G)) for shifted key-codes, see process_record_user() + ,SM_PERC // pseudo ALT_T(S(KC_5)) for shifted key-codes, see process_record_user() + ,SM_LPRN // pseudo CTL_T(S(KC_9)) for shifted key-codes, see process_record_user() + ,SL_LEFT // pseudo LT (_MOUSE, S(KC_LEFT)) for shifted key-codes, see process_record_user() + ,SP_DEL // pseudo LT (_MOUSE, KC_DEL) for shifted key-codes, see process_record_user() + ,SL_PIPE // pseudo LT (_ADJUST, S(KC_BSLS)) for shifted key-codes, see process_record_user() + ,SL_TAB // pseudo LT (_FNCKEY, S(KC_TAB)) for shifted key-codes, see process_record_user() +#ifdef CENTER_TT + ,TT_ESC +#endif +#ifdef STENO_ENABLE + ,PS_STNA = STN_A + ,PS_STNO = STN_O + ,PS_STNE = STN_E + ,PS_STNU = STN_U +#else + ,LT_C = LT (_NUMBER, KC_C) + ,LT_V = LT (_FNCKEY, KC_V) + ,LT_N = LT (_EDIT, KC_N) + ,LT_M = LT (_SYMBOL, KC_M) +#endif + ,PS_BASE +}; + +// modifier keys +#define AT_B ALT_T(KC_B) +#define AT_DOWN ALT_T(KC_DOWN) +#define CT_RGHT CTL_T(KC_RGHT) +#define GT_C GUI_T(KC_C) +#define GT_UP GUI_T(KC_UP) +#define MT_E MT (MOD_LCTL | MOD_LALT, KC_E) +#define MT_X MT (MOD_LALT | MOD_LSFT, KC_X) +#define ST_A SFT_T(KC_A) +#ifdef HOME_MODS +#define HOME_K CTL_T(KC_K) +#define HOME_H GUI_T(KC_H) +#define HOME_E ALT_T(KC_E) +#define HOME_A SFT_T(KC_A) +#if defined(BEAKLMU) || defined(BEAKLSP) +#define HOME_T SFT_T(KC_T) +#define HOME_R ALT_T(KC_R) +#define HOME_S GUI_T(KC_S) +#define HOME_W CTL_T(KC_W) +#else +#define HOME_T SFT_T(KC_T) +#define HOME_S ALT_T(KC_S) +#define HOME_N GUI_T(KC_N) +#define HOME_B CTL_T(KC_B) +#endif +#else +#define HOME_K KC_K +#define HOME_H KC_H +#define HOME_E KC_E +#define HOME_A KC_A +#define HOME_T KC_T +#define HOME_S KC_S +#define HOME_N KC_N +#define HOME_B KC_B +#endif + +#define S_DOWN S (KC_DOWN) +#define S_LEFT S (KC_LEFT) +#define S_RGHT S (KC_RGHT) +#define S_TAB S (KC_TAB) +#define S_UP S (KC_UP) + +#include "tapdance.h" + +// keycodes +#define ___x___ KC_TRNS +#define ___fn__ KC_TRNS +#ifdef _______ +#undef _______ +#endif +#define _______ KC_NO + +#define COPY LCTL(KC_C) +#define CUT LCTL(KC_X) +#define EOT LCTL(KC_D) +#define NAK LCTL(KC_U) +#define PASTE LCTL(KC_V) +#define UNDO LCTL(KC_Z) +#define TMCOPY LALT(LCTL(KC_C)) +#define TMPASTE LALT(LCTL(KC_V)) +#define LT_BSLS LT (_MOUSE, KC_BSLS) // see process_record_user() for extended handling +#define LT_BSPC LT (_EDIT, KC_BSPC) +#define SP_LEFT LT (_EDIT, KC_LEFT) +#define LT_ESC LT (_NUMBER, KC_ESC) +#define LT_LEFT LT (_SYMBOL, KC_LEFT) // see process_record_user() for extended handling +#define SP_BSPC LT (_SYMBOL, KC_BSPC) // see process_record_user() for extended handling +#define LT_TAB LT (_FNCKEY, KC_TAB) +#define LT_INS LT (_FNCKEY, KC_INS) +#define LT_ALTG LT (_FNCKEY, KC_RALT) +#define ADJUST MO (_ADJUST) +#define OS_ALT OSM (MOD_LALT) +#define OS_CTL OSM (MOD_LCTL) +#define OS_GUI OSM (MOD_LGUI) +#define OS_SFT OSM (MOD_LSFT) +#define OS_CALT OSM (MOD_LALT | MOD_LCTL) +#define OS_CGUI OSM (MOD_LGUI | MOD_LCTL) +#define OS_CSFT OSM (MOD_LSFT | MOD_LCTL) +#define OS_SALT OSM (MOD_LALT | MOD_LSFT) +#define OS_SGUI OSM (MOD_LGUI | MOD_LSFT) + +#ifdef CENTER_TT +#ifdef BEAKLSP +#define CNTR_TL OSM (MOD_LSFT) +#else +#define CNTR_TL TT (_TTFNCKEY) +#endif +#define CNTR_TR KC_CAPS +#define CNTR_HL TT (_TTCURSOR) +#define CNTR_HR TT (_TTMOUSE) +#define CNTR_BL TT (_TTNUMBER) +#define CNTR_BR TT (_TTREGEX) +#else +#define CNTR_TL OSM (MOD_LALT | MOD_LCTL) +#define CNTR_TR OSM (MOD_LGUI | MOD_LCTL) +#define CNTR_HL OSM (MOD_LALT | MOD_LSFT) +#define CNTR_HR OSM (MOD_LGUI | MOD_LSFT) +#define CNTR_BL TD (_CAPS) +#define CNTR_BR OSM (MOD_LSFT | MOD_LCTL) +#endif + +#ifdef THUMB_0 +#define LT_EQL LT (_ADJUST, KC_EQL) +#else +#define LT_0 LT (_ADJUST, KC_0) +#endif +#ifndef SHIFT_SYMBOLS +#define LT_A LT (_NUMSYM, KC_A) +#define LT_LFTX LT (_SYMREG, KC_LEFT) +#endif + +// ........................................................ Default Alpha Layout + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#include "beakl.h" +#include "colemak.h" +#include "qwerty.h" +#include "steno_layout.h" + +// ...................................................... Number / Function Keys + +#include "number_fkey_layout.h" + +// ......................................................... Symbol / Navigation + +#include "symbol_guifn_layout.h" + +// ............................................................... Toggle Layers + +#ifdef CENTER_TT +#include "toggle_layout.h" +#endif + +// ......................................................... Short Cuts / Adjust + +#include "chord_layout.h" + +}; + +// ...................................................................... Sounds + +#include "sounds.h" + +// ........................................................... User Keycode Trap + +#include "keycode_functions.h" + +#define BASE_1 1 +#define BASE_2 2 +#define BASE_12 3 +static uint8_t base_n = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) { + case BASE1: + if (record->event.pressed) { + base_n = base_n | BASE_1; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_1; + } + return false; + case BASE2: + if (record->event.pressed) { + base_n = base_n | BASE_2; + if (base_n == BASE_12) { + base_layer(); + } + } + else { + base_n = base_n & ~BASE_2; + } + return false; + case AT_DOWN: +#ifdef HOME_MODS + case HOME_E: +#if defined(BEAKLMU) || defined(BEAKLSP) + case HOME_R: +#else + case HOME_S: +#endif +#endif + tap_mods(record, KC_LALT); + break; + case CT_RGHT: +#ifdef HOME_MODS + case HOME_K: +#if defined(BEAKLMU) || defined(BEAKLSP) + case HOME_W: +#else + case HOME_B: +#endif +#endif + tap_mods(record, KC_LCTL); + break; + case GT_UP: +#ifdef HOME_MODS + case HOME_H: +#if defined(BEAKLMU) || defined(BEAKLSP) + case HOME_S: +#else + case HOME_N: +#endif +#endif + tap_mods(record, KC_LGUI); + break; +#ifdef HOME_MODS + case HOME_A: + case HOME_T: + tap_mods(record, KC_LSFT); + break; +#endif +#ifdef CENTER_TT + case TT_ESC: + clear_tt(); // exit TT layer + return false; +#endif + case LT_ESC: +#ifdef CENTER_TT + if (tt_keycode != 0) { + clear_tt(); // exit TT layer + return false; + } +#endif + tap_layer(record, _NUMBER); + break; + case LT_LEFT: + case SP_BSPC: + tap_layer(record, _SYMBOL); + // LT (_SYMBOL, KC_LEFT) left right combination layer + thumb_layer(record, RIGHT, 0, 0, _SYMBOL, _LSHIFT); + break; + case OS_ALT: + tap_mods(record, KC_LALT); + break; + case OS_CTL: + tap_mods(record, KC_LCTL); + break; + case OS_GUI: + tap_mods(record, KC_LGUI); + break; + case SM_CIRC: + // GUI_T(S(KC_6)) + mt_shift(record, KC_LGUI, 0, KC_6); + break; + case SM_DLR: + // SFT_T(S(KC_4)) + mt_shift(record, KC_LSFT, 0, KC_4); + break; + case SM_G: + // MT(MOD_LALT | MOD_LSFT, S(KC_G)) + mt_shift(record, KC_LALT, KC_LSFT, KC_G); + break; + case SM_LPRN: + // CTL_T(S(KC_9)) + mt_shift(record, KC_LCTL, 0, KC_9); + break; + case SM_PERC: + // ALT_T(S(KC_5)) + mt_shift(record, KC_LALT, 0, KC_5); + break; + case LT_BSLS: + tap_layer(record, _MOUSE); + // LT (_MOUSE, KC_BSLS) left right combination layer, see #define LT_BSLS + thumb_layer(record, LEFT, 0, 0, _MOUSE, _SYMBOL); + break; + case SL_LEFT: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, SHIFT, KC_LEFT, _MOUSE, _LSHIFT); + break; + case SP_DEL: + tap_layer(record, _MOUSE); + // LT (_MOUSE, S(KC_LEFT)) left right combination layer + thumb_layer(record, RIGHT, NOSHIFT, KC_DEL, _MOUSE, _LSHIFT); + break; + case SL_PIPE: + // LT (_ADJUST, S(KC_BSLS)) emulation + lt_shift(record, KC_BSLS, _ADJUST); + break; + case SL_TAB: + // LT (_FNCKEY, S(KC_TAB)) emulation + lt_shift(record, KC_TAB, _FNCKEY); + break; + case TD_ENT: + tap_layer(record, _RSHIFT); + // LT (_RSHIFT, KC_ENT) emulation, see tap dance enter + break; + case TD_SPC: + tap_layer(record, _LSHIFT); + // LT (_LSHIFT, KC_SPC) left right combination layer, see tap dance TD_SPC + thumb_layer(record, LEFT, 0, 0, _LSHIFT, _SYMBOL); + break; +#ifdef CENTER_TT + case CNTR_TL: + case CNTR_TR: + case CNTR_HL: + case CNTR_HR: + case CNTR_BL: + case CNTR_BR: + if (tt_keycode != keycode && tt_keycode != 0) { + clear_tt(); // return to base layer first if different TT layer selected + } + tt_keycode = keycode; + break; +#endif +// #ifdef STENO_ENABLE +// case PS_STNA: +// stn_layer(record, STN_A, _NUMBER); +// break; +// case PS_STNO: +// stn_layer(record, STN_O, _FNCKEY); +// break; +// case PS_STNE: +// stn_layer(record, STN_E, _EDIT); +// break; +// case PS_STNU: +// stn_layer(record, STN_U, _SYMBOL); +// break; +// #endif + case PS_BASE: + if (record->event.pressed) { + base_layer(); + } + return false; + case PLOVER: + steno(record); + return false; + case PLOEXIT: + steno_exit(record); + return false; + } + return true; +} + +#include "init.h" diff --git a/keyboards/planck/keymaps/sdothum/qwerty.h b/keyboards/planck/keymaps/sdothum/qwerty.h new file mode 100644 index 00000000000..d11d0478b3f --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/qwerty.h @@ -0,0 +1,64 @@ + +// const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ...................................................................... Qwerty +#ifdef QWERTY + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | ; | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | , | . | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_BASE] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + [_SHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT}, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | / | ? | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_LSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, + + // ,-----------------------------------------------------------------------------------. + // | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P | + // |------+------+------+------+------+-------------+------+------+------+------+------| + // | A | S | D | F | G | ↑Alt | ↑GUI | H | J | K | L | : | + // |------+------+------+------+------+------|------+------+------+------+------+------| + // | Z | X | C | V | B | Caps |^Shift| N | M | ~ | ` | " | + // |------+------+------+------+------+------+------+------+------+------+------+------| + // | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right| + // `-----------------------------------------------------------------------------------' + + [_RSHIFT] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)}, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT}, + {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT }, + }, +#endif + diff --git a/keyboards/planck/keymaps/sdothum/readme.md b/keyboards/planck/keymaps/sdothum/readme.md new file mode 100644 index 00000000000..58f73e3b445 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/readme.md @@ -0,0 +1,10 @@ +# The sdothum extended Default Planck Layout + +- Colemak-DH layout layer with shift/tab key overlays +- Number and symbol/function key layer +- Hexadecimal keypad layer +- Navigation keypad layer +- Dynamic macro layer +- Autocompletion tap key pairs (),[],{} +- Normalized enter and esc key position across keyboard layers +- Extensive use of tap keys diff --git a/keyboards/planck/keymaps/sdothum/rules.mk b/keyboards/planck/keymaps/sdothum/rules.mk new file mode 100644 index 00000000000..40f153844c1 --- /dev/null +++ b/keyboards/planck/keymaps/sdothum/rules.mk @@ -0,0 +1,26 @@ +# 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 = no # 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 +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. +STENO_ENABLE = yes # enable TX Bolt protocol, requires VIRTSER and may not work with mouse keys + +# do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend + +TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} + +ifndef QUANTUM_DIR +include ../../../../Makefile +endif diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index 71c924904d6..17c015ed0fd 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -24,5 +24,22 @@ #define NO_USB_STARTUP_CHECK +#define PLANCK_MIT_LAYOUT -#endif \ No newline at end of file +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 25 +#define DRIVER_2_LED_TOTAL 24 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + + +#endif diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 96261616c3c..cef57c5e69f 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -1,5 +1,4 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert +/* Copyright 2017 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 @@ -17,6 +16,127 @@ #include "light.h" +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_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_11, C2_11, C3_11}, + {1, C1_12, C2_12, C3_12}, + {1, C1_13, C2_13, C3_13}, + + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + {1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_9, C8_9, C7_9}, + {0, C9_10, C8_10, C7_10}, + {0, C9_11, C8_11, C7_11}, + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_9, C8_9, C7_9}, + {1, C9_10, C8_10, C7_10}, + {1, C9_11, C8_11, C7_11}, + + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_12, C8_12, C7_12}, + {0, C9_13, C8_13, C7_13}, + {0, C9_14, C8_14, C7_14}, + {0, C9_15, C8_15, C6_14}, // middle 2u switch + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_12, C8_12, C7_12}, + {1, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14} +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + + /*{row | col << 4} + | {x=0..224, y=0..64} + | | modifier + | | | */ + {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, + {{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, + {{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, + {{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, + {{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, + {{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, + {{0|(6<<4)}, {20.36*6, 21.33*0}, 0}, + {{0|(7<<4)}, {20.36*7, 21.33*0}, 0}, + {{0|(8<<4)}, {20.36*8, 21.33*0}, 0}, + {{0|(9<<4)}, {20.36*9, 21.33*0}, 0}, + {{0|(10<<4)}, {20.36*10,21.33*0}, 0}, + {{0|(11<<4)}, {20.36*11,21.33*0}, 1}, + + {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, + {{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, + {{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, + {{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, + {{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, + {{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, + {{1|(6<<4)}, {20.36*6, 21.33*1}, 0}, + {{1|(7<<4)}, {20.36*7, 21.33*1}, 0}, + {{1|(8<<4)}, {20.36*8, 21.33*1}, 0}, + {{1|(9<<4)}, {20.36*9, 21.33*1}, 0}, + {{1|(10<<4)}, {20.36*10,21.33*1}, 0}, + {{1|(11<<4)}, {20.36*11,21.33*1}, 1}, + + {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, + {{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, + {{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, + {{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, + {{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, + {{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, + {{2|(6<<4)}, {20.36*6, 21.33*2}, 0}, + {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, + {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, + {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, + {{2|(10<<4)}, {20.36*10,21.33*2}, 0}, + {{2|(11<<4)}, {20.36*11,21.33*2}, 1}, + + {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, + {{3|(1<<4)}, {20.36*1, 21.33*3}, 1}, + {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, + {{3|(3<<4)}, {20.36*3, 21.33*3}, 1}, + {{3|(4<<4)}, {20.36*4, 21.33*3}, 1}, + {{3|(5<<4)}, {20.36*5, 21.33*3}, 0}, + {{3|(5<<4)}, {20.36*5.5,21.33*3}, 0}, + {{3|(6<<4)}, {20.36*6, 21.33*3}, 0}, + {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, + {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, + {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, + {{3|(10<<4)}, {20.36*10,21.33*3}, 1}, + {{3|(11<<4)}, {20.36*11,21.33*3}, 1} +}; + void matrix_init_kb(void) { // Turn status LED on @@ -27,13 +147,22 @@ void matrix_init_kb(void) { } bool process_record_kb(uint16_t keycode, keyrecord_t *record) -{ +{ return process_record_user(keycode, record); } -uint16_t backlight_task_counter = 0; - void matrix_scan_kb(void) { matrix_scan_user(); -} \ No newline at end of file +} + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} + diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h index 111f1986543..a395f30e887 100644 --- a/keyboards/planck/light/light.h +++ b/keyboards/planck/light/light.h @@ -1,5 +1,4 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert +/* Copyright 2017 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 @@ -19,5 +18,6 @@ #define LIGHT_H #include "planck.h" +#include "rgb_matrix.h" #endif \ No newline at end of file diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index 3d7006b526c..c10b8fd1da5 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -1,7 +1,5 @@ MIDI_ENABLE = yes AUDIO_ENABLE = yes # Audio output on port C6 -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -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 +RGB_MATRIX_ENABLE = yes MCU = at90usb1286 \ No newline at end of file diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index 511c06d7086..e194dcd5111 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk @@ -48,7 +48,7 @@ ifeq ($(strip $(KEYBOARD)), planck/rev5) BOOTLOADER = qmk-dfu endif ifeq ($(strip $(KEYBOARD)), planck/light) - BOOTLOADER = qmk-dfu + BOOTLOADER = atmel-dfu endif # Interrupt driven control endpoint task(+60) diff --git a/keyboards/preonic/keymaps/fig-r/config.h b/keyboards/preonic/keymaps/fig-r/config.h new file mode 100644 index 00000000000..dc3a7ba261b --- /dev/null +++ b/keyboards/preonic/keymaps/fig-r/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#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 + +#endif diff --git a/keyboards/preonic/keymaps/fig-r/keymap.c b/keyboards/preonic/keymaps/fig-r/keymap.c new file mode 100644 index 00000000000..86c87b0aca1 --- /dev/null +++ b/keyboards/preonic/keymaps/fig-r/keymap.c @@ -0,0 +1,210 @@ +/* Copyright 2015-2017 Fig + * + * 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 preonic_layers { + _DVORAK, + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, + _COMMAND +}; + +enum preonic_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + COMMAND +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Cmd | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = 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_DEL, \ + 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, \ + COMMAND, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Cmd | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = 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_DEL, \ + 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, \ + COMMAND, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | |CtrlS |CtrlY |CtrlZ | | | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |CtrlX |CtrlC |CtrlV | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home | Down | Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = 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, \ + 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_GRV, _______, LCTL(KC_S), LCTL(KC_Y), LCTL(KC_Z), _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = 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, \ + 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_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset |Debug | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |MusMod|AudOn |AudOff|AGNorm|AGSwap|Qwerty|Dvorak| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|MusOn |MusOff|MidOn |MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Cmd +* ,-----------------------------------------------------------------------------------. +* | | | | | | | | | | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | | | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | | | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | | | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------' + */ +[_COMMAND] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + 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 COMMAND: + if (record->event.pressed) { + layer_on(_COMMAND); + } else { + layer_off(_COMMAND); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/preonic/keymaps/fig-r/readme.md b/keyboards/preonic/keymaps/fig-r/readme.md new file mode 100644 index 00000000000..16d752b79db --- /dev/null +++ b/keyboards/preonic/keymaps/fig-r/readme.md @@ -0,0 +1,9 @@ +# Fig-r Preonic layout. + +Not designed! + +Version 1: + +Use Dvorak layout by default. + +_COMMAND layout is to work with sxhkd. diff --git a/keyboards/preonic/keymaps/fig-r/rules.mk b/keyboards/preonic/keymaps/fig-r/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program index 298e645477d..b777b911066 100755 --- a/keyboards/ps2avrGB/program +++ b/keyboards/ps2avrGB/program @@ -73,7 +73,7 @@ if len(sys.argv) < 2: kb = checkForKeyboardInNormalMode() if kb is not None: - print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='') + print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') sendDeviceToBootloaderMode(kb) print(' done.') print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") diff --git a/keyboards/rama/m6_a/info.json b/keyboards/rama/m6_a/info.json new file mode 100644 index 00000000000..28dd733dac2 --- /dev/null +++ b/keyboards/rama/m6_a/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "m6-a", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 } + ] + } + } +} diff --git a/keyboards/rama/m6_a/keymaps/default/keymap.c b/keyboards/rama/m6_a/keymaps/default/keymap.c index 1323ba6f2a0..6b15f3cd102 100644 --- a/keyboards/rama/m6_a/keymaps/default/keymap.c +++ b/keyboards/rama/m6_a/keymaps/default/keymap.c @@ -1,298 +1,324 @@ -#include "../../m6_a.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( - TO(1), KC_A, KC_B, KC_C, KC_D, KC_E), + LAYOUT( + TO(1), KC_A, KC_B, KC_C, KC_D, KC_E), - KEYMAP( - TO(2), KC_F, KC_G, KC_H, KC_I, KC_J), + LAYOUT( + TO(2), KC_F, KC_G, KC_H, KC_I, KC_J), - KEYMAP( - TO(3), KC_K, KC_L, KC_M, KC_N, KC_O), + LAYOUT( + TO(3), KC_K, KC_L, KC_M, KC_N, KC_O), - KEYMAP( - TO(4), KC_P, KC_Q, KC_R, KC_S, KC_T), + LAYOUT( + TO(4), KC_P, KC_Q, KC_R, KC_S, KC_T), - KEYMAP( - TO(5), KC_U, KC_V, KC_W, KC_X, KC_Y), + LAYOUT( + TO(5), KC_U, KC_V, KC_W, KC_X, KC_Y), - KEYMAP( - TO(0), KC_Z, KC_1, KC_2, KC_3, KC_4) -}; + LAYOUT( + TO(0), KC_Z, KC_1, KC_2, KC_3, KC_4)}; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - //keyevent_t event = record->event; +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) { - return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); - } - break; - case 1: - if (record->event.pressed) { - return MACRO( T(T), T(G), T(G), T(ENT), END ); - } - break; - case 2: - if (record->event.pressed) { - return MACRO( D(NO), T(L), U(NO), END ); - } - break; - case 3: - if (record->event.pressed) { - return MACRO( D(LCTL), T(Z), U(LCTL), END ); - } - break; - case 4: - if (record->event.pressed) { - return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); - } - break; - case 5: - if (record->event.pressed) { - return MACRO( D(LCTL), T(X), U(LCTL), END ); - } - break; - case 6: - if (record->event.pressed) { - return MACRO( D(LCTL), T(C), U(LCTL), END ); - } - break; - case 7: - if (record->event.pressed) { - return MACRO( D(LCTL), T(V), U(LCTL), END ); - } - break; - } - return MACRO_NONE; + switch (id) + { + case 0: + if (record->event.pressed) + { + return MACRO(T(T), T(G), T(L), T(H), T(F), T(ENT), END); + } + break; + case 1: + if (record->event.pressed) + { + return MACRO(T(T), T(G), T(G), T(ENT), END); + } + break; + case 2: + if (record->event.pressed) + { + return MACRO(D(NO), T(L), U(NO), END); + } + break; + case 3: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(Z), U(LCTL), END); + } + break; + case 4: + if (record->event.pressed) + { + return MACRO(D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END); + } + break; + case 5: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(X), U(LCTL), END); + } + break; + case 6: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(C), U(LCTL), END); + } + break; + case 7: + if (record->event.pressed) + { + return MACRO(D(LCTL), T(V), U(LCTL), END); + } + break; + } + return MACRO_NONE; } // M6-A LEDs are connected to D6, B6, F5, B4, C7, F7 // This is 1-based because I copied it from Knops code. -void set_switch_led(int ledId, bool state) { - if(state) { - switch(ledId) { - case 1: - PORTD |= (1<<6); - break; - case 2: - PORTB |= (1<<6); - break; - case 3: - PORTF |= (1<<5); - break; - case 4: - PORTB |= (1<<4); - break; - case 5: - PORTC |= (1<<7); - break; - case 6: - PORTF |= (1<<7); - break; - } - } else { - switch(ledId) { - case 1: - PORTD &= ~(1<<6); - break; - case 2: - PORTB &= ~(1<<6); - break; - case 3: - PORTF &= ~(1<<5); - break; - case 4: - PORTB &= ~(1<<4); - break; - case 5: - PORTC &= ~(1<<7); - break; - case 6: - PORTF &= ~(1<<7); - break; - } - } +void set_switch_led(int ledId, bool state) +{ + if (state) + { + switch (ledId) + { + case 1: + PORTD |= (1 << 6); + break; + case 2: + PORTB |= (1 << 6); + break; + case 3: + PORTF |= (1 << 5); + break; + case 4: + PORTB |= (1 << 4); + break; + case 5: + PORTC |= (1 << 7); + break; + case 6: + PORTF |= (1 << 7); + break; + } + } + else + { + switch (ledId) + { + case 1: + PORTD &= ~(1 << 6); + break; + case 2: + PORTB &= ~(1 << 6); + break; + case 3: + PORTF &= ~(1 << 5); + break; + case 4: + PORTB &= ~(1 << 4); + break; + case 5: + PORTC &= ~(1 << 7); + break; + case 6: + PORTF &= ~(1 << 7); + break; + } + } } - -void set_layer_led(int layerId) { - // UNUSED +void set_layer_led(int layerId) +{ + // UNUSED } void led_set_layer(int layer); -void matrix_init_user(void) { - led_init_ports(); - led_set_layer(0); +void matrix_init_user(void) +{ + led_init_ports(); + led_set_layer(0); } -void matrix_scan_user(void) { +void matrix_scan_user(void) +{ } // M6-A LEDs are connected to D6, B6, F5, B4, C7, F7 -void led_init_ports() { - // Switch #1 - DDRD |= (1<<6); - PORTD &= ~(1<<6); - - // Switch #2 - DDRB |= (1<<6); - PORTB &= ~(1<<6); - - // Switch #3 - DDRF |= (1<<5); - PORTF &= ~(1<<5); - - // Switch #4 - DDRB |= (1<<4); - PORTB &= ~(1<<4); +void led_init_ports() +{ + // Switch #1 + DDRD |= (1 << 6); + PORTD &= ~(1 << 6); - // Switch #5 - DDRC |= (1<<7); - PORTC &= ~(1<<7); - - // Switch #6 - DDRF |= (1<<7); - PORTF &= ~(1<<7); -} + // Switch #2 + DDRB |= (1 << 6); + PORTB &= ~(1 << 6); -void led_set_user(uint8_t usb_led) { + // Switch #3 + DDRF |= (1 << 5); + PORTF &= ~(1 << 5); - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } + // Switch #4 + DDRB |= (1 << 4); + PORTB &= ~(1 << 4); - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + // Switch #5 + DDRC |= (1 << 7); + PORTC &= ~(1 << 7); + + // Switch #6 + DDRF |= (1 << 7); + PORTF &= ~(1 << 7); +} - } else { +void led_set_user(uint8_t usb_led) +{ - } + if (usb_led & (1 << USB_LED_NUM_LOCK)) + { + } + else + { + } - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } + if (usb_led & (1 << USB_LED_CAPS_LOCK)) + { + } + else + { + } - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) + { + } + else + { + } - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } + if (usb_led & (1 << USB_LED_COMPOSE)) + { + } + else + { + } + if (usb_led & (1 << USB_LED_KANA)) + { + } + else + { + } } -void led_set_layer(int layer) { - switch(layer) { - case 0: - set_switch_led(1, true); - 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 1: - set_switch_led(1, false); - set_switch_led(2, true); - set_switch_led(3, false); - set_switch_led(4, false); - set_switch_led(5, false); - set_switch_led(6, false); - break; - case 2: - set_switch_led(1, false); - set_switch_led(2, false); - set_switch_led(3, true); - set_switch_led(4, false); - set_switch_led(5, false); - set_switch_led(6, false); - break; - case 3: - set_switch_led(1, false); - set_switch_led(2, false); - set_switch_led(3, false); - set_switch_led(4, true); - set_switch_led(5, false); - set_switch_led(6, false); - break; - case 4: - set_switch_led(1, false); - set_switch_led(2, false); - set_switch_led(3, false); - set_switch_led(4, false); - set_switch_led(5, true); - set_switch_led(6, false); - break; - case 5: - 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, true); - break; - default: - 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; - } +void led_set_layer(int layer) +{ + switch (layer) + { + case 0: + set_switch_led(1, true); + 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 1: + set_switch_led(1, false); + set_switch_led(2, true); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 2: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, true); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 3: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, true); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 4: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, true); + set_switch_led(6, false); + break; + case 5: + 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, true); + break; + default: + 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; + } } -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; - case TO( 3 ): - if ( record->event.pressed ) - { - led_set_layer( 3 ); - } - break; - case TO( 4 ): - if ( record->event.pressed ) - { - led_set_layer( 4 ); - } - break; - case TO( 5 ): - if ( record->event.pressed ) - { - led_set_layer( 5 ); - } - break; - } - return true; +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; + case TO(3): + if (record->event.pressed) + { + led_set_layer(3); + } + break; + case TO(4): + if (record->event.pressed) + { + led_set_layer(4); + } + break; + case TO(5): + if (record->event.pressed) + { + led_set_layer(5); + } + break; + } + return true; } diff --git a/keyboards/rama/m6_a/keymaps/knops/keymap.c b/keyboards/rama/m6_a/keymaps/knops/keymap.c index 912147f4b4b..d687fe85166 100644 --- a/keyboards/rama/m6_a/keymaps/knops/keymap.c +++ b/keyboards/rama/m6_a/keymaps/knops/keymap.c @@ -1,92 +1,100 @@ -#include "../../m6_a.h" +#include QMK_KEYBOARD_H /*KNOPS_MISC*/ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /*KNOPS_KEYMAP*/ + /*KNOPS_LAYOUT*/ }; -void set_led_state(int ledId, bool state) { - if(state) { - switch(ledId) { - case 0: - PORTD |= (1<<6); - break; - case 1: - PORTB |= (1<<6); - break; - case 2: - PORTF |= (1<<5); - break; - case 3: - PORTB |= (1<<4); - break; - case 4: - PORTC |= (1<<7); - break; - case 5: - PORTF |= (1<<7); - break; - } - } else { - switch(ledId) { - case 0: - PORTD &= ~(1<<6); - break; - case 1: - PORTB &= ~(1<<6); - break; - case 2: - PORTF &= ~(1<<5); - break; - case 3: - PORTB &= ~(1<<4); - break; - case 4: - PORTC &= ~(1<<7); - break; - case 5: - PORTF &= ~(1<<7); - break; - } - } +void set_led_state(int ledId, bool state) +{ + if (state) + { + switch (ledId) + { + case 0: + PORTD |= (1 << 6); + break; + case 1: + PORTB |= (1 << 6); + break; + case 2: + PORTF |= (1 << 5); + break; + case 3: + PORTB |= (1 << 4); + break; + case 4: + PORTC |= (1 << 7); + break; + case 5: + PORTF |= (1 << 7); + break; + } + } + else + { + switch (ledId) + { + case 0: + PORTD &= ~(1 << 6); + break; + case 1: + PORTB &= ~(1 << 6); + break; + case 2: + PORTF &= ~(1 << 5); + break; + case 3: + PORTB &= ~(1 << 4); + break; + case 4: + PORTC &= ~(1 << 7); + break; + case 5: + PORTF &= ~(1 << 7); + break; + } + } } -void led_init_ports() { - // Switch #1 - DDRD |= (1<<6); - PORTD &= ~(1<<6); - - // Switch #2 - DDRB |= (1<<6); - PORTB &= ~(1<<6); - - // Switch #3 - DDRF |= (1<<5); - PORTF &= ~(1<<5); - - // Switch #4 - DDRB |= (1<<4); - PORTB &= ~(1<<4); - - // Switch #5 - DDRC |= (1<<7); - PORTC &= ~(1<<7); - - // Switch #6 - DDRF |= (1<<7); - PORTF &= ~(1<<7); +void led_init_ports() +{ + // Switch #1 + DDRD |= (1 << 6); + PORTD &= ~(1 << 6); + + // Switch #2 + DDRB |= (1 << 6); + PORTB &= ~(1 << 6); + + // Switch #3 + DDRF |= (1 << 5); + PORTF &= ~(1 << 5); + + // Switch #4 + DDRB |= (1 << 4); + PORTB &= ~(1 << 4); + + // Switch #5 + DDRC |= (1 << 7); + PORTC &= ~(1 << 7); + + // Switch #6 + DDRF |= (1 << 7); + PORTF &= ~(1 << 7); } -void led_set_layer(int layer) { +void led_set_layer(int layer) +{ /*KNOPS_SIMPLELED_STATES*/ - } -void matrix_init_user(void) { +void matrix_init_user(void) +{ led_init_ports(); led_set_layer(0); @@ -94,27 +102,28 @@ void matrix_init_user(void) { /*KNOPS_INIT*/ } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ //keyevent_t event = record->event; /*KNOPS_MACRO*/ - return NULL; + return NULL; } -void matrix_scan_user(void) { +void matrix_scan_user(void) +{ /*KNOPS_SCAN*/ } -void led_set_user(uint8_t usb_led) { +void led_set_user(uint8_t usb_led) +{ /*KNOPS_FUNCTIONALLED_STATES*/ - } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ /*KNOPS_PROCESS_STATE*/ - return NULL; + return NULL; } - - diff --git a/keyboards/rama/m6_a/keymaps/krusli/README.md b/keyboards/rama/m6_a/keymaps/krusli/README.md new file mode 100644 index 00000000000..7c1fa38fcbb --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/krusli/README.md @@ -0,0 +1,28 @@ +# krusli's RAMA M6-A Layout + +Personal keymap for the RAMA M6-A. + +Keymap was from my own port for the M6-A before official support was added, thus the backlighting code is not ported yet from the official default keymap. + +Top-right button acts as a "toggle between layers" button. Layer 0 -> Layer 1 -> Layer 2 -> Layer 0 -> ... + +* Layer 0: Git and Discord shortcuts +* Layer 1: Media playback and volume controls +* Layer 2: Osu! gamepad layer + +## Helpful alternative keymaps (WIP) + +### Arrow cluster + +Use [karabiner-elements](https://github.com/tekezo/Karabiner-Elements) on macOS so that the state of the modifiers (shift, caps lock) are synchronised between keyboards (for shift + arrow key text selection, for example). It's also a handy tool for customising keyboard behaviour on a Mac. + +On Windows/Linux modifier state should be shared between all keyboards by default. + +Installation: install [homebrew](https://brew.sh) and run `brew install Caskroom/cask/karabiner-elements`. + +```C +LAYOUT( + KC_ESC, KC_UP, TO(_LAYER0), + KC_LEFT, KC_DOWN, KC_RIGHT +) +``` diff --git a/keyboards/rama/m6_a/keymaps/krusli/keymap.c b/keyboards/rama/m6_a/keymaps/krusli/keymap.c new file mode 100644 index 00000000000..c8775f4eae5 --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/krusli/keymap.c @@ -0,0 +1,74 @@ +#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. + +enum layers +{ + _LAYER0, + _LAYER1, + _LAYER2 +}; + +enum custom_keycodes +{ + GIT_ADD = SAFE_RANGE, + GIT_COMMIT, + GIT_PUSH, + MUTE, + DEAFEN +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (record->event.pressed) + { + switch (keycode) + { + case GIT_ADD: + SEND_STRING("git add ." SS_TAP(X_ENTER)); + break; + case GIT_COMMIT: + SEND_STRING("git commit -m " SS_DOWN(X_LSHIFT) SS_TAP(X_QUOTE) SS_UP(X_LSHIFT)); + break; + case GIT_PUSH: + SEND_STRING("git push" SS_TAP(X_ENTER)); + break; + case MUTE: + SEND_STRING(SS_LGUI(SS_LSFT("M"))); + break; + case DEAFEN: + SEND_STRING(SS_LGUI(SS_LSFT("D"))); + break; + return false; + } + } + return true; +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( + MUTE, DEAFEN, TO(_LAYER1), + GIT_ADD, GIT_COMMIT, GIT_PUSH), + [_LAYER1] = LAYOUT( + KC_VOLD, KC_VOLU, TO(_LAYER2), + KC_MRWD, KC_MPLY, KC_MNXT), + [_LAYER2] = LAYOUT( + KC_ESC, KC_UP, TO(_LAYER0), + KC_Z, KC_X, KC_SPACE)}; + +void matrix_init_user(void) +{ +#ifdef BACKLIGHT_ENABLE + backlight_level(0); +#endif +} diff --git a/keyboards/rama/m6_a/keymaps/naut/keymap.c b/keyboards/rama/m6_a/keymaps/naut/keymap.c index 6ef59e01a92..df4cf9be373 100644 --- a/keyboards/rama/m6_a/keymaps/naut/keymap.c +++ b/keyboards/rama/m6_a/keymaps/naut/keymap.c @@ -1,18 +1,17 @@ -#include "../../m6_a.h" +#include QMK_KEYBOARD_H // Define Layers #define _BASE 0 -#define _FNX 1 +#define _FNX 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// Base Layer - [_BASE] = KEYMAP( - TO(1), KC_UP, KC_PGDN, - KC_LEFT,KC_DOWN,KC_RGHT), + // Base Layer + [_BASE] = LAYOUT( + TO(1), KC_UP, KC_PGDN, + KC_LEFT, KC_DOWN, KC_RGHT), -// Fn Layer - [_FNX] = KEYMAP( - TO(0),KC_VOLU,KC_MPLY, - KC_MRWD,KC_VOLD,KC_MFFD) -}; \ No newline at end of file + // Fn Layer + [_FNX] = LAYOUT( + TO(0), KC_VOLU, KC_MPLY, + KC_MRWD, KC_VOLD, KC_MFFD)}; \ No newline at end of file diff --git a/keyboards/rama/m6_a/m6_a.h b/keyboards/rama/m6_a/m6_a.h index 6809c2cc92f..d3c7bad3323 100644 --- a/keyboards/rama/m6_a/m6_a.h +++ b/keyboards/rama/m6_a/m6_a.h @@ -21,9 +21,9 @@ // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05 \ -) { \ - { K00, K01, K02, K03, K04, K05 }, \ -} +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05) \ + { \ + {K00, K01, K02, K03, K04, K05}, \ + } #endif // RAMA_M6_A diff --git a/keyboards/redox/config.h b/keyboards/redox/config.h new file mode 100644 index 00000000000..1083ff5f59a --- /dev/null +++ b/keyboards/redox/config.h @@ -0,0 +1,23 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +#endif diff --git a/keyboards/redox/i2c.c b/keyboards/redox/i2c.c new file mode 100644 index 00000000000..084c890c405 --- /dev/null +++ b/keyboards/redox/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/iris/keymaps/dnrambo/config.h b/keyboards/redox/keymaps/default/config.h similarity index 81% rename from keyboards/iris/keymaps/dnrambo/config.h rename to keyboards/redox/keymaps/default/config.h index 01e078e3264..ef1b4d944fa 100644 --- a/keyboards/iris/keymaps/dnrambo/config.h +++ b/keyboards/redox/keymaps/default/config.h @@ -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 @@ -18,28 +18,24 @@ along with this program. If not, see . #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "config_common.h" +#include "../../config.h" /* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C +// #define USE_SERIAL +#define USE_I2C /* Select hand configuration */ -#define PERMISSIVE_HOLD -#define PREVENT_STUCK_MODIFIERS + #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -/* + #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 +#define RGBLED_NUM 14 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -*/ -#define TAPPING_TERM 200 -#include "../../config.h" #endif diff --git a/keyboards/redox/keymaps/default/keymap.c b/keyboards/redox/keymaps/default/keymap.c new file mode 100644 index 00000000000..d8fd76d0217 --- /dev/null +++ b/keyboards/redox/keymaps/default/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/default/readme.md b/keyboards/redox/keymaps/default/readme.md new file mode 100644 index 00000000000..7f086f6e12b --- /dev/null +++ b/keyboards/redox/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for redox \ No newline at end of file diff --git a/keyboards/redox/keymaps/default/rules.mk b/keyboards/redox/keymaps/default/rules.mk new file mode 100644 index 00000000000..1e576127880 --- /dev/null +++ b/keyboards/redox/keymaps/default/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 new file mode 100644 index 00000000000..20c0f1d3493 --- /dev/null +++ b/keyboards/redox/matrix.c @@ -0,0 +1,455 @@ +/* +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + +__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) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); + +} + +uint8_t _matrix_scan(void) +{ + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/redox/readme.md b/keyboards/redox/readme.md new file mode 100644 index 00000000000..6e1d980a7ae --- /dev/null +++ b/keyboards/redox/readme.md @@ -0,0 +1,25 @@ +# The Redox keyboard + +

+Redox logo +

+ +

+Redox PCB rev1.0 +

+ +**Redox**: the **R**educed **E**rgo**dox** project. More information and building instruction [here](https://github.com/mattdibi/redox-keyboard). + +- Keyboard Maintainer: [Mattia Dal Ben](https://github.com/mattdibi) +- Hardware Supported: Redox PCB rev1.0 w/ Pro Micro +- Hardware Availability: [Falbatech](https://falba.tech/product-category/keyboard-parts/redox-parts/) + +Make example for this keyboard (after setting up your build environment): + + make redox/rev1:default + +Example of flashing this keyboard: + + make redox/rev1:default:avrdude + +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/redox/redox.c b/keyboards/redox/redox.c new file mode 100644 index 00000000000..7fa3545a47c --- /dev/null +++ b/keyboards/redox/redox.c @@ -0,0 +1,16 @@ +/* Copyright 2017 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 + * 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 "redox.h" diff --git a/keyboards/redox/redox.h b/keyboards/redox/redox.h new file mode 100644 index 00000000000..73f5ab85aea --- /dev/null +++ b/keyboards/redox/redox.h @@ -0,0 +1,41 @@ +/* Copyright 2017 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 + * 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 REDOX_H +#define REDOX_H + +#ifdef KEYBOARD_redox_rev1 + #include "rev1.h" +#endif + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + 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, L26, R20, 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 \ + ) \ + KEYMAP( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \ + ) + +#include "quantum.h" + +#endif diff --git a/keyboards/redox/rev1/config.h b/keyboards/redox/rev1/config.h new file mode 100644 index 00000000000..f8041f23567 --- /dev/null +++ b/keyboards/redox/rev1/config.h @@ -0,0 +1,88 @@ +/* +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 REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Falbatech +#define PRODUCT The Redox Keyboard +#define DESCRIPTION Split Ergodox-like 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 14 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/redox/rev1/rev1.c b/keyboards/redox/rev1/rev1.c new file mode 100644 index 00000000000..2eb7c7c0e83 --- /dev/null +++ b/keyboards/redox/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "redox.h" + + +#ifdef SSD1306OLED +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); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; diff --git a/keyboards/redox/rev1/rev1.h b/keyboards/redox/rev1/rev1.h new file mode 100644 index 00000000000..be62247500b --- /dev/null +++ b/keyboards/redox/rev1/rev1.h @@ -0,0 +1,66 @@ +#ifndef REV1_H +#define REV1_H + +#include "../redox.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#ifndef FLIP_HALF +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT( \ + 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, L26, R20, 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 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } +#else +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#define LAYOUT( \ + 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, L26, R20, 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 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ + } +#endif + +#endif diff --git a/keyboards/redox/rev1/rules.mk b/keyboards/redox/rev1/rules.mk new file mode 100644 index 00000000000..f845616741c --- /dev/null +++ b/keyboards/redox/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk new file mode 100644 index 00000000000..3e79bf1fe9d --- /dev/null +++ b/keyboards/redox/rules.mk @@ -0,0 +1,80 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# 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 = no # 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 +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 = yes +USE_I2C = yes + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = redox/rev1 diff --git a/keyboards/redox/serial.c b/keyboards/redox/serial.c new file mode 100644 index 00000000000..6faed09ce07 --- /dev/null +++ b/keyboards/redox/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/redox/serial.h b/keyboards/redox/serial.h new file mode 100644 index 00000000000..15fe4db7b4c --- /dev/null +++ b/keyboards/redox/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/redox/split_util.c b/keyboards/redox/split_util.c new file mode 100644 index 00000000000..346cbc90894 --- /dev/null +++ b/keyboards/redox/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/s60_x/default/default.h b/keyboards/s60_x/default/default.h index 027bf39f04e..f0797835e27 100644 --- a/keyboards/s60_x/default/default.h +++ b/keyboards/s60_x/default/default.h @@ -39,13 +39,13 @@ along with this program. If not, see . 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, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ K40, K41, K42, K46, K4A, K4B, K4C, K4D \ ) { \ { 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, KC_NO }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO } \ } diff --git a/keyboards/s60_x/default/info.json b/keyboards/s60_x/default/info.json new file mode 100644 index 00000000000..d4473a515f6 --- /dev/null +++ b/keyboards/s60_x/default/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "S60-X", + "url": "", + "maintainer": "qmk", + "width": 15, + "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}, {"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}] + } + } +} diff --git a/keyboards/s60_x/keymaps/amnesia0287/keymap.c b/keyboards/s60_x/keymaps/amnesia0287/keymap.c index 8cbbb7bf94b..c17c9e74492 100644 --- a/keyboards/s60_x/keymaps/amnesia0287/keymap.c +++ b/keyboards/s60_x/keymaps/amnesia0287/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.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. @@ -21,28 +21,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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, FN_HLb, \ + 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, FN_HLb, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, FN_HLa, KC_RCTL ), [_HLa] = 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_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_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, KC_TRNS, - KC_TRNS, 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, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_HLb] = 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_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_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, KC_TRNS, - KC_TRNS, 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, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_HL] = LAYOUT( RGB_TOG, RGB_M_P, RGB_RMOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, BL_BRTG, BL_OFF, BL_STEP, BL_ON, BL_DEC, BL_INC, KC_TRNS, LALT(KC_F4), RESET, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, 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_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c index c8ad8ae3344..e4660e66887 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "s60_x.h" +#include QMK_KEYBOARD_H //make keymap a little easier to read #define _______ KC_TRNS @@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, 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_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_UP, KC_RSFT, \ + KC_LSFT, KC_NUBS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ KC_FUNC, KC_LGUI, KC_LALT, KC_SPACEFN, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GMLK, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GMLK, \ _______, KC_RSFT, _______, KC_SPC, _______, _______, _______, _______ ), @@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, RESET, \ _______, _______, KC_CM_W, KC_CM_E, KC_MPRV, KC_MPLY, KC_MNXT, KC_CM_U, KC_CM_I, KC_CM_O, KC_CM_P, KC_PSCR, KC_SLCK, KC_PAUS, \ _______, KC_CM_A, KC_CM_S, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_CM_K, KC_CM_L, _______, _______, _______, KC_PENT, \ - _______, _______, KC_CM_Y, _______, KC_CM_C, MICMUTE, KC_CALC, KC_CM_N, KC_CM_M, _______, _______, _______, _______, KC_PGUP, KC_GMLK, \ + _______, _______, KC_CM_Y, _______, KC_CM_C, MICMUTE, KC_CALC, KC_CM_N, KC_CM_M, _______, _______, _______, KC_PGUP, KC_GMLK, \ _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), }; diff --git a/keyboards/s60_x/keymaps/bluebear/keymap.c b/keyboards/s60_x/keymaps/bluebear/keymap.c index ebb5382c9a4..2ba29b09eee 100644 --- a/keyboards/s60_x/keymaps/bluebear/keymap.c +++ b/keyboards/s60_x/keymaps/bluebear/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H // Keyboard Layers @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_BSLS, KC_GRV, \ 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_BSPC, \ CTL_T(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_NO, MT(MOD_RCTL, KC_ENT), \ - KC_LSPO, KC_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_NO, KC_RSPC, KC_NO, \ + KC_LSPO, KC_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, KC_NO, \ MO(2), KC_LGUI, KC_LALT, LT(1, KC_SPACE), ALGR_T(KC_APP), KC_RGUI, OSM(MOD_LCTL | MOD_LSFT), OSM(MOD_LCTL | MOD_LALT) ), @@ -198,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ARROWFN] = LAYOUT( 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, TO(3), TO(5), \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_NO, KC_NO, KC_NO, KC_INS, KC_DEL, \ - KC_CAPS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_TRNS, \ + KC_CAPS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_TRNS, \ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SPACE, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_TRNS, KC_NO, \ KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -223,7 +223,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_NO, KC_NO, \ DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_UP, KC_BTN2, KC_WH_U, KC_NO, KC_NO, KC_NO, \ TFS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_WH_D, KC_BTN3, KC_NO, KC_TRNS, \ - MAGSYS, 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_TRNS, KC_NO, \ + MAGSYS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_POWER, KC_TRNS, KC_TRNS, KC_NO, KC_NO ), @@ -246,7 +246,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TO(0), MI_CH_C, MI_CH_G, MI_CH_D, MI_CH_A, MI_CH_E, MI_CH_B, MI_CH_Gb, MI_CH_Db, MI_CH_Ab, MI_CH_Eb, MI_CH_Bb, MI_CH_F, KC_NO, TO(4), \ MI_OCTU, KC_NO, MI_Cs, MI_Ds, KC_NO, MI_Fs, MI_Gs, MI_As, KC_NO, MI_Cs_1, MI_Ds_1, KC_NO, KC_NO, KC_NO, \ MI_OCTD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, KC_NO, KC_NO, \ - MI_CH_Cm, KC_NO, MI_CH_Gm, MI_CH_Dm, MI_CH_Am, MI_CH_Em, MI_CH_Bm, MI_CH_Gbm, MI_CH_Dbm, MI_CH_Abm, MI_CH_Ebm, MI_CH_Bbm, KC_NO, MI_CH_Fm, KC_NO, \ + MI_CH_Cm, KC_NO, MI_CH_Gm, MI_CH_Dm, MI_CH_Am, MI_CH_Em, MI_CH_Bm, MI_CH_Gbm, MI_CH_Dbm, MI_CH_Abm, MI_CH_Ebm, MI_CH_Bbm, MI_CH_Fm, KC_NO, \ KC_NO, KC_NO, KC_NO, MI_ALLOFF, KC_NO, KC_NO, KC_NO, KC_NO ), @@ -269,7 +269,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TO(0), MI_CH_C, MI_CH_G, MI_CH_D, MI_CH_A, MI_CH_E, MI_CH_B, MI_CH_Gb, MI_CH_Db, MI_CH_Ab, MI_CH_Eb, MI_CH_Bb, MI_CH_F, TO(3), KC_NO, \ MI_OCTU, MI_CH_Cm, MI_CH_Gm, MI_CH_Dm, MI_CH_Am, MI_CH_Em, MI_CH_Bm, MI_CH_Gbm, MI_CH_Dbm, MI_CH_Abm, MI_CH_Ebm, MI_CH_Bbm, MI_CH_Fm, KC_NO, \ MI_OCTD, MI_CH_CDom7, MI_CH_GDom7, MI_CH_DDom7, MI_CH_ADom7, MI_CH_EDom7, MI_CH_BDom7, MI_CH_GbDom7, MI_CH_DbDom7, MI_CH_AbDom7, MI_CH_EbDom7, MI_CH_BbDom7, KC_NO, MI_CH_FDom7, \ - MI_CH_CDim7, KC_NO, MI_CH_GDim7, MI_CH_DDim7, MI_CH_ADim7, MI_CH_EDim7, MI_CH_BDim7, MI_CH_GbDim7, MI_CH_DbDim7, MI_CH_AbDim7, MI_CH_EbDim7, MI_CH_BbDim7, KC_NO, MI_CH_FDim7, KC_NO, \ + MI_CH_CDim7, KC_NO, MI_CH_GDim7, MI_CH_DDim7, MI_CH_ADim7, MI_CH_EDim7, MI_CH_BDim7, MI_CH_GbDim7, MI_CH_DbDim7, MI_CH_AbDim7, MI_CH_EbDim7, MI_CH_BbDim7, MI_CH_FDim7, KC_NO, \ KC_NO, KC_NO, KC_NO, MI_ALLOFF, KC_NO, KC_NO, KC_NO, KC_NO ), @@ -292,7 +292,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TO(0), MC_1, MC_2, MC_3, MC_4, MC_5, MC_6, MC_7, MC_8, MC_9, MC_0, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_TAB, MC_APOS, MC_COMM, MC_DOT, MC_P, MC_Y, MC_F, MC_G, MC_C, MC_R, MC_L, MC_SLSH, MC_EQL, KC_BSPC, \ KC_NO, MC_A, MC_O, MC_E, MC_U, MC_I, MC_D, MC_H, MC_T, MC_N, MC_S, MC_MINS, KC_NO, KC_ENT, \ - MC_LSFT, KC_NO, MC_SCLN, MC_Q, MC_J, MC_K, MC_X, MC_B, MC_M, MC_W, MC_V, MC_Z, KC_NO, MC_RSFT, KC_NO, \ + MC_LSFT, KC_NO, MC_SCLN, MC_Q, MC_J, MC_K, MC_X, MC_B, MC_M, MC_W, MC_V, MC_Z, MC_RSFT, KC_NO, \ KC_NO, KC_NO, KC_NO, MC_SPACE, KC_NO, KC_NO, KC_NO, KC_NO ), diff --git a/keyboards/s60_x/keymaps/custom/keymap.c b/keyboards/s60_x/keymaps/custom/keymap.c index bb32837cf8b..1130a04f24e 100644 --- a/keyboards/s60_x/keymaps/custom/keymap.c +++ b/keyboards/s60_x/keymaps/custom/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* Main layer: Test layout, using all keys. diff --git a/keyboards/s60_x/keymaps/dbroqua/keymap.c b/keyboards/s60_x/keymaps/dbroqua/keymap.c index 6f9d33aae92..71cf93f0048 100644 --- a/keyboards/s60_x/keymaps/dbroqua/keymap.c +++ b/keyboards/s60_x/keymaps/dbroqua/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H #define _DEFAULT 0 #define _FN 1 @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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(_FN), \ + 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(_FN), \ ______, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, ______, ______ \ ), @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(_SFX),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_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, ______, \ - ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN,______, ______, ______, \ + ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \ ______, ______, ______, ______, KC_MSTP, ______, ______, ______ \ ), @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______ \ ) }; diff --git a/keyboards/s60_x/keymaps/default/keymap.c b/keyboards/s60_x/keymaps/default/keymap.c index 47ea2a4c183..8fbe0044e9b 100644 --- a/keyboards/s60_x/keymaps/default/keymap.c +++ b/keyboards/s60_x/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60_x/keymaps/default_rgb/keymap.c b/keyboards/s60_x/keymaps/default_rgb/keymap.c index 7eefd7d7cd7..288104282e0 100644 --- a/keyboards/s60_x/keymaps/default_rgb/keymap.c +++ b/keyboards/s60_x/keymaps/default_rgb/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -19,7 +19,7 @@ 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_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, KC_NO, \ + 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_RALT, KC_FN0, KC_APP, KC_RCTL), /* 1: Fn layer @@ -41,7 +41,7 @@ BL = Backlighting = In-Switch LED 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, 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, \ - KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; diff --git a/keyboards/s60_x/keymaps/hasu/keymap.c b/keyboards/s60_x/keymaps/hasu/keymap.c index 6afdf5fd4ae..624de48cca3 100644 --- a/keyboards/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/s60_x/keymaps/hasu/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* * Hasu diff --git a/keyboards/s60_x/keymaps/hhkb/keymap.c b/keyboards/s60_x/keymaps/hhkb/keymap.c index 4807324d151..60225db068a 100644 --- a/keyboards/s60_x/keymaps/hhkb/keymap.c +++ b/keyboards/s60_x/keymaps/hhkb/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* * HHKB Layout diff --git a/keyboards/s60_x/keymaps/iso/keymap.c b/keyboards/s60_x/keymaps/iso/keymap.c index 5b34ded70ef..46e5a450d54 100644 --- a/keyboards/s60_x/keymaps/iso/keymap.c +++ b/keyboards/s60_x/keymaps/iso/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/s60_x/keymaps/iso_rgb/keymap.c index 00b197c9e7e..d76055a82e7 100644 --- a/keyboards/s60_x/keymaps/iso_rgb/keymap.c +++ b/keyboards/s60_x/keymaps/iso_rgb/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -19,7 +19,7 @@ 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_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_NO, \ 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_NO, KC_RSFT, KC_NO, \ + 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_NO, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), /* 1: Fn layer @@ -41,7 +41,7 @@ BL = Backlighting = In-Switch LED 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, 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, \ - KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; diff --git a/keyboards/s60_x/keymaps/jpec/keymap.c b/keyboards/s60_x/keymaps/jpec/keymap.c index 85ad20e4e12..2bee19d1581 100644 --- a/keyboards/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/s60_x/keymaps/jpec/keymap.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "s60_x.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer diff --git a/keyboards/s60_x/keymaps/plain/keymap.c b/keyboards/s60_x/keymaps/plain/keymap.c index f5d075f2434..7ca1fe60f29 100644 --- a/keyboards/s60_x/keymaps/plain/keymap.c +++ b/keyboards/s60_x/keymaps/plain/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* Main layer: ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60_x/keymaps/poker/keymap.c b/keyboards/s60_x/keymaps/poker/keymap.c index 4c13f269bda..3044d621b9a 100644 --- a/keyboards/s60_x/keymaps/poker/keymap.c +++ b/keyboards/s60_x/keymaps/poker/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty diff --git a/keyboards/s60_x/keymaps/poker_bit/keymap.c b/keyboards/s60_x/keymaps/poker_bit/keymap.c index de3f597bae5..9aa4831cce5 100644 --- a/keyboards/s60_x/keymaps/poker_bit/keymap.c +++ b/keyboards/s60_x/keymaps/poker_bit/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H // Poker fix with toggle and bit operation // Fn + Esc = ` diff --git a/keyboards/s60_x/keymaps/poker_set/keymap.c b/keyboards/s60_x/keymaps/poker_set/keymap.c index e6c0f90b4e5..dbd361511fc 100644 --- a/keyboards/s60_x/keymaps/poker_set/keymap.c +++ b/keyboards/s60_x/keymaps/poker_set/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H // Poker fix with set(state transition) // Fn + Esc = ` diff --git a/keyboards/s60_x/keymaps/spacefn/keymap.c b/keyboards/s60_x/keymaps/spacefn/keymap.c index 3d65bf1faad..4031417d9e3 100644 --- a/keyboards/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/s60_x/keymaps/spacefn/keymap.c @@ -1,4 +1,4 @@ -#include "s60_x.h" +#include QMK_KEYBOARD_H /* * SpaceFN diff --git a/keyboards/s60_x/rgb/info.json b/keyboards/s60_x/rgb/info.json new file mode 100644 index 00000000000..b9f268cbf6a --- /dev/null +++ b/keyboards/s60_x/rgb/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "S60-X RGB", + "url": "", + "maintainer": "qmk", + "width": 15, + "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}, {"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}] + } + } +} diff --git a/keyboards/s60_x/rgb/rgb.h b/keyboards/s60_x/rgb/rgb.h index f3318d91ed0..bded16ff640 100644 --- a/keyboards/s60_x/rgb/rgb.h +++ b/keyboards/s60_x/rgb/rgb.h @@ -7,13 +7,13 @@ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ K400, K401, K402, K406, K410, K411, K412, K413 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ } diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/satan/keymaps/dende_iso/keymap.c new file mode 100644 index 00000000000..9ac1cddbad1 --- /dev/null +++ b/keyboards/satan/keymaps/dende_iso/keymap.c @@ -0,0 +1,80 @@ +#include "satan.h" +#include "keymap_extras/keymap_german.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 _DEF 0 +#define _FNK 1 +#define _MEDIA 2 + +// dual-role shortcuts +#define FN_CAPS LT(_MEDIA, KC_CAPSLOCK) + +// increase readability +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _DEF: Default Layer + * ,------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| ß| ´|bcksp|fn1| + * |------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Z| U| I| O| P| Ü| +| | + * |----------------------------------------------------- Return| + * |fn2 | A| S| D| F| G| H| J| K| L| Ö| Ä| # | | + * |------------------------------------------------------------| + * |Sft | < | Y| X| C| V| B| N| M| ,| .| -| RSft| del | + * |------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |RAlt |Win |App|RCtrl| + * `------------------------------------------------------------' + */ +[_DEF] = LAYOUT_60_iso_split_bs_rshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, MO(_FNK), \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ + KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, DE_ALGR, KC_RGUI, KC_APP, KC_RCTL), + + + /* Keymap _FNK: Function Keys + * ,------------------------------------------------------------. + * | ^ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F0|F11|F12| Ins | | + * |------------------------------------------------------------| + * | |PGU| Up|PGD| | | |Ins|Hom|PDU| | | | | + * |----------------------------------------------------- | + * | |Lft|Dwn|Rgt| | | |Del|End|PGD| | | | | + * |------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| + * | | | | | | | | | + * `------------------------------------------------------------' + */ +[_FNK] = LAYOUT_60_iso_split_bs_rshift( + DE_CIRC, 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_PGUP, KC_UP, KC_PGDOWN, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + + /* Keymap _MEDIA: Media and Mouse Layer + * ,------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| + * | | | | | | | |MLC| MU|MRC| | | | | + * |----------------------------------------------------- | + * | |PRV|VLD|VLU|NXT| | | ML| MD| MR| | | | | + * |------------------------------------------------------------| + * | | | | | | | | | | | | | UP | | + * |------------------------------------------------------------| + * | | | | PLAY | |LEFT|DWN|RIGHT| + * `------------------------------------------------------------' + */ + +[_MEDIA] = LAYOUT_60_iso_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, \ + _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, \ + _______, _______, _______, KC_MPLY, _______, KC_LEFT, KC_DOWN, KC_RIGHT), + }; diff --git a/keyboards/satan/keymaps/dende_iso/readme.md b/keyboards/satan/keymaps/dende_iso/readme.md new file mode 100644 index 00000000000..238a2f725f0 --- /dev/null +++ b/keyboards/satan/keymaps/dende_iso/readme.md @@ -0,0 +1,61 @@ +# Satan GH60 ISO-DE Layout with split backspace and right shift + +![Layout Image](https://i.imgur.com/a7znS69.jpg) + +## Default Layer +This ISO-DE based layout has a split backspace. the left part is the actual backspace and the right parts serves as a FN key. +The right shift is also split, with the right part serving as the del key. +``` +/* Keymap _DEF: Default Layer + * ,------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| ß| ´|bcksp|fn1| + * |------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Z| U| I| O| P| Ü| +| | + * |----------------------------------------------------- Return| + * |fn2 | A| S| D| F| G| H| J| K| L| Ö| Ä| # | | + * |------------------------------------------------------------| + * |Sft | < | Y| X| C| V| B| N| M| ,| .| -| RSft| del | + * |------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |RAlt |Win |App|RCtrl| + * `------------------------------------------------------------' + */ +``` + + +## FN Key Layer +The Function keys can be accessed when holding fn1 (right part of backspace) + +``` +/* Keymap _FNK: Function Keys + * ,------------------------------------------------------------. + * | ^ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F0|F11|F12| Ins | | + * |------------------------------------------------------------| + * | |PGU| Up|PGD| | | |Ins|Hom|PDU| | | | | + * |----------------------------------------------------- | + * | |Lft|Dwn|Rgt| | | |Del|End|PGD| | | | | + * |------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| + * | | | | | | | | | + * `------------------------------------------------------------' + */ +``` + +## Media and Mouse Layer +The Media Keys and Mouse control can be accessed when holding capslock (fn2) + +``` +/* Keymap _MEDIA: Media and Mouse Layer + * ,------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| + * | | | | | | | |MLC| MU|MRC| | | | | + * |----------------------------------------------------- | + * | |PRV|VLD|VLU|NXT| | | ML| MD| MR| | | | | + * |------------------------------------------------------------| + * | | | | | | | | | | | | | UP | | + * |------------------------------------------------------------| + * | | | | PLAY | |LEFT|DWN|RIGHT| + * `------------------------------------------------------------' + */ +``` \ No newline at end of file diff --git a/keyboards/satan/keymaps/dende_iso/rules.mk b/keyboards/satan/keymaps/dende_iso/rules.mk new file mode 100644 index 00000000000..2a7ff27793f --- /dev/null +++ b/keyboards/satan/keymaps/dende_iso/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/satan/keymaps/fakb/config.h b/keyboards/satan/keymaps/fakb/config.h new file mode 100644 index 00000000000..a8df7ecef93 --- /dev/null +++ b/keyboards/satan/keymaps/fakb/config.h @@ -0,0 +1,92 @@ +#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 0x0003 +#define MANUFACTURER SATAN +#define PRODUCT GH60 +#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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)) \ +) +*/ +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 8 + +/* Underlight configuration + */ + +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#endif + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 1 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 77 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 + +// only change +#undef RGB_DI_PIN +#define RGB_DI_PIN B2 + +#endif diff --git a/keyboards/satan/keymaps/fakb/keymap.c b/keyboards/satan/keymaps/fakb/keymap.c new file mode 100644 index 00000000000..f6a9461957d --- /dev/null +++ b/keyboards/satan/keymaps/fakb/keymap.c @@ -0,0 +1,35 @@ +#include "satan.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LCTL_MA LCTL_T(KC_UP) +#define LSFT_MA LSFT_T(KC_DOWN) +#define RSFT_MA SFT_T(KC_DOWN) +#define TABS_MA LT(1,KC_TAB) +#define SPCE_MA LT(2,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = KEYMAP( + 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_NUBS,\ + TABS_MA,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,\ + LCTL_MA,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 ,\ + LSFT_MA,KC_NUBS,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,RSFT_MA,MO(1) ,\ + XXXXXXX,KC_LALT,KC_LGUI, SPCE_MA, KC_RGUI,KC_RALT,XXXXXXX,XXXXXXX), + +[1] = KEYMAP( + 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_INS ,_______,\ + _______,_______,_______,KC_PGUP,KC_PGDN,KC_HOME,KC_END ,KC_PGDN,KC_PGUP,_______,_______,_______,_______,KC_DEL ,\ + KC_CAPS,KC_NUBS,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,_______,_______,_______,_______,\ + _______,_______,BL_TOGG,BL_INC ,BL_DEC ,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), + +[2] = KEYMAP( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET ,\ + KC_BTN5,KC_BTN4,KC_BTN3,KC_BTN2,KC_BTN1,KC_HOME,KC_END ,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,KC_WH_L,KC_WH_U,KC_WH_D,KC_WH_R,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______,_______,_______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), + + +}; diff --git a/keyboards/satan/keymaps/fakb/readme.md b/keyboards/satan/keymaps/fakb/readme.md new file mode 100644 index 00000000000..b02b41816c7 --- /dev/null +++ b/keyboards/satan/keymaps/fakb/readme.md @@ -0,0 +1,58 @@ +# FabulousAnomalyKeyBoard + +This layout features an efficient layout for people without +a mouse. + +## layers + +Layer Base: complete basic keyboard +Layer Fn-Tab: F1-F12, Arrow Keys, Home, End, Backlight, Media +Layer Fn-Space: mouse keys in a vim like manner + +For detailed info check out keymap.c + +## the CTRL key + +It is where you would suspect CAPSLOCK to be. +WHO NEEDS CAPSLOCK ANYWAYS? +For those rare cases you need to shout at somebody in a comment +section you can still do a capslock by using TABCTRL + +## the SUPER key + +There are two super keys. They are next to the space bar. +The intention is easing the use of tiling window mangers + +## emergency mouse + +Without a mouse you will find yourself in a situation where all +your tiling goodness will just not be able to click onto that +"close ads" button. +This keymap integrates a basic mouse pointer directly into the keyboard. +Mouse is accessible via holding SPACE and tapping keys: +``` +SPACE +h Move cursor left +j Move cursor down +k Move cursor up +l Move cursor right + +w Middle Mouse Click +r Right click +e Left click + +s Scroll wheel left +d Scroll wheel down +f Scroll wheel up +g Scroll wheel right +``` + +## shell focused + +Working in a shell the up and down arrow keys are often needed to +look at old commands or reuse some. +When held, the left ctrl and left shift will act as expected, +but when tapped they will become UP and DOWN arrow-keys. + +## krautfriend +The keys <|> are accessible even without a 102nd key diff --git a/keyboards/satan/keymaps/fakb/rules.mk b/keyboards/satan/keymaps/fakb/rules.mk new file mode 100644 index 00000000000..c2b5df6cdd9 --- /dev/null +++ b/keyboards/satan/keymaps/fakb/rules.mk @@ -0,0 +1,16 @@ +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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/satan/satan.h b/keyboards/satan/satan.h index 8a8874ced3b..f7f7b44343a 100644 --- a/keyboards/satan/satan.h +++ b/keyboards/satan/satan.h @@ -138,11 +138,42 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } +/* ISO w/ split right shift key matrix layout + * ,-----------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d|49 | + * |-----------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| | + * |-------------------------------------------------------- | + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| + * |-----------------------------------------------------------| + * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c| + * |-----------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | + * `-----------------------------------------------------------' + + swap 3c and 3d. 3c is right of 3d in reality + */ +#define KEYMAP_ISO_SPLITRSHIFT_SPLITBACKSPACE( \ + 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, \ + 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, k3c, \ + 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}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \ +} + void matrix_init_user(void); void matrix_scan_user(void); #define LAYOUT_60_ansi KEYMAP_ANSI #define LAYOUT_60_iso KEYMAP_ISO #define LAYOUT_60_ansi_split_bs_rshift KEYMAP_HHKB +#define LAYOUT_60_iso_split_bs_rshift KEYMAP_ISO_SPLITRSHIFT_SPLITBACKSPACE #endif diff --git a/keyboards/scrabblepad/config.h b/keyboards/scrabblepad/config.h new file mode 100644 index 00000000000..7039ea24f71 --- /dev/null +++ b/keyboards/scrabblepad/config.h @@ -0,0 +1,198 @@ +/* +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_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 Donut Cables +#define PRODUCT ScrabblePad +#define DESCRIPTION 15x15 Ortholinear Board + +/* key matrix size */ +#define MATRIX_ROWS 15 +#define MATRIX_COLS 15 + +/* + * 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 { D5, F1, C7, F2, C6, F3, C5, F4, C4, F5, C3, F6, C2, F7, C1 } +#define MATRIX_COL_PINS { D6, D7, E0, B7, D2, D3, D4, E6, F0, B4, B5, B6, C0, E7, E1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// ws2812 options +//#define RGB_DI_PIN A0 // pin the DI on the ws2812 is hooked-up to +//#define RGBLIGHT_ANIMATIONS // run RGB animations +//#define RGBLED_NUM 6 // number of LEDs +//#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +//#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +//#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + + +/* 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/scrabblepad/info.json b/keyboards/scrabblepad/info.json new file mode 100644 index 00000000000..1368abd4b2b --- /dev/null +++ b/keyboards/scrabblepad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "scrabblepad", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 15, + "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":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":13, "y":0}, {"x":14, "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":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "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":8, "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":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, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "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}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":8, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":0, "y":6}, {"x":1, "y":6}, {"x":2, "y":6}, {"x":3, "y":6}, {"x":4, "y":6}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":8, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":12, "y":6}, {"x":13, "y":6}, {"x":14, "y":6}, {"x":0, "y":7}, {"x":1, "y":7}, {"x":2, "y":7}, {"x":3, "y":7}, {"x":4, "y":7}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":8, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}, {"x":12, "y":7}, {"x":13, "y":7}, {"x":14, "y":7}, {"x":0, "y":8}, {"x":1, "y":8}, {"x":2, "y":8}, {"x":3, "y":8}, {"x":4, "y":8}, {"x":5, "y":8}, {"x":6, "y":8}, {"x":7, "y":8}, {"x":8, "y":8}, {"x":9, "y":8}, {"x":10, "y":8}, {"x":11, "y":8}, {"x":12, "y":8}, {"x":13, "y":8}, {"x":14, "y":8}, {"x":0, "y":9}, {"x":1, "y":9}, {"x":2, "y":9}, {"x":3, "y":9}, {"x":4, "y":9}, {"x":5, "y":9}, {"x":6, "y":9}, {"x":7, "y":9}, {"x":8, "y":9}, {"x":9, "y":9}, {"x":10, "y":9}, {"x":11, "y":9}, {"x":12, "y":9}, {"x":13, "y":9}, {"x":14, "y":9}, {"x":0, "y":10}, {"x":1, "y":10}, {"x":2, "y":10}, {"x":3, "y":10}, {"x":4, "y":10}, {"x":5, "y":10}, {"x":6, "y":10}, {"x":7, "y":10}, {"x":8, "y":10}, {"x":9, "y":10}, {"x":10, "y":10}, {"x":11, "y":10}, {"x":12, "y":10}, {"x":13, "y":10}, {"x":14, "y":10}, {"x":0, "y":11}, {"x":1, "y":11}, {"x":2, "y":11}, {"x":3, "y":11}, {"x":4, "y":11}, {"x":5, "y":11}, {"x":6, "y":11}, {"x":7, "y":11}, {"x":8, "y":11}, {"x":9, "y":11}, {"x":10, "y":11}, {"x":11, "y":11}, {"x":12, "y":11}, {"x":13, "y":11}, {"x":14, "y":11}, {"x":0, "y":12}, {"x":1, "y":12}, {"x":2, "y":12}, {"x":3, "y":12}, {"x":4, "y":12}, {"x":5, "y":12}, {"x":6, "y":12}, {"x":7, "y":12}, {"x":8, "y":12}, {"x":9, "y":12}, {"x":10, "y":12}, {"x":11, "y":12}, {"x":12, "y":12}, {"x":13, "y":12}, {"x":14, "y":12}, {"x":0, "y":13}, {"x":1, "y":13}, {"x":2, "y":13}, {"x":3, "y":13}, {"x":4, "y":13}, {"x":5, "y":13}, {"x":6, "y":13}, {"x":7, "y":13}, {"x":8, "y":13}, {"x":9, "y":13}, {"x":10, "y":13}, {"x":11, "y":13}, {"x":12, "y":13}, {"x":13, "y":13}, {"x":14, "y":13}, {"x":0, "y":14}, {"x":1, "y":14}, {"x":2, "y":14}, {"x":3, "y":14}, {"x":4, "y":14}, {"x":5, "y":14}, {"x":6, "y":14}, {"x":7, "y":14}, {"x":8, "y":14}, {"x":9, "y":14}, {"x":10, "y":14}, {"x":11, "y":14}, {"x":12, "y":14}, {"x":13, "y":14}, {"x":14, "y":14}] + } + } +} diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/scrabblepad/keymaps/default/config.h new file mode 100644 index 00000000000..2c852d18199 --- /dev/null +++ b/keyboards/scrabblepad/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/scrabblepad/keymaps/default/keymap.c b/keyboards/scrabblepad/keymaps/default/keymap.c new file mode 100644 index 00000000000..bfbab6e885c --- /dev/null +++ b/keyboards/scrabblepad/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* 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 "scrabblepad.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC, \ + KC_D, KC_O, KC_N, KC_U, KC_T, KC_C, KC_A, KC_T, KC_SPC, KC_R, KC_U, KC_L, KC_E, KC_S, KC_SPC \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/scrabblepad/keymaps/default/readme.md b/keyboards/scrabblepad/keymaps/default/readme.md new file mode 100644 index 00000000000..4123e76671d --- /dev/null +++ b/keyboards/scrabblepad/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for ScrabblePad + +This is the default keymap for the ScrabblePad. + +On each row, each key is used to spell out each character in +the following string: "donutcat rules ". diff --git a/keyboards/scrabblepad/readme.md b/keyboards/scrabblepad/readme.md new file mode 100644 index 00000000000..30ba9219637 --- /dev/null +++ b/keyboards/scrabblepad/readme.md @@ -0,0 +1,17 @@ +# ScrabblePad + +The ScrabblePad is a 15x15 ortholinear keyboard designed for use with +the XDA Scrabble Board sold by [Novelkeys](https://novelkeys.xyz). + +It uses a [Teensy++ 2.0](https://www.pjrc.com/store/teensypp.html) +featuring an at90usb1286 8 bit microcontroller. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Teensy++ 2.0 and ScrabblePad PCB +Hardware Availability: [Donut Cables](https://donutcables.com/) + +Make example for this keyboard (after setting up your build environment): + + make scrabblepad: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/scrabblepad/rules.mk b/keyboards/scrabblepad/rules.mk new file mode 100644 index 00000000000..20f532af4d5 --- /dev/null +++ b/keyboards/scrabblepad/rules.mk @@ -0,0 +1,67 @@ +# MCU name +MCU = at90usb1286 + +# 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/scrabblepad/scrabblepad.c b/keyboards/scrabblepad/scrabblepad.c new file mode 100644 index 00000000000..e97cbd46c01 --- /dev/null +++ b/keyboards/scrabblepad/scrabblepad.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 "scrabblepad.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/scrabblepad/scrabblepad.h b/keyboards/scrabblepad/scrabblepad.h new file mode 100644 index 00000000000..fbe0dfc7276 --- /dev/null +++ b/keyboards/scrabblepad/scrabblepad.h @@ -0,0 +1,57 @@ +/* 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 SCRABBLEPAD_H +#define SCRABBLEPAD_H + +#include "quantum.h" + +// Written in the format K(row)(column) where numbering is in hexadecimal +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, \ + k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, \ + k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, \ + k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A, k8B, k8C, k8D, k8E, \ + k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A, k9B, k9C, k9D, k9E, \ + kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA, kAB, kAC, kAD, kAE, \ + kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kBA, kBB, kBC, kBD, kBE, \ + kC0, kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kCA, kCB, kCC, kCD, kCE, \ + kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, \ + kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A, k8B, k8C, k8D, k8E, }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A, k9B, k9C, k9D, k9E, }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA, kAB, kAC, kAD, kAE, }, \ + { kB0, kB1, kB2, kB3, kB4, kB5, kB6, kB7, kB8, kB9, kBA, kBB, kBC, kBD, kBE, }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, kC6, kC7, kC8, kC9, kCA, kCB, kCC, kCD, kCE, }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \ +} + +#endif diff --git a/keyboards/staryu/backlight_staryu.c b/keyboards/staryu/backlight_staryu.c new file mode 100644 index 00000000000..6fb9713f3a7 --- /dev/null +++ b/keyboards/staryu/backlight_staryu.c @@ -0,0 +1,52 @@ +#include "backlight.h" +#include + +/* backlighting */ +void init_backlight_led(void) +{ + DDRC |= (1< + +void init_backlight_led(void); + +void backlight_led_on(uint8_t index); + +void backlight_led_off(uint8_t index); + +#endif diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h new file mode 100755 index 00000000000..268fe991acf --- /dev/null +++ b/keyboards/staryu/config.h @@ -0,0 +1,74 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0x2328 +#define DEVICE_VER 0x0205 +#define MANUFACTURER K.T.E.C. +#define PRODUCT Staryu +#define DESCRIPTION 5-key macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D4 } +#define UNUSED_PINS + +// from light_ws2812_config @ +// https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/staryu +#define RGB_DI_PIN C6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 // Number of LEDs + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +// TODO backlighting +#define BACKLIGHT_LEVELS 10 +// #define BACKLIGHT_PIN B7 +/* +Backlight: C2, C7, D5, D6, B0 +switch (index) { + case 0: + PORTC &= ~(1<. +*/ +#include QMK_KEYBOARD_H +#include "action_layer.h" + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3 +}; + + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* Keymap 0 + * ,-----------. + * | |Up |Fn0| + * |---+---+---| + * |Lef|Dow|Rig| + * `-----------' + */ + LAYOUT( KC_UP, TO(_LAYER1), KC_LEFT,KC_DOWN,KC_RIGHT ), + /* Keymap 1 + * ,-----------. + * | |PgU|Fn1| + * |---+---+---| + * |Hom|PgD|End| + * `-----------' + */ + LAYOUT( KC_PGUP,TO(_LAYER2), KC_HOME,KC_PGDN,KC_END ), + /* Keymap 2 + * ,-----------. + * | |Sel|Fn2| + * |---+---+---| + * |Pre|Pla|Nex| + * `-----------' + */ + LAYOUT( KC_MSEL,TO(_LAYER3), KC_MPRV,KC_MPLY,KC_MNXT ), + /* Keymap 3 + * ,-----------. + * | |MsU|Fn3| + * |---+---+---| + * |MsL|MsD|MsR| + * `-----------' + */ + LAYOUT( KC_MS_U,TO(_LAYER0), KC_MS_L,KC_MS_D,KC_MS_R ), + // /* Keymap 4 + // * ,-----------. + // * | |Fn6|Fn4| + // * |---+---+---| + // * |Fn7|Fn5|Fn8| + // * `-----------' + // */ + // LAYOUT( FN6, FN4, FN7, FN5, FN8 ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} diff --git a/keyboards/staryu/keymaps/default/rules.mk b/keyboards/staryu/keymaps/default/rules.mk new file mode 100644 index 00000000000..6c605daecf5 --- /dev/null +++ b/keyboards/staryu/keymaps/default/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/staryu/keymaps/krusli/README.md b/keyboards/staryu/keymaps/krusli/README.md new file mode 100644 index 00000000000..66a0979070f --- /dev/null +++ b/keyboards/staryu/keymaps/krusli/README.md @@ -0,0 +1,9 @@ +# krusli's RAMA M6-A Layout + +Personal keymap for the RAMA M6-A. + +Top-right button acts as a "toggle between layers" button. Layer 0 -> Layer 1 -> Layer 2 -> Layer 0 -> ... + +- Layer 0: Osu! gamepad layer +- Layer 1: Git commands +- Layer 2 and 3: RGB controls diff --git a/keyboards/staryu/keymaps/krusli/keymap.c b/keyboards/staryu/keymaps/krusli/keymap.c new file mode 100644 index 00000000000..2879b68e580 --- /dev/null +++ b/keyboards/staryu/keymaps/krusli/keymap.c @@ -0,0 +1,97 @@ +/* +Copyright 2018 Kenneth Aloysius + +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 "../../backlight_staryu.h" + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3 +}; + +enum custom_keycodes { + GIT_ADD = SAFE_RANGE, + GIT_COMMIT, + GIT_PUSH, + MUTE, + DEAFEN +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case GIT_ADD: + SEND_STRING("git add ."SS_TAP(X_ENTER)); + break; + case GIT_COMMIT: + SEND_STRING("git commit -m "SS_DOWN(X_LSHIFT)SS_TAP(X_QUOTE)SS_UP(X_LSHIFT)); + break; + case GIT_PUSH: + SEND_STRING("git push"SS_TAP(X_ENTER)); + break; + case MUTE: + SEND_STRING(SS_LGUI(SS_LSFT("M"))); + break; + case DEAFEN: + SEND_STRING(SS_LGUI(SS_LSFT("D"))); + break; + return false; + } + } + return true; +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( \ + KC_ESC, TO(_LAYER1), \ + KC_Z, KC_X, KC_SPACE \ + ), + [_LAYER1] = LAYOUT( \ + MUTE, TO(_LAYER2), \ + GIT_ADD, GIT_COMMIT, GIT_PUSH \ + ), + [_LAYER2] = LAYOUT( \ + RGB_MOD, TO(_LAYER3), \ + RGB_TOG, RGB_HUD, RGB_HUI \ + ), + [_LAYER3] = LAYOUT( \ + RGB_VAI, TO(_LAYER0), \ + RGB_SAD, RGB_VAD, RGB_SAI \ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { + for (int i=0; i<5; i++) { + backlight_led_on(i); + } +} + +void matrix_scan_user(void) { +} + +void led_set_user(uint8_t usb_led) { +} diff --git a/keyboards/staryu/readme.md b/keyboards/staryu/readme.md new file mode 100644 index 00000000000..bca7482bc2d --- /dev/null +++ b/keyboards/staryu/readme.md @@ -0,0 +1,15 @@ +# Staryu + +![Staryu](https://i.imgur.com/obcCpZN.jpg) + +A 5 key macropad, designed by Kai and sold by KPRepublic. + +Keyboard Maintainer: QMK Community +Hardware Supported: Staryu (only the non-lite version has been tested) +Hardware Availability: [AliExpress](https://www.aliexpress.com/item/Staryu-Mini-Macro-Pad-custom-keyboard-by-tkg-kai-Mini-macro-pad-mechanical-keyboard-5-keys/32817560746.html) + +Make example for this keyboard (after setting up your build environment): + + make staryu: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/staryu/rules.mk b/keyboards/staryu/rules.mk new file mode 100755 index 00000000000..3e043bbcd5b --- /dev/null +++ b/keyboards/staryu/rules.mk @@ -0,0 +1,60 @@ +# MCU name +MCU = atmega32u2 + +BOOTLOADER = lufa-dfu + +SRC = backlight_staryu.c + +# 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 = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 = yes # In-switch LEDs +AUDIO_ENABLE = no # There is no available timer or pin for audio on the NovelPad +RGBLIGHT_ENABLE = yes # RGB LEDs for underglow, installed and enabled by default for the NovelPad diff --git a/keyboards/staryu/staryu.c b/keyboards/staryu/staryu.c new file mode 100755 index 00000000000..6dcaaea0e85 --- /dev/null +++ b/keyboards/staryu/staryu.c @@ -0,0 +1,26 @@ +/* +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 "staryu.h" +#include "backlight_staryu.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + init_backlight_led(); + matrix_init_user(); +} diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h new file mode 100755 index 00000000000..12b8be92e71 --- /dev/null +++ b/keyboards/staryu/staryu.h @@ -0,0 +1,28 @@ +/* +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 KB_H +#define KB_H +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, \ + K10, K11, K12 \ +) { \ + { K00, K01, K12, K11, K10 }, \ +} + +#endif diff --git a/keyboards/sweet16/keymaps/default/keymap.c b/keyboards/sweet16/keymaps/default/keymap.c index 7fa8615438a..2ddf8acb410 100644 --- a/keyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/sweet16/keymaps/default/keymap.c @@ -17,7 +17,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case UP_URL: if (record->event.pressed) { - SEND_STRING("http://1upkeyboads.com"); + SEND_STRING("http://1upkeyboards.com"); } return false; break; diff --git a/keyboards/tada68/info.json b/keyboards/tada68/info.json index 7d0c77c442a..5fb60b1fb0e 100644 --- a/keyboards/tada68/info.json +++ b/keyboards/tada68/info.json @@ -7,6 +7,10 @@ "layouts": { "KEYMAP_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}, {"x":15, "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, "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":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"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}, {"x":15, "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}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "KEYMAP_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}, {"x":15, "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"AltGr", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/tada68/keymaps/fakb/config.h b/keyboards/tada68/keymaps/fakb/config.h new file mode 100644 index 00000000000..b0b5394644b --- /dev/null +++ b/keyboards/tada68/keymaps/fakb/config.h @@ -0,0 +1,6 @@ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 4 +#define MOUSEKEY_MAX_SPEED 5 +#define MOUSEKEY_TIME_TO_MAX 77 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 diff --git a/keyboards/tada68/keymaps/fakb/keymap.c b/keyboards/tada68/keymaps/fakb/keymap.c new file mode 100755 index 00000000000..0cdd6a9b6d9 --- /dev/null +++ b/keyboards/tada68/keymaps/fakb/keymap.c @@ -0,0 +1,38 @@ +#include "tada68.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 _______ KC_TRNS +#define XXXXXXX KC_NO +#define LCTL_MA LCTL_T(KC_UP) +#define LSFT_MA LSFT_T(KC_DOWN) +#define RSFT_MA SFT_T(KC_UP) +#define TABS_MA LT(1,KC_TAB) +#define SPCE_MA LT(2,KC_SPC) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP_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_BSLS,KC_NUBS,\ + TABS_MA,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,_______,\ + LCTL_MA,KC_A ,KC_S ,KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT ,_______,\ + LSFT_MA,KC_Z ,KC_X ,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, RSFT_MA,MO(1) ,_______,\ + KC_LCTL,KC_LALT,KC_LGUI, SPCE_MA, KC_RGUI,KC_RALT,_______,_______,_______,_______), + +[1] = KEYMAP_ANSI( + 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_INS ,_______,\ + _______,_______,_______,KC_PGUP,KC_PGDN,KC_HOME,KC_END ,KC_PGDN,KC_PGUP,_______,_______,_______,_______,KC_DEL ,_______,\ + KC_CAPS,KC_NUBS,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,_______,_______, _______,_______,\ + _______,_______,BL_TOGG,BL_INC ,BL_DEC ,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______, _______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______,_______,_______), + +[2] = KEYMAP_ANSI( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + KC_BTN5,KC_BTN4,KC_BTN3,KC_BTN2,KC_BTN1,KC_HOME,KC_END ,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,KC_WH_L,KC_WH_U,KC_WH_D,KC_WH_R,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______, _______,_______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______,_______,_______), + + +}; diff --git a/keyboards/tada68/keymaps/fakb/readme.md b/keyboards/tada68/keymaps/fakb/readme.md new file mode 100755 index 00000000000..563d5bbbaff --- /dev/null +++ b/keyboards/tada68/keymaps/fakb/readme.md @@ -0,0 +1,58 @@ +# FabulousAnomalyKeyBoard + +This layout features an efficient layout for people without +a mouse. + +## layers + +Layer Base: complete basic keyboard +Layer Fn-Tab: F1-F12, Arrow Keys, Home, End, Backlight, Media +Layer Fn-Space: mouse keys in a vim like manner + +For detailed info check out keymap.c + +## the CTRL key + +It is where you would suspect CAPSLOCK to be. +WHO NEEDS CAPSLOCK ANYWAYS? +For those rare cases you need to shout at somebody in a comment +section you can still do a capslock by using TAB+CTRL + +## SUPER key + +There are two super keys. They are next to the space bar. +The intention is easing the use of tiling window mangers + +## emergency mouse + +Without a mouse you will find yourself in a situation where all +your tiling goodness will just not be able to click onto that +"close ads" button. +This keymap integrates a basic mouse pointer directly into the keyboard. +Mouse is accessible via holding SPACE and tapping keys: +``` +SPACE+ +h Move cursor left +j Move cursor down +k Move cursor up +l Move cursor right + +w Middle Mouse Click +r Right click +e Left click + +s Scroll wheel left +d Scroll wheel down +f Scroll wheel up +g Scroll wheel right +``` + +## shell focused + +Working in a shell the up and down arrow keys are often needed to +look at old commands or reuse some. +When held, the left ctrl and left shift will act as expected, +but when tapped they will become UP and DOWN arrow-keys. + +## krautfriend +The keys <|> are accessible even without a 102nd key diff --git a/keyboards/tada68/keymaps/fakb/rules.mk b/keyboards/tada68/keymaps/fakb/rules.mk new file mode 100644 index 00000000000..54b79fc9d4f --- /dev/null +++ b/keyboards/tada68/keymaps/fakb/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 = 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/tada68/keymaps/fezzant/keymap.c b/keyboards/tada68/keymaps/fezzant/keymap.c new file mode 100644 index 00000000000..b151e0b67bd --- /dev/null +++ b/keyboards/tada68/keymaps/fezzant/keymap.c @@ -0,0 +1,124 @@ +#include "tada68.h" + +// Layers + +#define _BL 0 +#define _FL 1 +#define _NUM 2 +#define _BSPC 3 + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Macros +// name macros here for keymap reference +enum { + EMAIL_ADD = SAFE_RANGE, + OTHER_MACRO +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed){ + switch(keycode) { + // copy these lines to define new macro + case EMAIL_ADD: + SEND_STRING("email@example.com"); + return false; break; + // copy to here + case OTHER_MACRO: + SEND_STRING("The Other Macro"); + return false; break; + } + } + return true; +}; + +// Keymaps + +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 |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |Home| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lft|Dwn|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_BSPACE, KC_GRAVE, \ + 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_DELETE, \ + LT(_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,KC_HOME, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_END, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, 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 |Paus | + * |-----------------------------------------------------------------| + * | | | | | | | | | |BLB|BL-|BL |BL+|Foobr|ToNUM| + * |-----------------------------------------------------------------| + * |KC_NO | | | | | | | | | | |Mnu| |PgUp | + * |-----------------------------------------------------------------| + * | | | | | | | | | | | | | |PgDn | + * |-----------------------------------------------------------------| + * |WinUl|WinLk| | | | | |Nxt|Stp|Prev | + * '-----------------------------------------------------------------' + */ +[_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_PAUSE , \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,BL_BRTG,BL_DEC,BL_TOGG, BL_INC, KC_MAIL,TG(_NUM), \ + XXXXXXX,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_APPLICATION, _______,KC_PGUP, \ + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_BTN1, KC_MS_U, KC_PGDOWN, \ + MAGIC_UNNO_GUI,MAGIC_NO_GUI,_______, _______, _______,_______,_______,KC_MPRV,KC_MSTP, KC_MNXT), + + + /* Keymap _NUM: Numpad Layer + * .----------------------------------------------------------------. + * |Esc| 1 | 2 | 3 | 4 | 5 | 6 |NP7|Np8|Np9| | - | + |Backspc|CALC| 15 + * |----------------------------------------------------------------| + * |Tab |NumL| up| | | |Np4|Np5|Np6| | | / | * | | | 15 + * |----------------------------------------------------------------| + * |To__BL|lft|dwn|rit| | |Np1|Np2|Np3| | | |Enter |Prsc| 14 + * |----------------------------------------------------------------| + * |Shift | Z | X | C | V | |Np.|Np.|Np.| | | |msU|Rclk| 14 + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Np0 |Emal| |Lclk|msL|msD|msR | 10 + * '----------------------------------------------------------------' + */ +[_NUM] = KEYMAP_ANSI( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9,XXXXXXX, KC_KP_MINUS, KC_KP_PLUS, KC_BSPC,KC_CALC, \ + KC_TAB,KC_NUMLOCK, KC_UP,XXXXXXX,XXXXXXX, XXXXXXX,KC_P4,KC_P5,KC_P6,XXXXXXX,XXXXXXX,KC_PSLS,KC_PAST, XXXXXXX,_______, \ + TG(_NUM), KC_LEFT, KC_DOWN, KC_RIGHT,XXXXXXX,XXXXXXX,KC_P1,KC_P2,KC_P3,XXXXXXX,XXXXXXX,XXXXXXX, KC_KP_ENTER,KC_PSCREEN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V,XXXXXXX, KC_PDOT, KC_PDOT, KC_PDOT,XXXXXXX,XXXXXXX,XXXXXXX, KC_MS_U, KC_BTN2, \ + KC_LCTL, KC_LGUI, KC_LALT,KC_P0,EMAIL_ADD,_______,KC_BTN1,KC_MS_L,KC_MS_D, KC_MS_R), + + + /* Keymap _BSPC: back_SPACE Layer + * .----------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | |Up | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | |Lft|Dwn|Rig|End| | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | Backspace | |NO | | | | | + * '----------------------------------------------------------------' + */ +[_BSPC] = KEYMAP_ANSI( + _______, _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,KC_UP,_______,_______,_______, _______, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT,KC_END,_______, _______,_______, \ + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, _______, _______, \ + _______,_______,_______, KC_BSPACE, _______,XXXXXXX,_______,_______,_______, _______) + + +}; diff --git a/keyboards/tada68/keymaps/fezzant/readme.md b/keyboards/tada68/keymaps/fezzant/readme.md new file mode 100644 index 00000000000..08a9433eebf --- /dev/null +++ b/keyboards/tada68/keymaps/fezzant/readme.md @@ -0,0 +1,8 @@ +## Fezzant's Tada68 keymap + +Includes easy copy-paste macro creation for strings or combo keypresses. + +* Layer 0: Mostly-standard base layer, with home/end replacing pgup/pgdn. +* Layer 1: Momentary function layer, with some added buttons. +* Layer 2: Toggle numpad layer, with a layout conducive to spreadsheets and calculations +* Layer 3: Momentary function layer to put backspace on spacebar, with arrow keys on right hand homerow area. diff --git a/keyboards/tada68/keymaps/fezzant/rules.mk b/keyboards/tada68/keymaps/fezzant/rules.mk new file mode 100644 index 00000000000..f2439cc7d14 --- /dev/null +++ b/keyboards/tada68/keymaps/fezzant/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 = yes # 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/tada68/keymaps/maartenwut/keymap.c b/keyboards/tada68/keymaps/maartenwut/keymap.c index c5b9d987ea4..f427f56a6bd 100755 --- a/keyboards/tada68/keymaps/maartenwut/keymap.c +++ b/keyboards/tada68/keymaps/maartenwut/keymap.c @@ -13,21 +13,20 @@ #define LSHIFT OSM(MOD_LSFT) #define SPACE LT(_AR, KC_SPC) -#define CAPS LT(_LE, KC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Main Layer [_MA] = KEYMAP_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_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, - 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_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, LSHIFT, 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, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), //Function Layer [_FL] = KEYMAP_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, RESET, KC_PSCR, - TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TO(_LO), + TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_INS, TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_HOME, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, KC_WH_U, KC_END, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R), @@ -38,45 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TERM_ON, TERM_OFF, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, M(0), TRNS, TRNS, TRNS), -//LED control layer (caps) -[_LE] = KEYMAP_ANSI( - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, BL_TOGG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, BL_INC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, BL_DEC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - //Game layer (fn + g) [_GA] = KEYMAP_ANSI( 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, - KC_CAPS, 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, KC_LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_SPC, TRNS, TRNS, MO(_FL), TRNS, TRNS, TRNS), - -[_UL] = KEYMAP_ANSI( - 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, TO(_MA), - 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, TRNS, KC_NO, KC_NO, KC_NO), - -[_LO] = KEYMAP_ANSI( - 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, 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, MO(_UL), KC_NO, KC_NO, KC_NO), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING("Password"); - } - break; - } - return MACRO_NONE; }; \ No newline at end of file diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h new file mode 100644 index 00000000000..1e42f13d4ff --- /dev/null +++ b/keyboards/tanuki/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth +#define PRODUCT Tanuki PCB version +#define DESCRIPTION Handwired 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +#define MATRIX_COL_PINS { B3 , B2 , B6 , B5 , B4 , E6 , D7 , C6 , F4 , F5 , F6 } +#define MATRIX_ROW_PINS { F7 , B1 , D4 , D0 } +#define UNUSED_PINS + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define RGB_DI_PIN D1 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +#define TAPPING_TERM 200 +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c new file mode 100644 index 00000000000..59f5843ea94 --- /dev/null +++ b/keyboards/tanuki/keymaps/default/keymap.c @@ -0,0 +1,141 @@ +#include QMK_KEYBOARD_H +#include "rgblight.h" + +//Layer definitions +#define _BL 0 +#define _DL 1 +#define _UL 2 +#define _GL 3 +#define _BK 4 + + +//other variables +int mCalled = 0; +bool blockToggle = false; +bool lRGB = true; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BL] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TG(_GL), \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_SLSH, KC_ENT, \ + KC_TAB, KC_ESC, KC_LCTL, KC_LALT, KC_COMMA, LT(_DL,KC_SPC), LT(_UL,KC_SPC), KC_DOT, KC_LGUI), + +[_DL] = LAYOUT( + 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_TRNS,\ + KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_F1, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[_UL] = LAYOUT( + KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSLS, KC_PLUS, KC_UNDS, KC_MINS, KC_EQL, KC_DEL,\ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, \ + KC_TRNS, KC_FN0, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_GRV, KC_TRNS, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI), + +[_GL] = LAYOUT( + 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_TRNS, 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, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS), + +[_BK] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_NO, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_FN1, KC_NO, KC_NO), + +}; + + +//KC_MPLY, KC_VOLU, KC_VOLD, KC_TRNS, KC_TRNS, KC_MNXT, KC_MPRV +//function to toggle the interactive rgb variable +bool toggleLayerRGB(void){ + if(lRGB == true){ + return false; + } + else{ + return true; + } +} + +void matrix_init_user(void){ + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(0,10,255); +} + +//check for layer and if there was a keypress change underglow lighting +void matrix_scan_kb(void){ + if(lRGB == true) + { + + + + //base layer + if(layer_state == 0x00000000 && mCalled == 1 ){ + rgblight_sethsv(0,10,255); + mCalled = 0; + } + + //down layer + else if(layer_state == 0x00000002 && mCalled == 1){ + rgblight_sethsv(160,255,255); + mCalled = 0; + } + + + //up layer with rgb access blocked + else if(layer_state == 0x00000004 && mCalled == 1 && lRGB == true){ + //blockToggle = true; + layer_state = 0x00000014; + rgblight_sethsv(180,255,255); + mCalled = 0; + } + + //arrow cluster layer + else if(layer_state == 0x00000008 && mCalled == 1){ + rgblight_sethsv(0,180,255); + mCalled = 0; + } + + //if on blocked layer and the spacebar has been released reset to baselayer and set colours to white + else if(layer_state == 0x00000014 && blockToggle == true ) + { + blockToggle = false; + layer_state = 0x00000000; + rgblight_sethsv(0,10,255); + } + + } +} + +//set mCalled to 1 when a button is pressed to make sure the leds aren't continuesly updated. +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + mCalled = 1; + + //uncommenting the line below causes the lights to flicker when typing on the keyboard. + //rgblight_sethsv(0,255,0); + + if(keycode == KC_FN0 && record->event.pressed){ + //set the toggle and make sure to set the colour back to white + lRGB = toggleLayerRGB(); + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(0,255,255); + layer_state =0x00000000; + + return false; + } + + //check if spacebar is released when on a different layer + if(keycode == KC_FN1){ + if(record ->event.pressed){ + }else{ + blockToggle = true; + } + } + + return true; +} diff --git a/keyboards/tanuki/readme.md b/keyboards/tanuki/readme.md new file mode 100644 index 00000000000..331df5b2eac --- /dev/null +++ b/keyboards/tanuki/readme.md @@ -0,0 +1,15 @@ +# Tanuki + +![Tanuki](https://github.com/SethSenpai/Tanuki/blob/master/Img/glamour1.jpg?raw=true) + +The QMK firmware for the Tanuki 40% keyboard. The other files needed for construction can be found in the [Tanuki repo](https://github.com/SethSenpai/Tanuki). + +Keyboard Maintainer: [SethSenpai](https://github.com/SethSenpai) +Hardware Supported: Tanuki pcb, pro micro +Hardware Availability: [Tanuki repo](https://github.com/SethSenpai/Tanuki) + +Make example for this keyboard (after setting up your build environment): + + make tanuki: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/tanuki/rules.mk b/keyboards/tanuki/rules.mk new file mode 100644 index 00000000000..cc3734152fb --- /dev/null +++ b/keyboards/tanuki/rules.mk @@ -0,0 +1,70 @@ + + +# 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* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER=caterina + +# Build Options +# comment out to disable the options. +# +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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE =yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +TAP_DANCE_ENABLE = no + +ifndef QUANTUM_DIR + include ../../Makefile +endif diff --git a/keyboards/tanuki/tanuki.c b/keyboards/tanuki/tanuki.c new file mode 100644 index 00000000000..573e2006111 --- /dev/null +++ b/keyboards/tanuki/tanuki.c @@ -0,0 +1,10 @@ +#include "tanuki.h" +#include "rgblight.h" +#include "config.h" +#include "rgblight.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +}; diff --git a/keyboards/tanuki/tanuki.h b/keyboards/tanuki/tanuki.h new file mode 100644 index 00000000000..6b686adafa8 --- /dev/null +++ b/keyboards/tanuki/tanuki.h @@ -0,0 +1,22 @@ +#include "quantum.h" + + +// readability +#define XXX KC_NO + +// 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, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \ + k30, k31, k32, k33, k34, k35, k36, k38, k39 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a}, \ + {k30, k31, k32, k33, k34, k35, k36, XXX, k38, k39, XXX} \ +} + + diff --git a/keyboards/ut47/LED_controls.ino b/keyboards/ut47/LED_controls.ino new file mode 100644 index 00000000000..dd50300eb7e --- /dev/null +++ b/keyboards/ut47/LED_controls.ino @@ -0,0 +1,420 @@ +#include +#include + +int iByte; +byte col = 0; +byte leds[12][4]; +byte pass = 1; +int fadecount = 1; +const int fadelimit = 3000; +const int fadelimitshort = 1000; +byte mode = 4; +byte brightness = 2; +boolean changemode = 0; +int rain = 0; +const int rainlimit = 5000; +const int rainfade = 5000; +byte rx = 0; +byte ry = 0; + +// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1) +int pins[17] = { + -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 14, 15, 18, 19, 20, 21 +}; + +// col[xx] of leds = pin yy on led matrix +int cols[12] = { + pins[8], pins[7], pins[6], pins[5], pins[9], pins[10], pins[11], pins[12], pins[13], pins[14], pins[15], pins[16] +}; + +// row[xx] of leds = pin yy on led matrix +int rows[4] = { + pins[1], pins[2], pins[3], pins[4] +}; + + +#define DELAY 0 +extern byte leds[12][4]; + +void setup() { + Serial1.begin(9600); + setupLeds(); + for (int s = 0; s < 5; s++) { + for ( int r = 1; r < 9; r++) { + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + for ( int r = 9; r > 0; r--) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + } +} + +void loop() { + + switch (mode) { + case 0: + //Blacklight + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = brightness; + } + } + checkserial(); + break; + case 1: + //Breathing + for ( int r = 1; r < 9; r++) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + else { + break; + } + } + for ( int r = 9; r > 0; r--) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + delayMicroseconds(65000); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 12; i++) { + leds[i][j] = 1; + for (int p = 0; p < 25; p++) { + } + leds[i][j] = r; + } + } + } + else { + break; + } + } + for ( int r = 1; r < 30; r++) { + checkserial(); + if (changemode == 0) { + delayMicroseconds(65000); + delayMicroseconds(65000); + } + else { + break; + } + } + break; + case 2: + //Random + leds[random(12)][random(4)] = random(8); + delayMicroseconds(10000); + checkserial(); + break; + case 3: + //Rain + rain++; + if (rain > rainlimit) { + rain = 0; + rx = random(12); + ry = random(4); + if (leds[rx][ry] == 0) { + leds[rx][ry] = 18; + } + } + fadecount++; + if (fadecount > rainfade) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + case 4: + //Reactive + fadecount++; + if (fadecount > fadelimit) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + case 5: + //Reactive Target + fadecount++; + if (fadecount > fadelimitshort) { + fadecount = 1; + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + if (leds[i][j] > 0) { + leds[i][j] = leds[i][j] - 1; + } + } + } + } + checkserial(); + break; + default: + mode = 0; + break; + } + changemode = 0; +} + +void checkserial() { + if (Serial1.available() > 0) { + iByte = Serial1.read(); + if (iByte == 100) { + brightness++; + if (brightness > 9) { + brightness = 1; + } + } + if (iByte == 101) { + mode++; + } + if (iByte < 100) { + if (mode == 4) { + byte row = iByte / 16; + byte col = iByte % 16; + leds[col][row] = 18; + } + if (mode == 5) { + byte row = iByte / 16; + byte col = iByte % 16; + for (byte i = 0; i < 12; i++) { + leds[i][row] = 18; + } + for (byte p = 0; p < 4; p++) { + leds[col][p] = 18; + } + } + } + } +} + +void setupLeds() { + // sets the pins as output + FastGPIO::Pin<2>::setOutputLow(); + FastGPIO::Pin<3>::setOutputLow(); + FastGPIO::Pin<4>::setOutputLow(); + FastGPIO::Pin<5>::setOutputLow(); + FastGPIO::Pin<6>::setOutputLow(); + FastGPIO::Pin<7>::setOutputLow(); + FastGPIO::Pin<8>::setOutputLow(); + FastGPIO::Pin<9>::setOutputLow(); + FastGPIO::Pin<10>::setOutputLow(); + FastGPIO::Pin<16>::setOutputLow(); + FastGPIO::Pin<14>::setOutputLow(); + FastGPIO::Pin<15>::setOutputLow(); + FastGPIO::Pin<18>::setOutputLow(); + FastGPIO::Pin<19>::setOutputLow(); + FastGPIO::Pin<20>::setOutputLow(); + FastGPIO::Pin<21>::setOutputLow(); + + // set up Cols + FastGPIO::Pin<6>::setOutputValueLow(); + FastGPIO::Pin<7>::setOutputValueLow(); + FastGPIO::Pin<8>::setOutputValueLow(); + FastGPIO::Pin<9>::setOutputValueLow(); + FastGPIO::Pin<10>::setOutputValueLow(); + FastGPIO::Pin<16>::setOutputValueLow(); + FastGPIO::Pin<14>::setOutputValueLow(); + FastGPIO::Pin<15>::setOutputValueLow(); + FastGPIO::Pin<18>::setOutputValueLow(); + FastGPIO::Pin<19>::setOutputValueLow(); + FastGPIO::Pin<20>::setOutputValueLow(); + FastGPIO::Pin<21>::setOutputValueLow(); + + // set up Rows + FastGPIO::Pin<2>::setOutputValueLow(); + FastGPIO::Pin<3>::setOutputValueLow(); + FastGPIO::Pin<4>::setOutputValueLow(); + FastGPIO::Pin<5>::setOutputValueLow(); + + clearLeds(); + Timer1.initialize(25); + Timer1.attachInterrupt(display); + +} + +void clearLeds() { + // Clear display array + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = 0; + } + } +} + +void onLeds() { + // Clear display array + for (int i = 0; i < 12; i++) { + for (int j = 0; j < 4; j++) { + leds[i][j] = 7; + } + } +} + +// Interrupt routine +void display() { + + switch (col) { // Turn whole previous column off + case 0: + FastGPIO::Pin<6>::setOutputValueLow(); + break; + case 1: + FastGPIO::Pin<7>::setOutputValueLow(); + break; + case 2: + FastGPIO::Pin<8>::setOutputValueLow(); + break; + case 3: + FastGPIO::Pin<9>::setOutputValueLow(); + break; + case 4: + FastGPIO::Pin<10>::setOutputValueLow(); + break; + case 5: + FastGPIO::Pin<16>::setOutputValueLow(); + break; + case 6: + FastGPIO::Pin<14>::setOutputValueLow(); + break; + case 7: + FastGPIO::Pin<15>::setOutputValueLow(); + break; + case 8: + FastGPIO::Pin<18>::setOutputValueLow(); + break; + case 9: + FastGPIO::Pin<19>::setOutputValueLow(); + break; + case 10: + FastGPIO::Pin<20>::setOutputValueLow(); + break; + case 11: + FastGPIO::Pin<21>::setOutputValueLow(); + break; + } + + col++; + if (col == 12) { + col = 0; + pass++; + if (pass > 8) { + pass = 1; + } + } + for (int row = 0; row < 4; row++) { + if (leds[col][row] > pass) { + switch (row) { // Turn on this led + case 0: + FastGPIO::Pin<2>::setOutputValueLow(); + break; + case 1: + FastGPIO::Pin<3>::setOutputValueLow(); + break; + case 2: + FastGPIO::Pin<4>::setOutputValueLow(); + break; + case 3: + FastGPIO::Pin<5>::setOutputValueLow(); + break; + } + } + else { + switch (row) { // Turn off this led + case 0: + FastGPIO::Pin<2>::setOutputValueHigh(); + break; + case 1: + FastGPIO::Pin<3>::setOutputValueHigh(); + break; + case 2: + FastGPIO::Pin<4>::setOutputValueHigh(); + break; + case 3: + FastGPIO::Pin<5>::setOutputValueHigh(); + break; + } + } + } + switch (col) { // Turn column on + case 0: + FastGPIO::Pin<6>::setOutputValueHigh(); + break; + case 1: + FastGPIO::Pin<7>::setOutputValueHigh(); + break; + case 2: + FastGPIO::Pin<8>::setOutputValueHigh(); + break; + case 3: + FastGPIO::Pin<9>::setOutputValueHigh(); + break; + case 4: + FastGPIO::Pin<10>::setOutputValueHigh(); + break; + case 5: + FastGPIO::Pin<16>::setOutputValueHigh(); + break; + case 6: + FastGPIO::Pin<14>::setOutputValueHigh(); + break; + case 7: + FastGPIO::Pin<15>::setOutputValueHigh(); + break; + case 8: + FastGPIO::Pin<18>::setOutputValueHigh(); + break; + case 9: + FastGPIO::Pin<19>::setOutputValueHigh(); + break; + case 10: + FastGPIO::Pin<20>::setOutputValueHigh(); + break; + case 11: + FastGPIO::Pin<21>::setOutputValueHigh(); + break; + } + +} diff --git a/keyboards/ut47/config.h b/keyboards/ut47/config.h new file mode 100644 index 00000000000..4335e3edd50 --- /dev/null +++ b/keyboards/ut47/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2018 Carlos Filoteo + +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 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 40percent.club +#define PRODUCT ut47 +#define DESCRIPTION An awesome 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Enable GNAP matrix serial output */ +#define GNAP_ENABLE + +/* USART configuration */ +#ifdef __AVR_ATmega32U4__ +# define SERIAL_UART_BAUD 9600 +# define SERIAL_UART_DATA UDR1 +# define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +# define SERIAL_UART_RXD_VECT USART1_RX_vect +# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +# define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX */ \ + UCSR1B = _BV(TXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + sei(); \ + } while(0) +# else +# error "USART configuration is needed." +#endif + +#endif diff --git a/keyboards/ut47/keymaps/default/config.h b/keyboards/ut47/keymaps/default/config.h new file mode 100644 index 00000000000..46098a22fb2 --- /dev/null +++ b/keyboards/ut47/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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/ut47/keymaps/default/keymap.c b/keyboards/ut47/keymaps/default/keymap.c new file mode 100644 index 00000000000..6b6bb025b19 --- /dev/null +++ b/keyboards/ut47/keymaps/default/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ + +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, + LT3_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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | |LEDtg|LEDch| | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/ut47/keymaps/default/readme.md b/keyboards/ut47/keymaps/default/readme.md new file mode 100644 index 00000000000..e09dc73fab8 --- /dev/null +++ b/keyboards/ut47/keymaps/default/readme.md @@ -0,0 +1,19 @@ +# UT47 default keymap + +![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) + +### LED Controls + +Use TAB+Z to cycle through brightness (8 steps) + +Use TAB+X to cycle through the following LED modes: + +- solid +- breathing +- random +- rain +- reactive +- poptang +- off diff --git a/keyboards/ut47/keymaps/non-us/config.h b/keyboards/ut47/keymaps/non-us/config.h new file mode 100644 index 00000000000..46098a22fb2 --- /dev/null +++ b/keyboards/ut47/keymaps/non-us/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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/ut47/keymaps/non-us/keymap.c b/keyboards/ut47/keymaps/non-us/keymap.c new file mode 100644 index 00000000000..1cb537b7d00 --- /dev/null +++ b/keyboards/ut47/keymaps/non-us/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ + +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, + LT3_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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | # | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, KC_NUHS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | |LEDtg|LEDch| | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, LED_TOG, LED_CHG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/ut47/keymaps/non-us/readme.md b/keyboards/ut47/keymaps/non-us/readme.md new file mode 100644 index 00000000000..e09dc73fab8 --- /dev/null +++ b/keyboards/ut47/keymaps/non-us/readme.md @@ -0,0 +1,19 @@ +# UT47 default keymap + +![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) + +### LED Controls + +Use TAB+Z to cycle through brightness (8 steps) + +Use TAB+X to cycle through the following LED modes: + +- solid +- breathing +- random +- rain +- reactive +- poptang +- off diff --git a/keyboards/ut47/keymaps/rgb/config.h b/keyboards/ut47/keymaps/rgb/config.h new file mode 100644 index 00000000000..0eb010a3ae2 --- /dev/null +++ b/keyboards/ut47/keymaps/rgb/config.h @@ -0,0 +1,27 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D3 // The pin the LED strip is connected to +#define RGBLED_NUM 7 // Number of LEDs in your strip + +#endif diff --git a/keyboards/ut47/keymaps/rgb/keymap.c b/keyboards/ut47/keymaps/rgb/keymap.c new file mode 100644 index 00000000000..58d11031ad1 --- /dev/null +++ b/keyboards/ut47/keymaps/rgb/keymap.c @@ -0,0 +1,88 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +#define _______ KC_TRNS +#define LT3_TAB LT(3, KC_TAB) +#define MT_RSFT_ENT MT(MOD_RSFT, KC_ENT) + +enum custom_keycodes { + LED_TOG = SAFE_RANGE, + LED_CHG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +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, + LT3_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, MT_RSFT_ENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +LAYOUT( + KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_FN13, KC_FN14, KC_FN15, KC_FN16, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_FN17, KC_FN18, KC_FN19, KC_FN20, KC_FN21, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; + +//LED keymap functions + #ifdef LED_ENABLE +void led_chmode(void) { + serial_send(101); +} + +void led_toggle(void) { + serial_send(100); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case LED_TOG: + #ifdef LED_ENABLE + led_toggle(); + #endif + return false; + case LED_CHG: + #ifdef LED_ENABLE + led_chmode(); + #endif + return false; + } + } + return true; +}; +#endif diff --git a/keyboards/ut47/keymaps/rgb/readme.md b/keyboards/ut47/keymaps/rgb/readme.md new file mode 100644 index 00000000000..00076bfc497 --- /dev/null +++ b/keyboards/ut47/keymaps/rgb/readme.md @@ -0,0 +1 @@ +WS2812B LED added and connected to pin D3 as described here: https://www.40percent.club/2018/04/gnap-underglow.html diff --git a/keyboards/ut47/keymaps/rgb/rules.mk b/keyboards/ut47/keymaps/rgb/rules.mk new file mode 100644 index 00000000000..1e3cebb1451 --- /dev/null +++ b/keyboards/ut47/keymaps/rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ut47/led.c b/keyboards/ut47/led.c new file mode 100644 index 00000000000..9458c038fef --- /dev/null +++ b/keyboards/ut47/led.c @@ -0,0 +1,38 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include "stdint.h" +#include "led.h" + + +void led_set(uint8_t usb_led) +{ + if (usb_led & (1<. +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // initialize row and col + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef LED_ENABLE + serial_init(); +#endif +} + +uint8_t matrix_scan(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<The reason this is an "opt-in" feature is to prevent sending serial communication over the pin, in case it ends up being used for something else (like RGB underglow). + +### Layout + +Go to the [default layout README](keymaps/default/readme.md) for more information. + +### Additional info + +Credit: Forked from [di0ib TMK version](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gnap) + +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. + +### Build Guide + +[u/network_operations' build guide thread](https://www.reddit.com/r/MechanicalKeyboards/comments/7wqktu/gnap_the_cheap_40/) diff --git a/keyboards/ut47/rules.mk b/keyboards/ut47/rules.mk new file mode 100644 index 00000000000..b0465986698 --- /dev/null +++ b/keyboards/ut47/rules.mk @@ -0,0 +1,70 @@ +# 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 + +# Bootloader +BOOTLOADER = caterina + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC += matrix.c protocol/serial_uart.c + +# Build Options +# change yes to no to disable +# +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 = 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 = 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 + +ifeq ($(strip $(LED_ENABLE)), yes) + OPT_DEFS += -DLED_ENABLE + SRC += led.c +endif diff --git a/keyboards/ut47/ut47.c b/keyboards/ut47/ut47.c new file mode 100644 index 00000000000..f467fd130ab --- /dev/null +++ b/keyboards/ut47/ut47.c @@ -0,0 +1,50 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 "ut47.h" +#ifdef LED_ENABLE + #include "protocol/serial.h" +#endif + +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 + if (record->event.pressed) { + #ifdef LED_ENABLE + serial_send((record->event.key.row*16)+record->event.key.col); + #endif + } + 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/ut47/ut47.h b/keyboards/ut47/ut47.h new file mode 100644 index 00000000000..a4507dd34d7 --- /dev/null +++ b/keyboards/ut47/ut47.h @@ -0,0 +1,49 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 UT47_H +#define UT47_H + +#include "quantum.h" + +#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, \ + K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \ +) \ + { \ + { 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, K35, K37, K38, K39, K3a, K3b } \ + } + +#define LAYOUT_kc( \ + 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, K37, K38, K39, K3a, K3b \ +) \ + LAYOUT( \ + 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_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b \ + ) + +#define LAYOUT_kc_ut47 LAYOUT_kc + +#endif diff --git a/keyboards/v60_type_r/info.json b/keyboards/v60_type_r/info.json index 5aaf760e1e5..3bb4ff0a071 100644 --- a/keyboards/v60_type_r/info.json +++ b/keyboards/v60_type_r/info.json @@ -9,7 +9,7 @@ "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":"Del", "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}, {"label":"Fn", "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/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 254b3aa2994..3ba77c658cb 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Fn0 |Gui |App|Ctrl| * `-----------------------------------------------------------' */ - [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, \ @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [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, \ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_INS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 3deaae98c56..1e3775ab6f1 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space/L3 |Gui |Alt |Ctrl|Fn1| * `-----------------------------------------------------------' */ - [0] = KEYMAP_ALL( + [0] = 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, XXXXX, 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, \ LT(1, 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, \ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [1] = KEYMAP_ALL( + [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_DEL, \ _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ _____, _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, _____, \ @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [2] = KEYMAP_ALL( + [2] = LAYOUT_all( _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, \ _____, _____, _____, _____, _____, _____, _____, KC_MS_WH_UP, KC_MS_WH_DOWN, _____, _____, _____, _____, _____, \ _____, _____, _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, _____, _____, _____, \ @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [3] = KEYMAP_ALL( + [3] = LAYOUT_all( _____, BL_TOGG, BL_STEP, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, _____, _____, _____, _____, _____, _____, _____, _____, \ _____, RGB_RI, RGB_GI, RGB_BI, RGB_HUI, RGB_SAI, RGB_VAI, _____, _____, _____, _____, _____, _____, _____, \ _____, RGB_RD, RGB_GD, RGB_BD, RGB_HUD, RGB_SAD, RGB_VAD, _____, _____, _____, _____, _____, _____, \ diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 016348db9f7..86d87e12da2 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -15,25 +15,28 @@ */ #include "v60_type_r.h" +#include "quantum.h" + +// if we've got an RGB underglow! +#ifdef V60_POLESTAR + #include "rgblight.h" #include #include "action_layer.h" -#include "quantum.h" -// if we've got an RGB underglow! -#ifdef V60_POLESTAR #define SOFTPWM_LED_TIMER_TOP F_CPU/(256*64) extern rgblight_config_t rgblight_config; static uint8_t softpwm_buff[3] = {0}; -void matrix_init_user(void) { +void matrix_init_kb(void) { rgb_init(); + matrix_init_user(); } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { uint8_t r = led[0].r, g = led[0].g, b = led[0].b; switch(keycode) { case RGB_RI: @@ -98,7 +101,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } - return true; + return process_record_user(keycode, record); } @@ -188,44 +191,4 @@ ISR(TIMER1_COMPA_vect) softpwm_buff[2] = led[0].b; } } -#else - -void matrix_init_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - #endif // V60_POLESTAR - -// we need these functions for both versions -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); -} - -void matrix_scan_user(void) { -} - -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); -} diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index 37d0a573e21..3d7aef7eaf0 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -18,10 +18,10 @@ #include "quantum.h" -#include "rgblight.h" - #ifdef V60_POLESTAR +#include "rgblight.h" + void rgb_init(void); void set_rgb_color(uint8_t pin, uint8_t value, uint8_t timer_value); @@ -55,7 +55,7 @@ enum my_keycodes { // KBP V60 Type R with ALL possible layouts -#define KEYMAP_ALL( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ @@ -89,7 +89,7 @@ enum my_keycodes { // KBP V60 Type R with ANSI layout - #define KEYMAP_ANSI( \ + #define LAYOUT_60_ansi( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ 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, \ @@ -106,7 +106,4 @@ enum my_keycodes { { k40, k41, k42, k43, k44, k45, k46, k47 } \ } -#define LAYOUT_all KEYMAP_ALL -#define LAYOUT_ansi KEYMAP_ANSI - #endif diff --git a/keyboards/vitamins_included/config.h b/keyboards/vitamins_included/config.h new file mode 100644 index 00000000000..c910d8f24f0 --- /dev/null +++ b/keyboards/vitamins_included/config.h @@ -0,0 +1,24 @@ +/* +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_H +#define CONFIG_H + +#include "config_common.h" + +#endif diff --git a/keyboards/vitamins_included/i2c.c b/keyboards/vitamins_included/i2c.c new file mode 100644 index 00000000000..49ada214336 --- /dev/null +++ b/keyboards/vitamins_included/i2c.c @@ -0,0 +1,163 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< +#include "split_util.h" + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/vitamins_included/keymaps/default/config.h b/keyboards/vitamins_included/keymaps/default/config.h new file mode 100644 index 00000000000..35f641a94a9 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/default/config.h @@ -0,0 +1,44 @@ +/* +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 + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef AUDIO_ENABLE + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(COLEMAK_SOUND) \ + } +#endif + +#endif diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c new file mode 100644 index 00000000000..f25e2fd32ea --- /dev/null +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -0,0 +1,199 @@ +#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 _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 +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |Adjust|Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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 , \ + KC_LCTRL,KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RESET | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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, \ + RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |RESET | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_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, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB_MOD| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ +) + + +}; + +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; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/vitamins_included/keymaps/default/rules.mk b/keyboards/vitamins_included/keymaps/default/rules.mk new file mode 100644 index 00000000000..457a3d01d4a --- /dev/null +++ b/keyboards/vitamins_included/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c new file mode 100644 index 00000000000..7079a8da93e --- /dev/null +++ b/keyboards/vitamins_included/matrix.c @@ -0,0 +1,510 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" +#include "timer.h" +#include + +#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE) + #include "rgblight.h" +#endif + + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__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) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +bool has_usb(void) { + return UDADDR & _BV(ADDEN); // This will return true of a USB connection has been established +} + +void matrix_init(void) +{ +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) + rgblight_task(); + #endif + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/vitamins_included/readme.md b/keyboards/vitamins_included/readme.md new file mode 100644 index 00000000000..0163f154e0a --- /dev/null +++ b/keyboards/vitamins_included/readme.md @@ -0,0 +1,126 @@ +Let's Split Vitamins Included +====== +![Let's Split Vitamins included, assmebled in 3D printed case](https://i.imgur.com/btl0vNQ.jpg) + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ + + +**Hardware files for the Let's Split vitamins included are stored [here](http://github.com/duckle29/let-s-Split-v2/tree/onboardMCU)** + +## First Time Setup + +Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs + +If everything worked correctly you will see a file: + +```bash +lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex +``` + +If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so: + +```bash +make lets_split_vitamins/rev1:default:avrdude +``` + +This will both compile the hex, and flash the connected half. + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + + +Features +-------- + +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* You only need 3 wires to connect the two halves. One for VCC, one for GND and one + for serial communication. +* Optional support for I2C connection between the two halves if for some + reason you require a faster connection between the two halves. Note this + requires an extra wire between halves and pull-up resistors on the data lines. + This is supported on the vitamins included. + The extra data line can also be used for ws2812 type LEDs. + If neither I2C nor RGB underglow is used, a TRS cable can be used instead of the 4wire TRRS cables. + +Required Hardware +----------------- +|Amount| Description | +|--|--| +| 1 | PCB kit from novelkeys | +| 48 | MX compatible switches | +| 48 | 1U keycaps +| 2 | Half cases. A 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051). Mirror that to get a right-half case. Plate cases will be designed in the future. +| 1 | USB-mini-B cable of your choice | +| 1 | TRS / TRRS cable + +Optional Hardware +----------------- + +A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware from github. + +A strip of WS2812 LEDs can be hooked up too, a guide will be written on how to do that once I get mine in the mail. +The PCB and connectors can safely handle 1A of current, but the USB standard is only rated at 500mA. Keep that in mind when picking the amount of LEDs. + + +## Using I2C + +On the left half PCB, there's two pads labled ***I2C Pullup*** if you want to use I2C, you need to bridge those two solder jumpers with a soldering iron. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +Notes on Software Configuration +------------------------------- + +Configuring the firmware is similar to any other QMK project. One thing +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between +the two halves, so because the let's split vitamins included has 4 rows in each half, it's +`MATRIX_ROWS=8`. + +Also, the current implementation assumes a maximum of 8 columns, but it would +not be very difficult to adapt it to support more if required. + + +## Entering bootloader +If the keyboard isn't new, and has been flashed before, you need to enter bootloader. +To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png) + +If using the default keymap, there's a reset key-combination on each half: +***Lower (SW23) and left-shift (SW13)*** on the left half, or +***Raise(SW44) and Enter(SW42)*** on the right half +It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that. + +The board exits bootloader mode after 8 seconds, if you haven't started flashing. + +## EEPROM + +If this is the first time you're flashing the boards, you have to flash EEPROM + +0. If your keyboard is plugged in, unplug it +1. Open a terminal, and navigate to the qmk_firmware folder +2. Run `ls /dev | grep tty` Note down which ports you see +2. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode +4. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode +6. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./keyboards/lets_split_vitamins/eeprom-lefthand.eep":a` +Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number. +Do the same For the right hand, but change the file to ***eeprom-righthand.eep*** + +Your EEPROM should be flashed :) + +In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't) + +## Flashing +If you haven't flashed EEPROM before, do that first. + +To flash keymaps onto the keyboard, use: +```bash +make lets_split_vitamins/rev1:[KEYMAP]:avrdude +``` +from the qmk_firmware folder. Default being the default keymap. + +You can plug either half into USB and it will work. you can also remove the TRS/TRRS cable, and plug both halves in. (which is why the default layout has reset on both halves) + +Enjoy your keyboard! :D diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h new file mode 100644 index 00000000000..50168237bc6 --- /dev/null +++ b/keyboards/vitamins_included/rev1/config.h @@ -0,0 +1,92 @@ +/* +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 REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEE5 +#define PRODUCT_ID 0xF33D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Duckle29 +#define PRODUCT Lets Split sockets vitamins included +#define DESCRIPTION A split keyboard for the cheapish makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { F5, F6, C7, F7 } +#define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define 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)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F0 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 16 // Number of LEDs +#define ws2812_PORTREG PORTF +#define ws2812_DDRREG DDRF +#define RGBLIGHT_ANIMATIONS + +/* Audio settings */ +#ifdef AUDIO_ENABLE + #define C6_AUDIO // Define this to enable the buzzer +#endif + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/vitamins_included/rev1/rev1.c b/keyboards/vitamins_included/rev1/rev1.c new file mode 100644 index 00000000000..56fbb878708 --- /dev/null +++ b/keyboards/vitamins_included/rev1/rev1.c @@ -0,0 +1,13 @@ +#include "rev1.h" + + +#ifdef SSD1306OLED +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); +} +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/vitamins_included/rev1/rev1.h b/keyboards/vitamins_included/rev1/rev1.h new file mode 100644 index 00000000000..743c341c3cd --- /dev/null +++ b/keyboards/vitamins_included/rev1/rev1.h @@ -0,0 +1,40 @@ +#ifndef REV1_H +#define REV1_H +#define DISABLE_JTAG // The keyboard uses PF4, PF5 and PF7, which are used by JTAG. +#define EE_HANDS // This isn't optional for the vitamins included + +#include QMK_KEYBOARD_H + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + +#define LAYOUT_ortho_4x12 KEYMAP +#endif diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk new file mode 100644 index 00000000000..0542810ee6e --- /dev/null +++ b/keyboards/vitamins_included/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = yes +DEBUG_ENABLE = no +CONSOLE_ENABLE = no diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk new file mode 100644 index 00000000000..786f247bdee --- /dev/null +++ b/keyboards/vitamins_included/rules.mk @@ -0,0 +1,75 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.c + +# 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 +# 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 = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 = 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +USE_I2C = 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 + +CUSTOM_MATRIX = yes + +LAYOUTS = ortho_4x12 + +DEFAULT_FOLDER = vitamins_included/rev1 diff --git a/keyboards/vitamins_included/serial.c b/keyboards/vitamins_included/serial.c new file mode 100644 index 00000000000..4d37eeb8d30 --- /dev/null +++ b/keyboards/vitamins_included/serial.c @@ -0,0 +1,229 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } + contacted_by_master = true; +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/vitamins_included/serial.h b/keyboards/vitamins_included/serial.h new file mode 100644 index 00000000000..ade7620b7f4 --- /dev/null +++ b/keyboards/vitamins_included/serial.h @@ -0,0 +1,27 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include +#include "split_util.h" + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/vitamins_included/split_util.c b/keyboards/vitamins_included/split_util.c new file mode 100644 index 00000000000..b86ad137bf2 --- /dev/null +++ b/keyboards/vitamins_included/split_util.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" +#include "debug.h" + +volatile bool isLeftHand = true; +volatile bool contacted_by_master = false; + +// this code runs before the usb and keyboard is initialized +void matrix_setup(void) { + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); +} diff --git a/keyboards/vitamins_included/split_util.h b/keyboards/vitamins_included/split_util.h new file mode 100644 index 00000000000..5acf386e4f9 --- /dev/null +++ b/keyboards/vitamins_included/split_util.h @@ -0,0 +1,18 @@ +#ifndef SPLIT_KEYBOARD_UTIL_H +#define SPLIT_KEYBOARD_UTIL_H + +#include +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; +extern volatile bool contacted_by_master; + +bool has_usb(void); + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + + +#endif diff --git a/keyboards/vitamins_included/vitamins_included.c b/keyboards/vitamins_included/vitamins_included.c new file mode 100644 index 00000000000..650f26001e6 --- /dev/null +++ b/keyboards/vitamins_included/vitamins_included.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +#ifdef ONEHAND_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, + {{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, 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}}, +}; +#endif diff --git a/keyboards/vitamins_included/vitamins_included.h b/keyboards/vitamins_included/vitamins_included.h new file mode 100644 index 00000000000..b5fbd52940e --- /dev/null +++ b/keyboards/vitamins_included/vitamins_included.h @@ -0,0 +1,25 @@ +#ifndef VITAMINS_INCLUDED_H +#define VITAMINS_INCLUDED_H + +#include "quantum.h" + +#include "rev1.h" + + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + KEYMAP( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + ) + +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP + +#endif diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index b5a7c18f88b..09e8bc59987 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_MEDIA] = LAYOUT_ortho_5x7( - KC_MAKE, KC_RESET,MU_TOG, AUD_ON, AUD_OFF, KC_FXCL, RGB_SAD, + KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/viterbi/keymaps/drashna/rules.mk index 4dc6bbdac7a..4b5596a53e6 100644 --- a/keyboards/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/viterbi/keymaps/drashna/rules.mk @@ -8,5 +8,12 @@ RGBLIGHT_ENABLE = yes AUDIO_ENABLE = yes NKRO_ENABLE = yes -CUSTOM_MATRIX = no +CUSTOM_LAYOUT = no LAYOUTS = ortho_5x7 + +# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) +# SRC := $(filter-out serial.c,$(SRC)) +# SRC := $(filter-out matrix.c,$(SRC)) +# SRC := $(filter-out i2c.c,$(SRC)) +# SRC := $(filter-out split_util.c,$(SRC)) +# SRC += quantum/matrix.c diff --git a/keyboards/whitefox/keymaps/dudeofawesome/keymap.c b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c new file mode 100644 index 00000000000..59102c3ebe3 --- /dev/null +++ b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c @@ -0,0 +1,150 @@ +#include "whitefox.h" + +enum whitefox_layers { + _QWERTY, + _WORKMAN, + _COLEMAK, + _DVORAK, + _FUNC, +}; + +enum whitefox_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + COLEMAK, + DVORAK, + FUNC, +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY (Default Layer) + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Prt| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |Fn/CL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [_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_EQL, KC_BSLS,KC_GRV, 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_BSPC, KC_DEL, \ + LT(_FUNC,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_PGUP,\ + 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_UP, KC_PGDN,\ + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + /* Workman + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Prt| + * |---------------------------------------------------------------| + * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |Fn/CL | A| S| H| T| G| Y| N| E| O| I| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| M| C| V| K| L| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [_WORKMAN] = 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_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ + LT(_FUNC,KC_CAPS),KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, 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 \ + ), + /* Dvorak + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| `| \|Prt| + * |---------------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =|Backs|Del| + * |---------------------------------------------------------------| + * |Fn/CL | A| O| E| U| I| D| H| T| N| S| -|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | ;| Q| J| K| X| B| M| W| V| Z|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [_DVORAK] = 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_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ + 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_BSPC, KC_DEL, \ + LT(_FUNC,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_PGUP,\ + KC_LSFT, KC_NUBS,KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z,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 \ + ), + /* Colemak + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| +| `| \|Prt| + * |---------------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |Fn/CL | A| R| S| T| D| H| N| E| I| O| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| K| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [_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_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ + 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_BSPC, KC_DEL, \ + LT(_FUNC,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_NUHS,KC_ENT, KC_PGUP,\ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, 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 \ + ), + /* Function + * ,---------------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | + * `---------------------------------------------------------------' + */ + [_FUNC] = KEYMAP( \ + RESET, 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_WH_D,KC_BTN2,KC_MS_U,KC_BTN1,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______,KC_WH_U,KC_MS_L,KC_MS_D,KC_MS_R,AG_NORM,AG_SWAP,QWERTY, WORKMAN,DVORAK, COLEMAK,_______,_______,_______, _______,\ + _______,_______,KC_WH_L,KC_BTN3,KC_WH_R,_______,_______,_______,_______,_______,_______,_______,_______, KC_VOLU,_______,\ + _______,_______,_______, KC_MPLY, _______,_______,_______, KC_MPRV,KC_VOLD,KC_MNXT \ + ), +}; + +// const uint16_t fn_actions[] = { +// [0] = ACTION_LAYER_MOMENTARY(1), +// }; + +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; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + } + return true; +} diff --git a/keyboards/whitefox/keymaps/dudeofawesome/readme.md b/keyboards/whitefox/keymaps/dudeofawesome/readme.md new file mode 100644 index 00000000000..b5a33e74f6f --- /dev/null +++ b/keyboards/whitefox/keymaps/dudeofawesome/readme.md @@ -0,0 +1,20 @@ +# DudeOfAwesome's WhiteFox layout + +![WhiteFox Layout](https://i.imgur.com/TYYqJbP.png) + +## Features + +- Base Layers + - QWERTY + - Workman + - Dvorak + - Colemak +- Mouse Keys + +## Building and flashing + +1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware +1. Flash: + ```bash + $ make whitefox:dudeofawesome:dfu-util + ``` diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json index f60493762d4..ba3c4b5413e 100644 --- a/keyboards/xd60/info.json +++ b/keyboards/xd60/info.json @@ -4,8 +4,12 @@ "width": 15, "height": 5, "layouts": { - "LAYOUT_ALL": { + "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "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":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"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/xd60/keymaps/Jos/keymap.c b/keyboards/xd60/keymaps/Jos/keymap.c index 5c5f93622cc..87dbad159a5 100644 --- a/keyboards/xd60/keymaps/Jos/keymap.c +++ b/keyboards/xd60/keymaps/Jos/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" // TODO: THOSE ARE IDEAS: @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - LAYOUT_ALL( + LAYOUT_all( KC_GRAVE, 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_ESC, 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, \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, TD(0), KC_LALT, KC_SPC , KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function 1 Layers - LAYOUT_ALL( + LAYOUT_all( RESET, 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_PSCR, \ KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS, \ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), // 2: GUI/Function 2 Layer - LAYOUT_ALL( + 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_PAUS, KC_PSCR, \ KC_TRNS, KC_TRNS, AC_G_W, AC_G_E, KC_TRNS, AC_G_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, AC_G_S, AC_G_D, KC_TRNS, KC_TRNS, AC_G_H, KC_TRNS, KC_TRNS, AC_G_L, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, AC_G_SPC, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), // 3: NumPad/Function 3 Toggle Layer - LAYOUT_ALL( + LAYOUT_all( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PSLS, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_NO, KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_4, KC_5, KC_6, KC_PAST, KC_NO, KC_NO, KC_NO, \ KC_TRNS, KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_1, KC_2, KC_3, KC_PMNS, KC_PENT, KC_NO, KC_TRNS, \ @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_PENT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS) , // TRaNSparent layer for reference -/* LAYOUT_ALL( +/* 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_NO, KC_TRNS, \ diff --git a/keyboards/xd60/keymaps/birkir/keymap.c b/keyboards/xd60/keymaps/birkir/keymap.c index 1f3b04e5ec7..35b60ae810e 100644 --- a/keyboards/xd60/keymaps/birkir/keymap.c +++ b/keyboards/xd60/keymaps/birkir/keymap.c @@ -1,10 +1,10 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + 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_BSPC, 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_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, \ @@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // 1: Function Layer - KEYMAP( + LAYOUT_all( KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, BL_DEC, BL_INC, KC_F13, KC_F14, \ KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // 2: Cool Layer - KEYMAP( + LAYOUT_all( RESET, BL_DEC, BL_INC, BL_ON, BL_OFF, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_MODE_PLAIN, KC_TRNS, \ KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c index 5032d0fcc23..3c418c5dc0e 100644 --- a/keyboards/xd60/keymaps/cheese/keymap.c +++ b/keyboards/xd60/keymaps/cheese/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" // Each layer gets a name for readability. @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right| * `-----------------------------------------------------------' */ - [_BL] = LAYOUT_ALL( + [_BL] = 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_BSPC, 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(_FL), 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, \ @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), // Function Layer - [_FL] = LAYOUT_ALL( + [_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, KC_DEL, KC_DEL, \ KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END), // Left Shift Layer - [_LS] = LAYOUT_ALL( + [_LS] = LAYOUT_all( KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), // Right Shift Layer - [_RS] = LAYOUT_ALL( + [_RS] = LAYOUT_all( KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, 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/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index 95dea16b488..f8b44dc0a73 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -1,10 +1,10 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - LAYOUT_ALL( + 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_BSPC, 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_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, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - LAYOUT_ALL( + LAYOUT_all( RESET, 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_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/edulpn/keymap.c b/keyboards/xd60/keymaps/edulpn/keymap.c new file mode 100644 index 00000000000..4ff00140aa0 --- /dev/null +++ b/keyboards/xd60/keymaps/edulpn/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + 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_BSPC, KC_NO, \ + 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_RSHIFT, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_NO, KC_RGUI, KC_RCTL), + + // 1: Function Layer + 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_DEL, KC_NO, \ + KC_NO, KC_NO, KC_UP, KC_NO, KC_INSERT, KC_HOME, KC_PGUP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, KC_END, KC_PGDN, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_NO, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_NO, KC_RGUI, KC_RCTL), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +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; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/xd60/keymaps/edulpn/readme.md b/keyboards/xd60/keymaps/edulpn/readme.md new file mode 100644 index 00000000000..14f7da063d1 --- /dev/null +++ b/keyboards/xd60/keymaps/edulpn/readme.md @@ -0,0 +1,9 @@ +# Edulpn Keymap for the XD60 PCB + +## Additional Notes +60% Keymap for XD60 with GH60 ANSI layout (based on Supercoffe's keymap) + customized Fn layer. + +![Edulpn Keymap for the XD60 PCB](https://i.imgur.com/PoL5qcr.png) + +## Build +To build the default keymap, simply run `make xd60:edulpn`. diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index 2d8824017c1..2ca2ea807b0 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define _BL 0 @@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [_BL] = LAYOUT_ALL( + [_BL] = 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_BSPC, KC_NO, \ 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_NO, \ 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, \ @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - [_FL] = LAYOUT_ALL( + [_FL] = LAYOUT_all( RESET, 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_NO, \ KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xd60/keymaps/kmontag42/keymap.c index 78f70299400..719700d66cc 100644 --- a/keyboards/xd60/keymaps/kmontag42/keymap.c +++ b/keyboards/xd60/keymaps/kmontag42/keymap.c @@ -1,11 +1,11 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "backlight.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - LAYOUT_ALL( + LAYOUT_all( KC_LEAD, 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_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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DOT, KC_ENT, \ @@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), // 1: Function Layer - LAYOUT_ALL( + LAYOUT_all( RESET, 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_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, \ diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c index 95a3e3fadf4..6a460cd34ab 100644 --- a/keyboards/xd60/keymaps/krusli/keymap.c +++ b/keyboards/xd60/keymaps/krusli/keymap.c @@ -1,40 +1,26 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" -/* HHKB-like layout for standard 60% layout with split RShift and split backspace */ +#define _______ KC_TRNS -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#define _BASE 0 +#define _FN 1 - // 0: Base Layer - 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_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_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_RSFT, KC_RSFT, F(0), \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, F(0), KC_RCTL, KC_RCTL), - - // 1: Function Layer - /* 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 | | | | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - */ - LAYOUT_ALL( - RESET, 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_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_NO, KC_ENT, \ - KC_TRNS, 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, KC_TRNS, KC_TRNS, F(0), KC_TRNS, KC_TRNS), +/* HHKB-like layout for standard 60% layout with split RShift */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_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_RSFT, KC_RSFT, MO(1), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, _______, KC_APP, KC_RCTL), + + [_FN] = 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_DEL, _______, \ + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_INS, \ + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_NO, _______, \ + _______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______), }; // Custom Actions diff --git a/keyboards/xd60/keymaps/krusli/readme.md b/keyboards/xd60/keymaps/krusli/readme.md index aefb23cca3b..34f46e026ca 100644 --- a/keyboards/xd60/keymaps/krusli/readme.md +++ b/keyboards/xd60/keymaps/krusli/readme.md @@ -1,7 +1,7 @@ # krusli's Keymap for XIUDI's 60% XD60 PCB ## Additional Notes -Keymap for the XD60 with 2.25u left shift and split backspace. HHKB-like function layer. +Keymap for the XD60 (ANSI) with 2.25u left shift, split right shift. HHKB-like function layer. ## Build To build this keymap, simply run `make xd60:krusli` on the top-level directory for QMK. diff --git a/keyboards/xd60/keymaps/petesmom/keymap.c b/keyboards/xd60/keymaps/petesmom/keymap.c index f89db54b683..d6c9035c287 100644 --- a/keyboards/xd60/keymaps/petesmom/keymap.c +++ b/keyboards/xd60/keymaps/petesmom/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define BASE 0 @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [BASE] = LAYOUT_ALL( + [BASE] = 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_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, \ @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_SLSH, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(FN), KC_LEFT, KC_DOWN, KC_RIGHT ), // 1: Function Layer - [FN] = LAYOUT_ALL( + [FN] = 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_DEL, KC_DEL, \ KC_TRNS, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MRWD, KC_MFFD, KC_MSTP, \ KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c index 3083d42055f..bea96a30d99 100644 --- a/keyboards/xd60/keymaps/rooski/keymap.c +++ b/keyboards/xd60/keymaps/rooski/keymap.c @@ -1,6 +1,6 @@ // XD60 Rev 2.0 -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" //#include "action_tapping.h" #include "backlight.h" @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ // 0: Base Layer - [_BL] = LAYOUT_ALL( + [_BL] = 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_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, XXXXXXX, KC_ENT, \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - [_FL] = LAYOUT_ALL( + [_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, KC_DEL, KC_DEL, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_LK), _______, KC_HOME, _______, KC_END), // 2: Lighting Keys - [_LK] = LAYOUT_ALL( + [_LK] = LAYOUT_all( TO(_BL), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ RESET , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c index 100edaa78ec..f0eaa97cb0b 100644 --- a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c +++ b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ // 0: Base Layer - LAYOUT_ALL( + 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_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_BSPC, \ F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, \ @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_CAPS, KC_RSFT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - LAYOUT_ALL( + 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, BL_TOGG, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, \ diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index 675c4c5a5ef..a0a69c476d5 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -1,10 +1,10 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - LAYOUT_ALL( + 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_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, \ F(0), 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, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - LAYOUT_ALL( + LAYOUT_all( RESET, 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_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ F(0), 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_ENT, \ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END), // 2: RGB Layer - LAYOUT_ALL( + LAYOUT_all( KC_NO, BL_TOGG, BL_STEP, 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, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ diff --git a/keyboards/xd60/keymaps/supercoffee/keymap.c b/keyboards/xd60/keymaps/supercoffee/keymap.c index 22c4fbd8ec6..d42e611e9cc 100644 --- a/keyboards/xd60/keymaps/supercoffee/keymap.c +++ b/keyboards/xd60/keymaps/supercoffee/keymap.c @@ -1,10 +1,10 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - LAYOUT_ALL( + 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_BSPC, KC_NO, \ 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, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), // 1: Function Layer - LAYOUT_ALL( + 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_F13, KC_F14, \ KC_NO, KC_NO, KC_UP, KC_END, KC_NO, KC_NO, KC_CALC, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/yuuki/keymap.c b/keyboards/xd60/keymaps/yuuki/keymap.c index 31309464b8f..7e2fd7a0dd8 100644 --- a/keyboards/xd60/keymaps/yuuki/keymap.c +++ b/keyboards/xd60/keymaps/yuuki/keymap.c @@ -1,4 +1,4 @@ -#include "xd60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define BASE 0 @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [BASE] = LAYOUT_ALL( + [BASE] = 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_BSPC, 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, \ CTL_SLSH, 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, \ @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), // 1: Function Layer - [FN] = LAYOUT_ALL( + [FN] = 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_DEL, KC_DEL, \ KC_TRNS, RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, \ KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rules.mk index 759347214b7..50fba97e5fc 100644 --- a/keyboards/xd60/rules.mk +++ b/keyboards/xd60/rules.mk @@ -63,3 +63,5 @@ 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. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 8dc0d7ee329..579d67dd343 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -14,24 +14,38 @@ * B0 not connected */ inline void xd60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } +inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } +inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } /* XD60 Keymap Definition Macro */ -#define LAYOUT_ALL( \ +#define LAYOUT_all( \ 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, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K47, K3D, K3C, \ K40, K41, K42, K45, K4A, K4B, K48, 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, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,K47, K48, K49, 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, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, K47, K48, K49, 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, K1D, \ + 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, 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 } \ } #endif diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index 6e95936c845..5d09dfa27cc 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -3,7 +3,7 @@ //aliases for clarity in layering #define _______ KC_TRNS #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac -#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC +// #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) #define C_RGHT LCTL(KC_RGHT) @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, { NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, CBSPC , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ }, + { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ }, }, /* SYMBOL @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | = | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | -_ | | | | | + * | | HOME | END | BL_OFF | BL_ON | | | | | | -_ | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | | | | | | | | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______}, { KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC}, { _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - { _______, BL_OFF , BL_ON , BL_DEC , BL_INC , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______}, + { _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______}, { _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______}, }, @@ -102,15 +102,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, { _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END , G_GRV , _______}, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , ABSPC , KC_HOME, KC_END , G_GRV , _______}, { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, }, [_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGDN, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGUP, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , KC_HOME, _______, KC_END , _______, _______}, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______}, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______}, { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, } }; diff --git a/keyboards/xd75/keymaps/rambo/keymap.c b/keyboards/xd75/keymaps/rambo/keymap.c deleted file mode 100644 index 6e95936c845..00000000000 --- a/keyboards/xd75/keymaps/rambo/keymap.c +++ /dev/null @@ -1,150 +0,0 @@ -#include "xd75.h" - -//aliases for clarity in layering -#define _______ KC_TRNS -#define A_BSPC LALT(KC_BSPC) // delete whole word in Mac -#define C_BSPS LCTL(KC_BSPC) // delete whole word in PC -#define A_LEFT LALT(KC_LEFT) -#define A_RGHT LALT(KC_RGHT) -#define C_RGHT LCTL(KC_RGHT) -#define C_LEFT LCTL(KC_LEFT) -#define SftEnt SFT_T(KC_ENT) -#define GBSPC LGUI_T(KC_BSPC) -#define CBSPC LCTL_T(KC_BSPC) - -//internet browser tab shortcuts and window swapping for Mac and Win -#define GSL LGUI(S(KC_LEFT)) // back one tab in Safari -#define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari -#define CTLPGDN LCTL(KC_PGDN) // back one tab on Windows -#define CTLPGUP LCTL(KC_PGUP) // forward one tab on Windows -#define G_TAB LGUI(KC_TAB) // MAC: switch applications -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application -#define A_TAB LALT(KC_TAB) -#define C_TAB LCTL(KC_TAB) - -// -#define NAV LT(3, KC_TAB) -#define NAVPC LT(4, KC_TAB) - -// Layer shorthand -#define _COLEMAK 0 -#define _PC 1 -#define _SYMBOL 2 //Function keys, numbers, symbols, Backlighting -#define _NAV 3 //Navigation Layer on Mac -#define _NAVPC 4 //Navigation Layer on Win - -//tapdance declarations -enum { - SFT_LCK -}; - -//alias for tapdance -#define SftLck TD(SFT_LCK) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* COLEMAK - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | `~ | 1 | 2 | 3 | 4 | 5 | - | SWITCH | = | 6 | 7 | 8 | 9 | 0 | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | ESC/`~ | Q | W | F | P | G | [ | \ | ] | J | L | U | Y | ; | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | NAVTAB | A | S | D | F | G | PgUp |PlayPaus| ENTER | H | N | E | I | O | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * |SFT/CAPS| Z | X | C | V | B | PgDn | UP | ENTER | K | M | , | . | / | SftEnt | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | DEL | LGUI | LCTRL | LALT | LGUI | BKSPC | LEFT | DOWN | RIGHT | SPACE | SYMBOL | RGUI | RALT | RCTRL | BL | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_COLEMAK] = { /* COLEMAK */ - { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, - { NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - { KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(2) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP }, - }, - -// Windows Layer: essentially swaps Control and GUI - - [_PC] = { /* WINDOWS */ - { _______, _______, _______, _______, _______, _______, _______, TG(0) , _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, CBSPC , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ }, - }, - -/* SYMBOL - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | [{ | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | }] | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | = | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | -_ | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_SYMBOL] = { /* SYMBOL */ - { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______}, - { KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC}, - { _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - { _______, BL_OFF , BL_ON , BL_DEC , BL_INC , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, - - - [_NAV] = { /* NAVIGATION for Mac */ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END , G_GRV , _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, - - [_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGDN, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGUP, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , KC_HOME, _______, KC_END , _______, _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - } -}; - -// Shift vs capslock function. From bbaserdem's Planck keymap. -void caps_tap (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_LSFT); - } else if (state->count == 2) { - unregister_code (KC_LSFT); - register_code (KC_CAPS); - } -} -void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_LSFT); - } else { - unregister_code (KC_CAPS); - } -} - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Shift, twice for Caps Lock - [SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) -}; - -/* Template for future layers - [_LAYER_NAME] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - } -}; -*/ diff --git a/keyboards/xd75/keymaps/rambo/readme.md b/keyboards/xd75/keymaps/rambo/readme.md deleted file mode 100644 index 17b928c501f..00000000000 --- a/keyboards/xd75/keymaps/rambo/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# A Colemak layout for XD75 with both Mac and Windows layers. -# These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout. -# Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing. -# The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file diff --git a/keyboards/xd75/keymaps/rambo/rules.mk b/keyboards/xd75/keymaps/rambo/rules.mk deleted file mode 100644 index edc9cc6bc1f..00000000000 --- a/keyboards/xd75/keymaps/rambo/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -TAP_DANCE_ENABLE = yes # Enable tap dance functionality \ No newline at end of file diff --git a/keyboards/xd75/keymaps/tdl-jturner/config.h b/keyboards/xd75/keymaps/tdl-jturner/config.h new file mode 100644 index 00000000000..561a48d7eb8 --- /dev/null +++ b/keyboards/xd75/keymaps/tdl-jturner/config.h @@ -0,0 +1,38 @@ +/* Copyright 2018 Josh Turner (/u/tdl-jturner) + * + * 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 . + */ + + // additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +//#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 +//#define PERMISSIVE_HOLD +//#define QMK_KEYS_PER_SCAN 4 +#define PREVENT_STUCK_MODIFIERS +#define FORCE_NKRO + +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#endif diff --git a/keyboards/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xd75/keymaps/tdl-jturner/keymap.c new file mode 100644 index 00000000000..9789d9a8678 --- /dev/null +++ b/keyboards/xd75/keymaps/tdl-jturner/keymap.c @@ -0,0 +1,312 @@ +/* Copyright 2018 Josh Turner (/u/tdl-jturner) + * + * 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" + +enum xd75_layers { + _QWERTY, + _COLEMAK, + _LYMD, + _LYFK, + _LYMED, + _LYNUM, + _LYNAV, + _LYMOS, + _LYSYS, + _LYLT +}; + +enum xd75_keycodes { + HELP = SAFE_RANGE, + KC_BSDEL, + KC_FBSLH, + KC_DOTQ, + KC_CPIPE, + COLEMAK, + QWERTY, + KC_LYDEF +}; + +//Tap Dance Declarations +enum { + TD_LOCK_SLEEP, + TD_ABK, + TD_BRC, + TD_CBR, +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_LOCK_SLEEP] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_L), KC_SLEP), + [TD_ABK] = ACTION_TAP_DANCE_DOUBLE(KC_LABK,KC_RABK), + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC,KC_RBRC), + [TD_CBR] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR,KC_RCBR) +// Other declarations would go here, separated by commas, if you have them +}; + +//remaps for pretty layouts +#define ________ KC_TRNS +#define ___XX___ KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + //QWERY - Base Layer + [_QWERTY] = { + {KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS}, + {KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,________ ,________,________, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSDEL}, //Custom shift Codes. Backspace ^ Delete +{LT(_LYMD,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_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_N , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC }, // Custom Shift Codes. ,^| .^? /^| + { KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP)} + + }, + + //_COLEMAK - Colemak Layout - Identical to qwerty layer except for the layout changes + [_COLEMAK] = { + {KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS}, + {KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G ,________ ,________,________, KC_J , KC_L , KC_U , KC_Y ,KC_SCLN ,KC_BSDEL}, //Custom shift Codes. Backspace ^ Delete +{LT(_LYMD,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_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_K , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC }, // Custom Shift Codes. ,^| .^? /^| + { KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP)} + + }, + + // Decision Layer + [_LYMD] = + { + {________,________ ,________ ,________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {________,MO(_LYFK) ,MO(_LYMED),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________}, + {________,MO(_LYNUM),MO(_LYNAV),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {________,MO(_LYMOS),MO(_LYSYS),MO(_LYLT) ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {________,________ ,________ ,________ ,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___} + }, + + //F Keys + [_LYFK] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,___XX___}, + {________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___} + }, +//Media Keys +[_LYMED] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLU ,___XX___,___XX___,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPRV ,KC_MUTE ,KC_MNXT ,___XX___,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLD ,___XX___,KC_MSTP ,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPLY ,___XX___,___XX___,___XX___,___XX___} + }, +//Num Keys +[_LYNUM] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_PEQL ,KC_PSLS ,KC_PAST ,KC_PMNS ,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_7 ,KC_8 ,KC_9 ,KC_MINUS,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_4 ,KC_5 ,KC_6 ,KC_PPLS ,KC_PSLS }, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_1 ,KC_2 ,KC_3 ,KC_PENT ,KC_PAST }, + {________,________,________,________,________,________,________,________,________,________,KC_0 ,KC_0 ,KC_PDOT ,KC_PEQL ,___XX___} + }, +//Navigation Keys +[_LYNAV] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_HOME ,KC_UP ,KC_PGUP ,KC_PSCR ,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_LEFT ,KC_F5 ,KC_RIGHT,KC_SLCK ,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_END ,KC_DOWN ,KC_PGDN ,KC_PAUS ,___XX___}, + {________,________,________,________,________,________,________,________,________,________,________,KC_INS ,KC_DEL ,___XX___,___XX___} + }, + //Mouse Keys + [_LYMOS] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_U ,KC_WH_U ,KC_ACL2 ,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MS_L ,KC_ACL0 ,KC_MS_R ,KC_ACL1 ,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_D ,KC_WH_D ,KC_BTN2 ,___XX___}, + {________,________,________,________,________,________,________,________,________,________,KC_BTN1 ,KC_BTN3 ,KC_BTN4 ,___XX___,___XX___} + }, + //Systen Keys + [_LYSYS] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,QWERTY ,COLEMAK ,___XX___,RESET }, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___} + }, + +// Light Control +[_LYLT] = + { + {________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___}, + {KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI }, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_TOG ,RGB_RMOD,RGB_MOD ,___XX___,___XX___,___XX___}, + {________,________,________,________,________,________,___XX___,___XX___,___XX___,BL_TOGG ,BL_DEC ,BL_INC ,BL_BRTG ,___XX___,___XX___}, + {________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___} + } +}; + +//Define layer colors +#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255) +#define rgblight_setrgb_user_LYFK() rgblight_sethsv_red() +#define rgblight_setrgb_user_LYMED() rgblight_sethsv_blue() +#define rgblight_setrgb_user_LYNUM() rgblight_sethsv_purple() +#define rgblight_setrgb_user_LYNAV() rgblight_sethsv_cyan() +#define rgblight_setrgb_user_LYMOS() rgblight_sethsv_orange() +#define rgblight_setrgb_user_LYSYS() rgblight_sethsv_green() +#define rgblight_setrgb_user_LYLT() rgblight_sethsv_yellow() +#define rgblight_setrgb_user_LYMD() rgblight_sethsv_white() + +//initialize rgb +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb_user_base(); +} + +//Set a color based on the layer +uint32_t layer_state_set_user(uint32_t state) { + switch(biton32(state)) { + case _LYFK: + rgblight_setrgb_user_LYFK(); + break; + case _LYMED: + rgblight_setrgb_user_LYMED(); + break; + case _LYNUM: + rgblight_setrgb_user_LYNUM(); + break; + case _LYNAV: + rgblight_setrgb_user_LYNAV(); + break; + case _LYMOS: + rgblight_setrgb_user_LYMOS(); + break; + case _LYSYS: + rgblight_setrgb_user_LYSYS(); + break; + case _LYLT: + rgblight_setrgb_user_LYLT(); + break; + case _LYMD: + rgblight_setrgb_user_LYMD(); + break; + default: + rgblight_setrgb_user_base(); + break; + } + return state; +} + + +//Const for shift +const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch(keycode) { + case KC_LYDEF: + layer_clear(); + return false; + break; + 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 KC_BSDEL: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + unregister_code(KC_LSHIFT); + } + else { + unregister_code(KC_RSHIFT); + } + register_code(KC_DEL); + } + else { + register_code(KC_BSPC); + } + } + else { + unregister_code(KC_DEL); + unregister_code (KC_BSPC); + } + return false; + break; + case KC_FBSLH: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + unregister_code(KC_LSHIFT); + } + else { + unregister_code(KC_RSHIFT); + } + register_code(KC_BSLASH); + } + else { + register_code(KC_SLSH); + } + } + else { + unregister_code(KC_BSLASH); + unregister_code (KC_SLSH); + } + return false; + break; + case KC_DOTQ: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + register_code(KC_SLSH); // shifted slash = ? + } + else { + register_code(KC_DOT); + } + } + else { + unregister_code(KC_SLSH); // shifted slash = ? + unregister_code (KC_DOT); + } + return false; + break; + case KC_CPIPE: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + register_code(KC_BSLS); + } + else { + register_code(KC_COMM); + } + } + else { + unregister_code(KC_BSLS); + unregister_code (KC_COMM); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/xd75/keymaps/tdl-jturner/readme.md b/keyboards/xd75/keymaps/tdl-jturner/readme.md new file mode 100644 index 00000000000..835ef09fb23 --- /dev/null +++ b/keyboards/xd75/keymaps/tdl-jturner/readme.md @@ -0,0 +1,12 @@ +/u/tdl-jturner - XD75 Layout +=== + +Keyboard Layout Editor: [Link](http://www.keyboard-layout-editor.com/#/gists/b2b23097ef70fd9170e266e4cbc06c02) + +Make Command: make xd75:tdl-jturner + +Notes: +* Based on Qwerty +* Tweaks for DBA & Programming including tap dance braces on lower right, custom shift codes, and F5 access on Nav layer +* Layers are all based on layer control on the left and the right is a 10 key pattern +* Layers include Functions, Media, Numpad, Navigation, Mouse, System, and Lighting diff --git a/keyboards/xd75/keymaps/tdl-jturner/rules.mk b/keyboards/xd75/keymaps/tdl-jturner/rules.mk new file mode 100644 index 00000000000..186b452fc63 --- /dev/null +++ b/keyboards/xd75/keymaps/tdl-jturner/rules.mk @@ -0,0 +1,23 @@ +# Copyright 2018 Josh Turner (/u/tdl-jturner) +# +# 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 + +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ymd96/keymaps/JJ50/keymap.c b/keyboards/ymd96/keymaps/JJ50/keymap.c index f59950d445a..b70433ee1df 100644 --- a/keyboards/ymd96/keymaps/JJ50/keymap.c +++ b/keyboards/ymd96/keymaps/JJ50/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_DEFLT] = KEYMAP_JJ50( \ + [_DEFLT] = LAYOUT_jj50( \ 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_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, \ @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP_JJ50( \ + [_RAISE] = LAYOUT_jj50( \ 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = KEYMAP_JJ50( \ + [_LOWER] = LAYOUT_jj50( \ 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index 541ebeb191c..221e390ab45 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -41,7 +41,7 @@ along with this program. If not, see . { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ } -#define KEYMAP_JJ50( \ +#define LAYOUT_jj50( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \ diff --git a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c new file mode 100644 index 00000000000..64da6760c4b --- /dev/null +++ b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 +#define ARROWS 2 + +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), + +[FN] = LAYOUT_60_ansi( + 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_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, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[ARROWS] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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) + + }; \ No newline at end of file diff --git a/layouts/community/60_ansi/mechmerlin-ansi/readme.md b/layouts/community/60_ansi/mechmerlin-ansi/readme.md new file mode 100644 index 00000000000..b845334f54f --- /dev/null +++ b/layouts/community/60_ansi/mechmerlin-ansi/readme.md @@ -0,0 +1,18 @@ +MechMerlin's Standard ANSI 60% Layout +====================== + +This is the 60% layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +YouTube channel. + +It is used on his +[Duck Eagle V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/eagle_viper/v2) +[KBP V60 Type R Polestar](https://github.com/qmk/qmk_firmware/tree/master/keyboards/v60_type_r) +[NPKC KC60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/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 + +### Build +To build this keymap, simply run `make your_keyboard:mechmerlin-ansi`. \ No newline at end of file diff --git a/layouts/community/60_ansi/talljoe-ansi/config.h b/layouts/community/60_ansi/talljoe-ansi/config.h new file mode 100644 index 00000000000..9e27b1b0a78 --- /dev/null +++ b/layouts/community/60_ansi/talljoe-ansi/config.h @@ -0,0 +1,22 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define ENABLE_GAME_LAYER + +#define LAYOUT( \ + 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_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, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) + +#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi/talljoe-ansi/keymap.c b/layouts/community/60_ansi/talljoe-ansi/keymap.c new file mode 100644 index 00000000000..7812add812b --- /dev/null +++ b/layouts/community/60_ansi/talljoe-ansi/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/layouts/community/60_ansi/talljoe-ansi/rules.mk b/layouts/community/60_ansi/talljoe-ansi/rules.mk new file mode 100644 index 00000000000..92007fe8ad7 --- /dev/null +++ b/layouts/community/60_ansi/talljoe-ansi/rules.mk @@ -0,0 +1 @@ +USER_NAME := talljoe diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c new file mode 100644 index 00000000000..56488fb22c4 --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 +#define ARROWS 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT_60_ansi_split_bs_rshift( + 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_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, TG(2), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL), + +[FN] = LAYOUT_60_ansi_split_bs_rshift( + 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_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, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[ARROWS] = LAYOUT_60_ansi_split_bs_rshift( + KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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) + + }; \ No newline at end of file diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md new file mode 100644 index 00000000000..06a2bc241a6 --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/readme.md @@ -0,0 +1,17 @@ +MechMerlin's Split ANSI 60% Layout +====================== + +This is the 60% layout with split backspace and right shift used by u/merlin36, +host of the [MechMerlin](www.youtube.com/mechmerlin) YouTube channel. + +It is used on his +[Sentraq S60-X RGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/s60_x) +[MechanicalKeyboards.com FaceW](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake) + +## 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 the 1u key by right shift + +### Build +To build this keymap, simply run `make your_keyboard:mechmerlin-split`. \ No newline at end of file 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 f5ab0c8dc67..0eacbde3369 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h @@ -3,8 +3,70 @@ #include QMK_KEYBOARD_CONFIG_H -#define PREVENT_STUCK_MODIFIERS +#define ENABLE_GAME_LAYER -#define KM LAYOUT_60_ansi_split_bs_rshift +#define LAYOUT( \ + 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_ansi_split_bs_rshift( \ + 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, K45, K48, K49, K4B, K4C \ +) -#endif //CONFIG_USER_H \ No newline at end of file +/* Color Map */ +#define CM( \ + 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, K47, 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, K2D }, \ + { K30, {}, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, {}, {}, {}, {}, K47, {}, {}, K4A, K4B, K4C, K4D } \ + } + +#ifdef KEYBOARD_zeal60 + + #define ZEAL_RGB + + /* enable/disable LEDs based on layout */ + #undef USE_SPLIT_BACKSPACE + #define USE_SPLIT_BACKSPACE 1 + + #undef USE_SPLIT_LEFT_SHIFT + #define USE_SPLIT_LEFT_SHIFT 0 + + #undef USE_SPLIT_RIGHT_SHIFT + #define USE_SPLIT_RIGHT_SHIFT 1 + + #undef USE_7U_SPACEBAR + #define USE_7U_SPACEBAR 0 + + #undef USE_ISO_ENTER + #define USE_ISO_ENTER 0 + + #undef TAPPING_TOGGLE + #define TAPPING_TOGGLE 2 + + #undef BACKLIGHT_MOD_LAYER_3 + #define BACKLIGHT_MOD_LAYER_3 RESET_LAYER + + #undef BACKLIGHT_ALPHAS_MODS_ROW_0 + #undef BACKLIGHT_ALPHAS_MODS_ROW_1 + #undef BACKLIGHT_ALPHAS_MODS_ROW_2 + #define BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 + #define BACKLIGHT_ALPHAS_MODS_ROW_1 0b0010000000000001 + #define BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 + +#endif //KEYBOARD_zeal60 + +#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c b/layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c index 7eff999305f..b5dc5449276 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c @@ -1,113 +1,89 @@ -#include QMK_KEYBOARD_H +#ifdef KEYBOARD_zeal60 +#include "config.h" +#include "zeal60.h" +#include "zeal_backlight.h" +#include "action_layer.h" +#include "solarized.h" +#include "talljoe.h" -enum layers { - _BASE = 0, - _WORKMAN, - _NORMAN, - _DVORAK, - _COLMAK, - _GAME, - _NAV, - _ADJUST, - _RESET, -}; +// 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 ); -#define _______ KC_TRNS -#define XXXXXXX KC_NO +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(); -#define NV_SPC LT(_NAV, KC_SPC) -#define AD_GRV LT(_ADJUST, KC_GRV) - -#define MO_NAV MO(_NAV) -#define MO_ADJ MO(_ADJUST) -#define MO_RST MO(_RESET) -#define TG_ADJ TG(_ADJUST) -#define TG_GAME TG(_GAME) -#define LY_QWER DF(_BASE) -#define LY_WORK DF(_WORKMAN) -#define LY_NRMN DF(_NORMAN) -#define LY_DVRK DF(_DVORAK) -#define LY_CLMK DF(_COLMAK) -#define TG_NKRO MAGIC_TOGGLE_NKRO -#define KC_PTT KC_F24 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KM( - 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, AD_GRV , - KC_LCTL, KC_LGUI, KC_LALT, NV_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), - [_WORKMAN] = KM( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_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] = KM( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_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] = KM( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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 , KC_MINS, _______, - _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - [_COLMAK] = KM( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, 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 , _______, _______, - _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - [_GAME] = KM( - 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_RALT, KC_RGUI, KC_RCTL, KC_PTT ), - [_NAV] = KM( - KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL , - XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , XXXXXXX, TG_ADJ , - KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, XXXXXXX, - KC_LCTL, KC_LGUI, KC_LALT, _______, KC_RALT, KC_RGUI, KC_RCTL, _______), - // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) - [_ADJUST] = KM( - MO_RST , 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, TG_ADJ , - TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_GAME, XXXXXXX, XXXXXXX, - MO_RST , AG_NORM, AG_SWAP, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS), - // To Reset hit FN + ` + Esc - [_RESET] = KM( - 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, 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, - RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), -}; - -void matrix_scan_user(void) { - #ifdef KEYBOARD_gh60 - if (IS_LAYER_ON(_GAME)) { - gh60_wasd_leds_on(); - } else { - gh60_wasd_leds_off(); + 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]); } - #endif + } } -void matrix_init_user(void) { - if (!eeconfig_is_enabled()) { - eeconfig_init(); +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; } -} -uint32_t default_layer_state_set_kb(uint32_t state) { - // persist changes to default layers - eeconfig_update_default_layer(state); - return state; -} \ No newline at end of file + return true; +} +#endif diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index f29c57f2e07..03fa67a7d0c 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -17,13 +17,16 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef UNICODEMAP_ENABLE +#include "drashna_unicode.h" +#endif // UNICODEMAP_ENABLE + //enum more_custom_keycodes { // KC_P00 = NEW_SAFE_RANGE //}; - //define layer change stuff for underglow indicator bool skip_leds = false; @@ -54,16 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = 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, ________________NUMBER_LEFT________________, OSL(_MOUS), OSL(_MOUS), ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, - TG(_MODS), _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, GUI_T(KC_QUOT), + 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), - 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 - - + __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: COLEMAK layer * @@ -92,12 +91,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, - TG(_MODS), _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, GUI_T(KC_QUOT), + 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), - 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 + __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: DVORAK Layout * @@ -126,12 +123,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, - TG(_MODS), _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, GUI_T(KC_MINS), + 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), - 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 + __________________ERGODOX_THUMB_CLUSTER_____________________ ), /* Keymap 0: WORKMAN layer * @@ -160,12 +155,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, - TG(_MODS), _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, GUI_T(KC_QUOT), + 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), - 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 + __________________ERGODOX_THUMB_CLUSTER_____________________ ), // Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) @@ -203,9 +196,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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_WORKMAN, KC_DVORAK, KC_PPLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, KC_F12, + 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_COLEMAK, KC_COLEMAK, KC_NLCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, KC_PAUSE, + 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, @@ -238,7 +231,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, - KC_G, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO, KC_LGUI, KC_NO, KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER @@ -310,7 +303,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { //switch (keycode) { @@ -327,8 +319,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - - void matrix_init_keymap(void) { // Runs boot tasks for keyboard }; diff --git a/layouts/community/ergodox/drashna/notes.txt b/layouts/community/ergodox/drashna/notes.txt new file mode 100644 index 00000000000..0f3959ff615 --- /dev/null +++ b/layouts/community/ergodox/drashna/notes.txt @@ -0,0 +1,6 @@ +Pins used by Ergodox EZ + +Column Pins: F0 F1 F4 F5 F6 F7 +Row Pins : B0 B1 B2 B3 D2 D3 C6 +LEDs : D6 B5 B6 B7 +: diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 12f100d665e..e5bf2d4b36a 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,7 +1,11 @@ TAP_DANCE_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = yes # Commands for debug and configuration -RGBLIGHT_ENABLE = yes +ifeq ($(strip $(KEYBOARD)), ergodox_ez) + RGBLIGHT_ENABLE = yes +endif CONSOLE_ENABLE = no BOOTMAGIC_ENABLE = yes +UNICODE_ENABLE = no +UNICDOEMAP_ENABLE = yes diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c index 56aee727d8d..aa017c8ea53 100644 --- a/layouts/community/ergodox/haegin/keymap.c +++ b/layouts/community/ergodox/haegin/keymap.c @@ -11,6 +11,10 @@ #define _______ KC_TRNS +enum { + TD_BSPC = 0 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer @@ -46,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(SYMBOLS,KC_GRV), KC_QUOT, KC_SLSH, KC_LALT, SFT_T(KC_RGHT), KC_HOME, KC_END, KC_PGUP, - GUI_T(KC_SPC), CTL_T(KC_BSPC), LGUI(KC_SPC), + GUI_T(KC_SPC), TD(TD_BSPC), LGUI(KC_SPC), // Right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_SPC), @@ -136,17 +140,91 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_UP, _______, _______, _______, - KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, - _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MFFD, _______, _______, - KC_MUTE, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, + KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_MPLY, + KC_MUTE, KC_VOLD, KC_MPRV, KC_MPLY, KC_MFFD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WBAK ), }; +enum { + BSPC_LETTER = 0, + BSPC_WORD = 1, + HOLD_CTRL = 2 +}; + +typedef struct { + int a; + int b; + int state; +} fib_tap; + +static fib_tap fib_bspc = { + .a = 0, + .b = 1, + .state = BSPC_LETTER +}; + +void cur_backspace (qk_tap_dance_state_t *state) { + int next_fib = fib_bspc.a + fib_bspc.b; + fib_bspc.a = fib_bspc.b; + fib_bspc.b = next_fib; + for (int i=0; i < next_fib; i++) { + unregister_code(KC_BSPC); + register_code(KC_BSPC); + } +} + +void dance_backspace (qk_tap_dance_state_t *state, void *user_data) { + // If we're at the fifth tap, switch to deleting by words, and reset the fib + // counter + if (state->count == 4) { + register_code(KC_LALT); + fib_bspc.state = BSPC_WORD; + fib_bspc.a = 0; + fib_bspc.b = 1; + } + // If we're on the first press, wait to find out if it's being held + // If we're on the second tap, process the first tap, because we're past + // holding for ctrl now, then act normally + if (state->count == 2) { + register_code(KC_BSPC); + } + if (state->count > 1) { + cur_backspace(state); + } +}; + +void dance_backspace_ended (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->pressed) { + fib_bspc.state = HOLD_CTRL; + register_code(KC_LCTRL); + } else { + register_code(KC_BSPC); + } + } +}; + +void dance_backspace_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (fib_bspc.state) { + case HOLD_CTRL: unregister_code(KC_LCTRL); break; + case BSPC_WORD: unregister_code(KC_BSPC); unregister_code(KC_LALT); break; + case BSPC_LETTER: unregister_code(KC_BSPC); break; + } + fib_bspc.a = 0; + fib_bspc.b = 1; + fib_bspc.state = BSPC_LETTER; +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_BSPC] = ACTION_TAP_DANCE_FN_ADVANCED (dance_backspace, dance_backspace_ended, dance_backspace_reset) +}; + const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMBOLS) // FN1 - Momentary Layer 1 (Symbols) }; diff --git a/layouts/community/ergodox/haegin/rules.mk b/layouts/community/ergodox/haegin/rules.mk new file mode 100644 index 00000000000..31e0fcf2933 --- /dev/null +++ b/layouts/community/ergodox/haegin/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes diff --git a/layouts/community/ortho_4x12/talljoe/config.h b/layouts/community/ortho_4x12/talljoe/config.h new file mode 100644 index 00000000000..c2a9567bb39 --- /dev/null +++ b/layouts/community/ortho_4x12/talljoe/config.h @@ -0,0 +1,22 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H +#define SPACE_COUNT 3 + +#define LAYOUT( \ + 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_ortho_4x12( \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \ +) + + +#endif //CONFIG_USER_H diff --git a/layouts/community/ortho_4x12/talljoe/keymap.c b/layouts/community/ortho_4x12/talljoe/keymap.c new file mode 100644 index 00000000000..7812add812b --- /dev/null +++ b/layouts/community/ortho_4x12/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c b/lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c index 62f10c4e222..9250cad33a0 100644 --- a/lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c +++ b/lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c @@ -90,7 +90,7 @@ uint8_t USB_ProcessHIDReport(const uint8_t* ReportData, if (CurrStateTable == &StateTable[HID_STATETABLE_STACK_DEPTH - 1]) return HID_PARSE_HIDStackOverflow; - memcpy((CurrStateTable + 1), + memmove(CurrStateTable + 1, CurrStateTable, sizeof(HID_ReportItem_t)); diff --git a/lib/lufa/LUFA/Drivers/USB/Core/Events.h b/lib/lufa/LUFA/Drivers/USB/Core/Events.h index 57fd0d9af78..91fb31b6205 100644 --- a/lib/lufa/LUFA/Drivers/USB/Core/Events.h +++ b/lib/lufa/LUFA/Drivers/USB/Core/Events.h @@ -331,7 +331,7 @@ #if !defined(__DOXYGEN__) /* Function Prototypes: */ #if defined(__INCLUDE_FROM_EVENTS_C) - void USB_Event_Stub(void) ATTR_CONST; + void USB_Event_Stub(void); #if defined(USB_CAN_BE_BOTH) void EVENT_USB_UIDChange(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub); diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index a66c4d86445..1ddcfb345cd 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -20,6 +20,12 @@ #define NO_SOUND +#define LP_NUMB \ + H__NOTE(_CS5), H__NOTE(_E5), H__NOTE(_CS5), WD_NOTE(_FS5), \ + WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_REST), H__NOTE(_CS5), H__NOTE(_E5), \ + H__NOTE(_CS5), WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_E5), + + #define ODE_TO_JOY \ Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ diff --git a/quantum/color.c b/quantum/color.c new file mode 100644 index 00000000000..8ede053e711 --- /dev/null +++ b/quantum/color.c @@ -0,0 +1,87 @@ +/* Copyright 2017 Jason Williams + * + * 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 "color.h" +#include "led_tables.h" +#include "progmem.h" + +RGB hsv_to_rgb( HSV hsv ) +{ + RGB rgb; + uint8_t region, p, q, t; + uint16_t h, s, v, remainder; + + if ( hsv.s == 0 ) + { + rgb.r = hsv.v; + rgb.g = hsv.v; + rgb.b = hsv.v; + return rgb; + } + + h = hsv.h; + s = hsv.s; + v = hsv.v; + + region = h / 43; + remainder = (h - (region * 43)) * 6; + + p = (v * (255 - s)) >> 8; + q = (v * (255 - ((s * remainder) >> 8))) >> 8; + t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8; + + switch ( region ) + { + case 0: + rgb.r = v; + rgb.g = t; + rgb.b = p; + break; + case 1: + rgb.r = q; + rgb.g = v; + rgb.b = p; + break; + case 2: + rgb.r = p; + rgb.g = v; + rgb.b = t; + break; + case 3: + rgb.r = p; + rgb.g = q; + rgb.b = v; + break; + case 4: + rgb.r = t; + rgb.g = p; + rgb.b = v; + break; + default: + rgb.r = v; + rgb.g = p; + rgb.b = q; + break; + } + + rgb.r = pgm_read_byte( &CIE1931_CURVE[rgb.r] ); + rgb.g = pgm_read_byte( &CIE1931_CURVE[rgb.g] ); + rgb.b = pgm_read_byte( &CIE1931_CURVE[rgb.b] ); + + return rgb; +} + diff --git a/quantum/color.h b/quantum/color.h new file mode 100644 index 00000000000..9d51d45adb2 --- /dev/null +++ b/quantum/color.h @@ -0,0 +1,55 @@ +/* Copyright 2017 Jason Williams + * + * 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 COLOR_H +#define COLOR_H + +#include +#include + + +#if defined(__GNUC__) +#define PACKED __attribute__ ((__packed__)) +#else +#define PACKED +#endif + +#if defined(_MSC_VER) +#pragma pack( push, 1 ) +#endif + +typedef struct PACKED +{ + uint8_t r; + uint8_t g; + uint8_t b; +} RGB; + +typedef struct PACKED +{ + uint8_t h; + uint8_t s; + uint8_t v; +} HSV; + +#if defined(_MSC_VER) +#pragma pack( pop ) +#endif + +RGB hsv_to_rgb( HSV hsv ); + +#endif // COLOR_H diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c new file mode 100644 index 00000000000..1e950d11137 --- /dev/null +++ b/quantum/process_keycode/process_clicky.c @@ -0,0 +1,71 @@ +#include "audio.h" +#include "process_clicky.h" + +#ifdef AUDIO_CLICKY + +#ifdef AUDIO_CLICKY_ON +bool clicky_enable = true; +#else // AUDIO_CLICKY_ON +bool clicky_enable = false; +#endif // AUDIO_CLICKY_ON +#ifndef AUDIO_CLICKY_FREQ_DEFAULT +#define AUDIO_CLICKY_FREQ_DEFAULT 440.0f +#endif // !AUDIO_CLICKY_FREQ_DEFAULT +#ifndef AUDIO_CLICKY_FREQ_MIN +#define AUDIO_CLICKY_FREQ_MIN 65.0f +#endif // !AUDIO_CLICKY_FREQ_MIN +#ifndef AUDIO_CLICKY_FREQ_MAX +#define AUDIO_CLICKY_FREQ_MAX 1500.0f +#endif // !AUDIO_CLICKY_FREQ_MAX +#ifndef AUDIO_CLICKY_FREQ_FACTOR +#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f +#endif // !AUDIO_CLICKY_FREQ_FACTOR +#ifndef AUDIO_CLICKY_FREQ_RANDOMNESS +#define AUDIO_CLICKY_FREQ_RANDOMNESS 0.05f +#endif // !AUDIO_CLICKY_FREQ_RANDOMNESS + +float clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; +float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations + +#ifndef NO_MUSIC_MODE +extern bool music_activated; +extern bool midi_activated; +#endif // !NO_MUSIC_MODE + +void clicky_play(void) { +#ifndef NO_MUSIC_MODE + if (music_activated || midi_activated) return; +#endif // !NO_MUSIC_MODE + clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + AUDIO_CLICKY_FREQ_RANDOMNESS * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + clicky_song[1][0] = clicky_freq * (1.0f + AUDIO_CLICKY_FREQ_RANDOMNESS * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + PLAY_SONG(clicky_song); +} + +bool process_clicky(uint16_t keycode, keyrecord_t *record) { + if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_enable = !clicky_enable; } + + if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; } + + if (keycode == CLICKY_UP && record->event.pressed) { + float new_freq = clicky_freq * AUDIO_CLICKY_FREQ_FACTOR; + if (new_freq < AUDIO_CLICKY_FREQ_MAX) { + clicky_freq = new_freq; + } + } + if (keycode == CLICKY_DOWN && record->event.pressed) { + float new_freq = clicky_freq / AUDIO_CLICKY_FREQ_FACTOR; + if (new_freq > AUDIO_CLICKY_FREQ_MIN) { + clicky_freq = new_freq; + } + } + + + if ( clicky_enable ) { + if (record->event.pressed) { + clicky_play();; + } + } + return true; +} + +#endif //AUDIO_CLICKY diff --git a/quantum/process_keycode/process_clicky.h b/quantum/process_keycode/process_clicky.h new file mode 100644 index 00000000000..e274af56f1f --- /dev/null +++ b/quantum/process_keycode/process_clicky.h @@ -0,0 +1,7 @@ +#ifndef PROCESS_CLICKY_H +#define PROCESS_CLICKY_H + +void clicky_play(void); +bool process_clicky(uint16_t keycode, keyrecord_t *record); + +#endif diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 9728076dfd3..a67f736285f 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -222,6 +222,26 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) dprintf("midi modulation interval %d\n", midi_config.modulation_interval); } return false; + case MI_BENDD: + if (record->event.pressed) { + midi_send_pitchbend(&midi_device, midi_config.channel, -0x2000); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, -0x2000); + } + else { + midi_send_pitchbend(&midi_device, midi_config.channel, 0); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0); + } + return false; + case MI_BENDU: + if (record->event.pressed) { + midi_send_pitchbend(&midi_device, midi_config.channel, 0x1fff); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0x1fff); + } + else { + midi_send_pitchbend(&midi_device, midi_config.channel, 0); + dprintf("midi pitchbend channel:%d amount:%d\n", midi_config.channel, 0); + } + return false; }; return true; diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 41a5bd57372..697aa237fac 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -78,10 +78,6 @@ static uint16_t music_sequence_interval = 100; float midi_off_song[][2] = MIDI_OFF_SONG; #endif -#ifndef MUSIC_MASK - #define MUSIC_MASK keycode < 0xFF -#endif - static void music_noteon(uint8_t note) { #ifdef AUDIO_ENABLE if (music_activated) @@ -120,7 +116,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { if (keycode == MU_ON && record->event.pressed) { music_on(); return false; - } + } if (keycode == MU_OFF && record->event.pressed) { music_off(); @@ -139,7 +135,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { if (keycode == MI_ON && record->event.pressed) { midi_on(); return false; - } + } if (keycode == MI_OFF && record->event.pressed) { midi_off(); @@ -210,7 +206,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { note = music_starting_note + music_offset + 36 + SCALE[position % 12] + (position / 12)*12; } #else - if (music_mode == MUSIC_MODE_CHROMATIC) + if (music_mode == MUSIC_MODE_CHROMATIC) note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); else if (music_mode == MUSIC_MODE_GUITAR) note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); @@ -232,13 +228,31 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_noteoff(note); } - if (MUSIC_MASK) + if (music_mask(keycode)) return false; } return true; } +bool music_mask(uint16_t keycode) { + #ifdef MUSIC_MASK + return MUSIC_MASK; + #else + return music_mask_kb(keycode); + #endif +} + +__attribute__((weak)) +bool music_mask_kb(uint16_t keycode) { + return music_mask_user(keycode); +} + +__attribute__((weak)) +bool music_mask_user(uint16_t keycode) { + return keycode < 0xFF; +} + bool is_music_on(void) { return (music_activated != 0); } @@ -327,4 +341,4 @@ void midi_on_user() {} __attribute__ ((weak)) void music_scale_user() {} -#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) \ No newline at end of file +#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 13e5252ad5b..f6753d4f24d 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -54,6 +54,10 @@ void music_mode_cycle(void); void matrix_scan_music(void); +bool music_mask(uint16_t keycode); +bool music_mask_kb(uint16_t keycode); +bool music_mask_user(uint16_t keycode); + #ifndef SCALE #define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c index deb1543e3da..bc365dddfa4 100644 --- a/quantum/process_keycode/process_terminal.c +++ b/quantum/process_keycode/process_terminal.c @@ -20,10 +20,20 @@ #include #include +#ifndef CMD_BUFF_SIZE + #define CMD_BUFF_SIZE 5 +#endif + + bool terminal_enabled = false; char buffer[80] = ""; +char cmd_buffer[CMD_BUFF_SIZE][80]; +bool cmd_buffer_enabled = true; //replace with ifdef? char newline[2] = "\n"; char arguments[6][20]; +bool firstTime = true; + +short int current_cmd_buffer_pos = 0; //used for up/down arrows - keeps track of where you are in the command buffer __attribute__ ((weak)) const char terminal_prompt[8] = "> "; @@ -34,36 +44,37 @@ const char terminal_prompt[8] = "> "; #endif float terminal_song[][2] = TERMINAL_SONG; #define TERMINAL_BELL() PLAY_SONG(terminal_song) -#else - #define TERMINAL_BELL() +#else + #define TERMINAL_BELL() #endif __attribute__ ((weak)) const char keycode_to_ascii_lut[58] = { 0, 0, 0, 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 0, 0, 0, '\t', ' ', '-', '=', '[', ']', '\\', 0, ';', '\'', '`', ',', '.', '/' -}; +}; __attribute__ ((weak)) const char shifted_keycode_to_ascii_lut[58] = { 0, 0, 0, 0, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', - 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', 0, 0, 0, '\t', ' ', '_', '+', '{', '}', '|', 0, ':', '\'', '~', '<', '>', '?' -}; +}; -struct stringcase { - char* string; - void (*func)(void); +struct stringcase { + char* string; + void (*func)(void); } typedef stringcase; void enable_terminal(void) { terminal_enabled = true; strcpy(buffer, ""); + memset(cmd_buffer,0,CMD_BUFF_SIZE * 80); for (int i = 0; i < 6; i++) strcpy(arguments[i], ""); // select all text to start over @@ -73,6 +84,29 @@ void enable_terminal(void) { void disable_terminal(void) { terminal_enabled = false; + SEND_STRING("\n"); +} + +void push_to_cmd_buffer(void) { +if (cmd_buffer_enabled) { + if (cmd_buffer == NULL) { + return; + } else { + if (firstTime) { + firstTime = false; + strcpy(cmd_buffer[0],buffer); + return; + } + + for (int i= CMD_BUFF_SIZE - 1;i > 0 ;--i) { + strncpy(cmd_buffer[i],cmd_buffer[i-1],80); + } + + strcpy(cmd_buffer[0],buffer); + + return; + } + } } void terminal_about(void) { @@ -136,11 +170,34 @@ void terminal_keymap(void) { } } -stringcase terminal_cases[] = { +void print_cmd_buff(void) { + /* without the below wait, a race condition can occur wherein the + buffer can be printed before it has been fully moved */ + wait_ms(250); + for(int i=0;istring, buffer ) ) { @@ -192,6 +250,16 @@ void process_terminal_command(void) { send_string(terminal_prompt); } } +void check_pos(void) { + if (current_cmd_buffer_pos >= CMD_BUFF_SIZE) { //if over the top, move it back down to the top of the buffer so you can climb back down... + current_cmd_buffer_pos = CMD_BUFF_SIZE - 1; + } else if (current_cmd_buffer_pos < 0) { //...and if you fall under the bottom of the buffer, reset back to 0 so you can climb back up + current_cmd_buffer_pos = 0; + } +} + + + bool process_terminal(uint16_t keycode, keyrecord_t *record) { @@ -210,6 +278,8 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { char char_to_add; switch (keycode) { case KC_ENTER: + push_to_cmd_buffer(); + current_cmd_buffer_pos = 0; process_terminal_command(); return false; break; case KC_ESC: @@ -226,9 +296,36 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { return false; } break; case KC_LEFT: + return false; break; case KC_RIGHT: - case KC_UP: + return false; break; + case KC_UP: // 0 = recent + check_pos(); //check our current buffer position is valid + if (current_cmd_buffer_pos <= CMD_BUFF_SIZE - 1) { //once we get to the top, dont do anything + str_len = strlen(buffer); + for(int i= 0;i < str_len ;++i) { + send_string(SS_TAP(X_BSPACE)); //clear w/e is on the line already + //process_terminal(KC_BSPC,record); + } + strncpy(buffer,cmd_buffer[current_cmd_buffer_pos],80); + + send_string(buffer); + ++current_cmd_buffer_pos; //get ready to access the above cmd if up/down is pressed again + } + return false; break; case KC_DOWN: + check_pos(); + if (current_cmd_buffer_pos >= 0) { //once we get to the bottom, dont do anything + str_len = strlen(buffer); + for(int i= 0;i < str_len ;++i) { + send_string(SS_TAP(X_BSPACE)); //clear w/e is on the line already + //process_terminal(KC_BSPC,record); + } + strncpy(buffer,cmd_buffer[current_cmd_buffer_pos],79); + + send_string(buffer); + --current_cmd_buffer_pos; //get ready to access the above cmd if down/up is pressed again + } return false; break; default: if (keycode <= 58) { @@ -240,7 +337,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { } if (char_to_add != 0) { strncat(buffer, &char_to_add, 1); - } + } } break; } @@ -249,4 +346,4 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { } } return true; -} \ No newline at end of file +} diff --git a/quantum/quantum.c b/quantum/quantum.c index 66feca2f296..f9b3e2197d9 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -226,7 +226,13 @@ bool process_record_quantum(keyrecord_t *record) { // Must run first to be able to mask key_up events. process_key_lock(&keycode, record) && #endif + #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) + process_clicky(keycode, record) && + #endif //AUDIO_CLICKY process_record_kb(keycode, record) && + #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES) + process_rgb_matrix(keycode, record) && + #endif #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif @@ -236,7 +242,7 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef STENO_ENABLE process_steno(keycode, record) && #endif - #if ( defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))) && !defined(NO_MUSIC_MODE) + #if ( defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))) && !defined(NO_MUSIC_MODE) process_music(keycode, record) && #endif #ifdef TAP_DANCE_ENABLE @@ -304,7 +310,7 @@ bool process_record_quantum(keyrecord_t *record) { } return false; #endif - #ifdef RGBLIGHT_ENABLE + #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) case RGB_TOG: if (record->event.pressed) { rgblight_toggle(); @@ -362,6 +368,16 @@ bool process_record_quantum(keyrecord_t *record) { rgblight_decrease_val(); } return false; + case RGB_SPI: + if (record->event.pressed) { + rgblight_increase_speed(); + } + return false; + case RGB_SPD: + if (record->event.pressed) { + rgblight_decrease_speed(); + } + return false; case RGB_MODE_PLAIN: if (record->event.pressed) { rgblight_mode(1); @@ -777,12 +793,14 @@ void set_single_persistent_default_layer(uint8_t default_layer) { default_layer_set(1U< @@ -57,6 +63,9 @@ extern uint32_t default_layer_state; #ifdef AUDIO_ENABLE #include "audio.h" #include "process_audio.h" + #ifdef AUDIO_CLICKY + #include "process_clicky.h" + #endif // AUDIO_CLICKY #endif #ifdef STENO_ENABLE @@ -139,6 +148,7 @@ void send_char(char ascii_code); // For tri-layer void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); +uint32_t update_tri_layer_state(uint32_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3); void set_single_persistent_default_layer(uint8_t default_layer); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 8122bfe7397..405741eb153 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -140,6 +140,12 @@ enum quantum_keycodes { AU_OFF, AU_TOG, + // Faux clicky as part of main audio feature + CLICKY_TOGGLE, + CLICKY_UP, + CLICKY_DOWN, + CLICKY_RESET, + #ifdef FAUXCLICKY_ENABLE // Faux clicky FC_ON, @@ -383,6 +389,9 @@ enum quantum_keycodes { MI_MOD, // modulation MI_MODSD, // decrease modulation speed MI_MODSU, // increase modulation speed + + MI_BENDD, // Bend down + MI_BENDU, // Bend up #endif // MIDI_ADVANCED // Backlight functionality @@ -404,6 +413,8 @@ enum quantum_keycodes { RGB_SAD, RGB_VAI, RGB_VAD, + RGB_SPI, + RGB_SPD, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, @@ -558,6 +569,11 @@ enum quantum_keycodes { #define KC_GESC GRAVE_ESC +#define CK_TOGG CLICKY_TOGGLE +#define CK_RST CLICKY_RESET +#define CK_UP CLICKY_UP +#define CK_DOWN CLICKY_DOWN + #define RGB_MOD RGB_MODE_FORWARD #define RGB_SMOD RGB_MODE_FORWARD #define RGB_RMOD RGB_MODE_REVERSE diff --git a/quantum/rgb.h b/quantum/rgb.h new file mode 100644 index 00000000000..ce674ce6bce --- /dev/null +++ b/quantum/rgb.h @@ -0,0 +1,53 @@ +/* Copyright 2017 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 RGB_H +#define RGB_H + +__attribute__((weak)) +void rgblight_toggle(void) {}; + +__attribute__((weak)) +void rgblight_step(void) {}; + +__attribute__((weak)) +void rgblight_step_reverse(void) {}; + +__attribute__((weak)) +void rgblight_increase_hue(void) {}; + +__attribute__((weak)) +void rgblight_decrease_hue(void) {}; + +__attribute__((weak)) +void rgblight_increase_sat(void) {}; + +__attribute__((weak)) +void rgblight_decrease_sat(void) {}; + +__attribute__((weak)) +void rgblight_increase_val(void) {}; + +__attribute__((weak)) +void rgblight_decrease_val(void) {}; + +__attribute__((weak)) +void rgblight_increase_speed(void) {}; + +__attribute__((weak)) +void rgblight_decrease_speed(void) {}; + +#endif \ No newline at end of file diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c new file mode 100644 index 00000000000..f3d012bc3ec --- /dev/null +++ b/quantum/rgb_matrix.c @@ -0,0 +1,888 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 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 . + */ + + +#include "rgb_matrix.h" +#include +#include "TWIlib.h" +#include +#include +#include "progmem.h" +#include "config.h" +#include "eeprom.h" +#include "lufa.h" +#include + +rgb_config_t rgb_matrix_config; + +#ifndef RGB_DISABLE_AFTER_TIMEOUT + #define RGB_DISABLE_AFTER_TIMEOUT 0 +#endif + +#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED + #define RGB_DISABLE_WHEN_USB_SUSPENDED false +#endif + +#ifndef EECONFIG_RGB_MATRIX + #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT +#endif + +bool g_suspend_state = false; + +// Global tick at 20 Hz +uint32_t g_tick = 0; + +// Ticks since this key was last hit. +uint8_t g_key_hit[DRIVER_LED_TOTAL]; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; + +#ifndef PI +#define PI 3.14159265 +#endif + +uint32_t eeconfig_read_rgb_matrix(void) { + return eeprom_read_dword(EECONFIG_RGB_MATRIX); +} +void eeconfig_update_rgb_matrix(uint32_t val) { + eeprom_update_dword(EECONFIG_RGB_MATRIX, val); +} +void eeconfig_update_rgb_matrix_default(void) { + dprintf("eeconfig_update_rgb_matrix_default\n"); + rgb_matrix_config.enable = 1; + rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; + rgb_matrix_config.hue = 0; + rgb_matrix_config.sat = 255; + rgb_matrix_config.val = 255; + rgb_matrix_config.speed = 0; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} +void eeconfig_debug_rgb_matrix(void) { + dprintf("rgb_matrix_config eprom\n"); + dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); + dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); + dprintf("rgb_matrix_config.hue = %d\n", rgb_matrix_config.hue); + dprintf("rgb_matrix_config.sat = %d\n", rgb_matrix_config.sat); + dprintf("rgb_matrix_config.val = %d\n", rgb_matrix_config.val); + dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); +} + +// Last led hit +#define LED_HITS_TO_REMEMBER 8 +uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; +uint8_t g_last_led_count = 0; + +void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { + rgb_led led; + *led_count = 0; + + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + // map_index_to_led(i, &led); + led = g_rgb_leds[i]; + if (row == led.matrix_co.row && column == led.matrix_co.col) { + led_i[*led_count] = i; + (*led_count)++; + } + } +} + + +void rgb_matrix_update_pwm_buffers(void) { + IS31FL3731_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); +} + +void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { + IS31FL3731_set_color( index, red, green, blue ); +} + +void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { + IS31FL3731_set_color_all( red, green, blue ); +} + + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { + if ( record->event.pressed ) { + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + if (led_count > 0) { + for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { + g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; + } + g_last_led_hit[0] = led[0]; + g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1); + } + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 0; + g_any_key_hit = 0; + } else { + #ifdef RGB_MATRIX_KEYRELEASES + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 255; + + g_any_key_hit = 255; + #endif + } + return true; +} + +void rgb_matrix_set_suspend_state(bool state) { + g_suspend_state = state; +} + +void rgb_matrix_test(void) { + // Mask out bits 4 and 5 + // This 2-bit value will stay the same for 16 ticks. + switch ( (g_tick & 0x30) >> 4 ) + { + case 0: + { + rgb_matrix_set_color_all( 20, 0, 0 ); + break; + } + case 1: + { + rgb_matrix_set_color_all( 0, 20, 0 ); + break; + } + case 2: + { + rgb_matrix_set_color_all( 0, 0, 20 ); + break; + } + case 3: + { + rgb_matrix_set_color_all( 20, 20, 20 ); + break; + } + } +} + +// This tests the LEDs +// Note that it will change the LED control registers +// in the LED drivers, and leave them in an invalid +// state for other backlight effects. +// ONLY USE THIS FOR TESTING LEDS! +void rgb_matrix_single_LED_test(void) { + static uint8_t color = 0; // 0,1,2 for R,G,B + static uint8_t row = 0; + static uint8_t column = 0; + + static uint8_t tick = 0; + tick++; + + if ( tick > 2 ) + { + tick = 0; + column++; + } + if ( column > MATRIX_COLS ) + { + column = 0; + row++; + } + if ( row > MATRIX_ROWS ) + { + row = 0; + color++; + } + if ( color > 2 ) + { + color = 0; + } + + uint8_t led[8], led_count; + map_row_column_to_led(row,column,led,&led_count); + for(uint8_t i = 0; i < led_count; i++) { + rgb_matrix_set_color_all( 40, 40, 40 ); + rgb_matrix_test_led( led[i], color==0, color==1, color==2 ); + } +} + +// All LEDs off +void rgb_matrix_all_off(void) { + rgb_matrix_set_color_all( 0, 0, 0 ); +} + +// Solid color +void rgb_matrix_solid_color(void) { + HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; + RGB rgb = hsv_to_rgb( hsv ); + rgb_matrix_set_color_all( rgb.r, rgb.g, rgb.b ); +} + +void rgb_matrix_solid_reactive(void) { + // Relies on hue being 8-bit and wrapping + for ( int i=0; i 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + // Divide delta by 4, this gives the delta per row + deltaH /= 4; + + int16_t s1 = rgb_matrix_config.sat; + int16_t s2 = rgb_matrix_config.hue; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val }; + RGB rgb; + Point point; + for ( int i=0; i>4); + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hue + ( deltaH * y ); + hsv.s = rgb_matrix_config.sat + ( deltaS * y ); + rgb = hsv_to_rgb( hsv ); + rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); + } +} + +void rgb_matrix_raindrops(bool initialize) { + int16_t h1 = rgb_matrix_config.hue; + int16_t h2 = (rgb_matrix_config.hue + 180) % 360; + int16_t deltaH = h2 - h1; + deltaH /= 4; + + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + + int16_t s1 = rgb_matrix_config.sat; + int16_t s2 = rgb_matrix_config.sat; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv; + RGB rgb; + + // Change one LED every tick, make sure speed is not 0 + uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255; + + for ( int i=0; i 0 && g_any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : rgb_matrix_config.mode; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last); + effect_last = effect; + toggle_enable_last = rgb_matrix_config.enable; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) { + case RGB_MATRIX_SOLID_COLOR: + rgb_matrix_solid_color(); + break; + case RGB_MATRIX_ALPHAS_MODS: + rgb_matrix_alphas_mods(); + break; + case RGB_MATRIX_DUAL_BEACON: + rgb_matrix_dual_beacon(); + break; + case RGB_MATRIX_GRADIENT_UP_DOWN: + rgb_matrix_gradient_up_down(); + break; + case RGB_MATRIX_RAINDROPS: + rgb_matrix_raindrops( initialize ); + break; + case RGB_MATRIX_CYCLE_ALL: + rgb_matrix_cycle_all(); + break; + case RGB_MATRIX_CYCLE_LEFT_RIGHT: + rgb_matrix_cycle_left_right(); + break; + case RGB_MATRIX_CYCLE_UP_DOWN: + rgb_matrix_cycle_up_down(); + break; + case RGB_MATRIX_RAINBOW_BEACON: + rgb_matrix_rainbow_beacon(); + break; + case RGB_MATRIX_RAINBOW_PINWHEELS: + rgb_matrix_rainbow_pinwheels(); + break; + case RGB_MATRIX_RAINBOW_MOVING_CHEVRON: + rgb_matrix_rainbow_moving_chevron(); + break; + case RGB_MATRIX_JELLYBEAN_RAINDROPS: + rgb_matrix_jellybean_raindrops( initialize ); + break; + #ifdef RGB_MATRIX_KEYPRESSES + case RGB_MATRIX_SOLID_REACTIVE: + rgb_matrix_solid_reactive(); + break; + case RGB_MATRIX_SPLASH: + rgb_matrix_splash(); + break; + case RGB_MATRIX_MULTISPLASH: + rgb_matrix_multisplash(); + break; + case RGB_MATRIX_SOLID_SPLASH: + rgb_matrix_solid_splash(); + break; + case RGB_MATRIX_SOLID_MULTISPLASH: + rgb_matrix_solid_multisplash(); + break; + #endif + default: + rgb_matrix_custom(); + break; + } + + if ( ! suspend_backlight ) { + rgb_matrix_indicators(); + } + +} + +void rgb_matrix_indicators(void) { + rgb_matrix_indicators_kb(); + rgb_matrix_indicators_user(); +} + +__attribute__((weak)) +void rgb_matrix_indicators_kb(void) {} + +__attribute__((weak)) +void rgb_matrix_indicators_user(void) {} + + +// void rgb_matrix_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) +// { +// if ( row >= MATRIX_ROWS ) +// { +// // Special value, 255=none, 254=all +// *index = row; +// } +// else +// { +// // This needs updated to something like +// // uint8_t led[8], led_count; +// // map_row_column_to_led(row,column,led,&led_count); +// // for(uint8_t i = 0; i < led_count; i++) +// map_row_column_to_led( row, column, index ); +// } +// } + +void rgb_matrix_init_drivers(void) { + //sei(); + + // Initialize TWI + TWIInit(); + IS31FL3731_init( DRIVER_ADDR_1 ); + IS31FL3731_init( DRIVER_ADDR_2 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) { + bool enabled = true; + // This only caches it for later + IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + + // TODO: put the 1 second startup delay here? + + // clear the key hits + for ( int led=0; ledh = eeprom_read_byte(address); +// hsv->s = eeprom_read_byte(address+1); +// hsv->v = eeprom_read_byte(address+2); +// } + +// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ) +// { +// uint8_t led[8], led_count; +// map_row_column_to_led(row,column,led,&led_count); +// for(uint8_t i = 0; i < led_count; i++) { +// if ( led[i] < DRIVER_LED_TOTAL ) +// { +// void *address = backlight_get_custom_key_color_eeprom_address(led[i]); +// eeprom_update_byte(address, hsv.h); +// eeprom_update_byte(address+1, hsv.s); +// eeprom_update_byte(address+2, hsv.v); +// } +// } +// } + +void rgb_matrix_test_led( uint8_t index, bool red, bool green, bool blue ) { + for ( int i=0; i= RGB_MATRIX_EFFECT_MAX) + rgb_matrix_config.mode = 1; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_step_reverse(void) { + rgb_matrix_config.mode--; + if (rgb_matrix_config.mode < 1) + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_increase_hue(void) { + rgb_matrix_config.hue = increment( rgb_matrix_config.hue, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_decrease_hue(void) { + rgb_matrix_config.hue = decrement( rgb_matrix_config.hue, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_increase_sat(void) { + rgb_matrix_config.sat = increment( rgb_matrix_config.sat, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_decrease_sat(void) { + rgb_matrix_config.sat = decrement( rgb_matrix_config.sat, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_increase_val(void) { + rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_decrease_val(void) { + rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, 255 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +void rgblight_increase_speed(void) { + rgb_matrix_config.speed = increment( rgb_matrix_config.speed, 1, 0, 3 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void rgblight_decrease_speed(void) { + rgb_matrix_config.speed = decrement( rgb_matrix_config.speed, 1, 0, 3 ); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void rgblight_mode(uint8_t mode) { + rgb_matrix_config.mode = mode; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); +} + +uint32_t rgblight_get_mode(void) { + return rgb_matrix_config.mode; +} diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h new file mode 100644 index 00000000000..aaa85d5f515 --- /dev/null +++ b/quantum/rgb_matrix.h @@ -0,0 +1,138 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 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 RGB_MATRIX_H +#define RGB_MATRIX_H + +#include +#include +#include "color.h" +#include "is31fl3731.h" +#include "quantum.h" + +typedef struct Point { + uint8_t x; + uint8_t y; +} __attribute__((packed)) Point; + +typedef struct rgb_led { + union { + uint8_t raw; + struct { + uint8_t row:4; // 16 max + uint8_t col:4; // 16 max + }; + } matrix_co; + Point point; + uint8_t modifier:1; +} __attribute__((packed)) rgb_led; + + +extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; + +typedef struct +{ + HSV color; + uint8_t index; +} rgb_indicator; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint16_t hue :9; + uint8_t sat :8; + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} rgb_config_t; + +enum rgb_matrix_effects { + RGB_MATRIX_SOLID_COLOR = 1, + RGB_MATRIX_ALPHAS_MODS, + RGB_MATRIX_DUAL_BEACON, + RGB_MATRIX_GRADIENT_UP_DOWN, + RGB_MATRIX_RAINDROPS, + RGB_MATRIX_CYCLE_ALL, + RGB_MATRIX_CYCLE_LEFT_RIGHT, + RGB_MATRIX_CYCLE_UP_DOWN, + RGB_MATRIX_RAINBOW_BEACON, + RGB_MATRIX_RAINBOW_PINWHEELS, + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, + RGB_MATRIX_JELLYBEAN_RAINDROPS, +#ifdef RGB_MATRIX_KEYPRESSES + RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_SPLASH, + RGB_MATRIX_MULTISPLASH, + RGB_MATRIX_SOLID_SPLASH, + RGB_MATRIX_SOLID_MULTISPLASH, +#endif + RGB_MATRIX_EFFECT_MAX +}; + +void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); + +// This runs after another backlight effect and replaces +// colors already set +void rgb_matrix_indicators(void); +void rgb_matrix_indicators_kb(void); +void rgb_matrix_indicators_user(void); + +void rgb_matrix_single_LED_test(void); + +void rgb_matrix_init_drivers(void); + +void rgb_matrix_set_suspend_state(bool state); +void rgb_matrix_set_indicator_state(uint8_t state); + + +void rgb_matrix_task(void); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void rgb_matrix_update_pwm_buffers(void); + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record); + +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + +// void *backlight_get_key_color_eeprom_address(uint8_t led); +// void backlight_get_key_color( uint8_t led, HSV *hsv ); +// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ); + +void rgb_matrix_test_led( uint8_t index, bool red, bool green, bool blue ); +uint32_t rgb_matrix_get_tick(void); + +void rgblight_toggle(void); +void rgblight_step(void); +void rgblight_step_reverse(void); +void rgblight_increase_hue(void); +void rgblight_decrease_hue(void); +void rgblight_increase_sat(void); +void rgblight_decrease_sat(void); +void rgblight_increase_val(void); +void rgblight_decrease_val(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); +void rgblight_mode(uint8_t mode); +uint32_t rgblight_get_mode(void); + +#endif diff --git a/quantum/rgblight.c b/quantum/rgblight.c index ae183440817..75512e97a7f 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -27,6 +27,9 @@ #define RGBLIGHT_LIMIT_VAL 255 #endif +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + __attribute__ ((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; __attribute__ ((weak)) @@ -122,6 +125,7 @@ void eeconfig_update_rgblight_default(void) { rgblight_config.hue = 0; rgblight_config.sat = 255; rgblight_config.val = RGBLIGHT_LIMIT_VAL; + rgblight_config.speed = 0; eeconfig_update_rgblight(rgblight_config.raw); } void eeconfig_debug_rgblight(void) { @@ -131,6 +135,7 @@ void eeconfig_debug_rgblight(void) { dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); dprintf("rgblight_config.val = %d\n", rgblight_config.val); + dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); } void rgblight_init(void) { @@ -280,6 +285,18 @@ void rgblight_disable(void) { 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; + new_value += step; + return MIN( MAX( new_value, min ), max ); +} + +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} void rgblight_increase_hue(void) { uint16_t hue; @@ -331,6 +348,15 @@ void rgblight_decrease_val(void) { } rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); } +void rgblight_increase_speed(void) { + rgblight_config.speed = increment( rgblight_config.speed, 1, 0, 3 ); + eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this +} + +void rgblight_decrease_speed(void) { + rgblight_config.speed = decrement( rgblight_config.speed, 1, 0, 3 ); + 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; diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 8c33f1a8fc9..a6593af98ba 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -92,6 +92,7 @@ typedef union { uint16_t hue :9; uint8_t sat :8; uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this }; } rgblight_config_t; @@ -113,6 +114,8 @@ void rgblight_increase_sat(void); void rgblight_decrease_sat(void); void rgblight_increase_val(void); void rgblight_decrease_val(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); uint16_t rgblight_get_hue(void); uint8_t rgblight_get_sat(void); @@ -126,6 +129,9 @@ void eeconfig_update_rgblight(uint32_t val); void eeconfig_update_rgblight_default(void); void eeconfig_debug_rgblight(void); +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); diff --git a/quantum/template/config.h b/quantum/template/avr/config.h similarity index 100% rename from quantum/template/config.h rename to quantum/template/avr/config.h diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk new file mode 100644 index 00000000000..45eb6ee3766 --- /dev/null +++ b/quantum/template/avr/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/quantum/template/template.c b/quantum/template/avr/template.c similarity index 100% rename from quantum/template/template.c rename to quantum/template/avr/template.c diff --git a/quantum/template/template.h b/quantum/template/avr/template.h similarity index 100% rename from quantum/template/template.h rename to quantum/template/avr/template.h diff --git a/quantum/template/base/info.json b/quantum/template/base/info.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/quantum/template/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h similarity index 100% rename from quantum/template/keymaps/default/config.h rename to quantum/template/base/keymaps/default/config.h diff --git a/quantum/template/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c similarity index 98% rename from quantum/template/keymaps/default/keymap.c rename to quantum/template/base/keymaps/default/keymap.c index 508b4c79b52..d4bda895c71 100644 --- a/quantum/template/keymaps/default/keymap.c +++ b/quantum/template/base/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 "%KEYBOARD%.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ diff --git a/quantum/template/keymaps/default/readme.md b/quantum/template/base/keymaps/default/readme.md similarity index 100% rename from quantum/template/keymaps/default/readme.md rename to quantum/template/base/keymaps/default/readme.md diff --git a/quantum/template/readme.md b/quantum/template/base/readme.md similarity index 100% rename from quantum/template/readme.md rename to quantum/template/base/readme.md diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h new file mode 100644 index 00000000000..b9574659523 --- /dev/null +++ b/quantum/template/ps2avrgb/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 CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER You +#define PRODUCT %KEYBOARD% + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } +#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/quantum/template/ps2avrgb/i2c.c b/quantum/template/ps2avrgb/i2c.c new file mode 100644 index 00000000000..e8c4455ad1b --- /dev/null +++ b/quantum/template/ps2avrgb/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/quantum/template/ps2avrgb/matrix.c b/quantum/template/ps2avrgb/matrix.c new file mode 100644 index 00000000000..57aa36b5ff7 --- /dev/null +++ b/quantum/template/ps2avrgb/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/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk new file mode 100644 index 00000000000..68d50aec67a --- /dev/null +++ b/quantum/template/ps2avrgb/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 = 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 diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c new file mode 100644 index 00000000000..d0990c37269 --- /dev/null +++ b/quantum/template/ps2avrgb/template.c @@ -0,0 +1,25 @@ +/* Copyright 2017 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 + * 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 "%KEYBOARD%.h" + +#include +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} diff --git a/quantum/template/ps2avrgb/template.h b/quantum/template/ps2avrgb/template.h new file mode 100644 index 00000000000..c24bb1650fb --- /dev/null +++ b/quantum/template/ps2avrgb/template.h @@ -0,0 +1,34 @@ +/* Copyright 2017 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 + * 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 %KEYBOARD_UPPERCASE%_H +#define %KEYBOARD_UPPERCASE%_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, KC_NO, k11 }, \ +} + +#endif diff --git a/quantum/template/ps2avrgb/usbconfig.h b/quantum/template/ps2avrgb/usbconfig.h new file mode 100644 index 00000000000..d2d848fcdc8 --- /dev/null +++ b/quantum/template/ps2avrgb/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/readme.md b/readme.md index 0817fdcc21d..859e3ed12f1 100644 --- a/readme.md +++ b/readme.md @@ -2,16 +2,18 @@ [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) [![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) -[![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) [![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) [![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) [![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) -This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). +This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). -## Official website +## Documentation -[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK. +* [See the official documentation on docs.qmk.fm](https://docs.qmk.fm) + +The docs are hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [GitHub](/docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "suggest an edit" link on any page of the docs. ## Supported Keyboards @@ -27,6 +29,6 @@ The project also includes community support for [lots of other keyboards](/keybo QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). -## Documentation +## Official website -[https://docs.qmk.fm](https://docs.qmk.fm) is hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [GitHub](/docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "suggest an edit" link on any page of the Docs. +[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK. diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 91c18e2e6e6..3e5987ee3be 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -20,7 +20,7 @@ void eeconfig_init(void) #ifdef AUDIO_ENABLE eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default #endif -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) eeprom_update_dword(EECONFIG_RGBLIGHT, 0); #endif #ifdef STENO_ENABLE diff --git a/users/drashna/config.h b/users/drashna/config.h index 68394ee4dbb..0a59ad02610 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -3,6 +3,8 @@ #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), \ @@ -15,7 +17,7 @@ #ifdef RGBLIGHT_ENABLE #ifndef KEYBOARD_ergodox_ez #define RGBLIGHT_SLEEP - #endif + #endif // !KEYBOARD_ergodox_ez #endif // RGBLIGHT_ENABLE @@ -50,16 +52,22 @@ #ifdef TAPPING_TERM #undef TAPPING_TERM -#endif -#define TAPPING_TERM 160 +#endif // TAPPING_TERM +#define TAPPING_TERM 176 // Disable action_get_macro and fn_actions, since we don't use these // and it saves on space in the firmware. +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#ifndef NO_PRINT +#define NO_PRINT +#endif // !NO_PRINT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - +#define DISABLE_LEADER #endif // !USERSPACE_CONFIG_H diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 170c320d364..86c16b826d3 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -33,30 +33,52 @@ PROGMEM const char secret[][64] = { #endif -#ifdef FAUXCLICKY_ENABLE -float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25); -float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125); -#else // FAUXCLICKY_ENABLE -float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to your tastes -float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes -#endif // FAUXCLICKY_ENABLE - -bool faux_click_enabled = false; -bool is_overwatch = false; +float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND); +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 +void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; + +#ifdef RGBLIGHT_ENABLE +void rgblight_sethsv_default_helper(uint8_t index) { + uint8_t default_layer = eeconfig_read_default_layer(); + if (default_layer & (1UL << _COLEMAK)) { + rgblight_sethsv_at(300, 255, 255, index); + rgblight_sethsv_at(300, 255, 255, index); + } + else if (default_layer & (1UL << _DVORAK)) { + rgblight_sethsv_at(120, 255, 255, index); + rgblight_sethsv_at(120, 255, 255, index); + } + else if (default_layer & (1UL << _WORKMAN)) { + rgblight_sethsv_at(43, 255, 255, index); + rgblight_sethsv_at(43, 255, 255, index); + } + else { + rgblight_sethsv_at(180, 255, 255, index); + rgblight_sethsv_at(180, 255, 255, index); + } +} +#endif // RGBLIGHT_ENABLE + + +// ========================================= TAP DANCE ========================================= #ifdef TAP_DANCE_ENABLE //define diablo macro timer variables static uint16_t diablo_timer[4]; static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 }; static uint8_t diablo_key_time[4]; -bool check_dtimer(uint8_t dtimer) { - // has the correct number of seconds elapsed (as defined by diablo_times) - return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; -}; +// has the correct number of seconds elapsed (as defined by diablo_times) +bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; }; // Cycle through the times for the macro, starting at 0, for disabled. // Max of six values, so don't exceed @@ -64,25 +86,16 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_ if (state->count >= 7) { diablo_key_time[diablo_key] = diablo_times[0]; reset_tap_dance(state); - } - else { + } else { diablo_key_time[diablo_key] = diablo_times[state->count - 1]; } } // Would rather have one function for all of this, but no idea how to do that... -void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { - diablo_tapdance_master(state, user_data, 0); -} -void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { - diablo_tapdance_master(state, user_data, 1); -} -void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { - diablo_tapdance_master(state, user_data, 2); -} -void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { - diablo_tapdance_master(state, user_data, 3); -} +void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); } +void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); } +void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); } +void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); } //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { @@ -91,7 +104,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), [TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), [TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), - }; // Sends the key press to system, but only if on the Diablo layer @@ -99,17 +111,13 @@ void send_diablo_keystroke(uint8_t diablo_key) { if (biton32(layer_state) == _DIABLO) { switch (diablo_key) { case 0: - SEND_STRING("1"); - break; + tap(KC_1); break; case 1: - SEND_STRING("2"); - break; + tap(KC_2); break; case 2: - SEND_STRING("3"); - break; + tap(KC_3); break; case 3: - SEND_STRING("4"); - break; + tap(KC_4); break; } } } @@ -118,7 +126,6 @@ void send_diablo_keystroke(uint8_t diablo_key) { // Runs the "send string" command if enough time has passed, and resets the timer. void run_diablo_macro_check(void) { uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { if (check_dtimer(dtime) && diablo_key_time[dtime]) { diablo_timer[dtime] = timer_read(); @@ -126,7 +133,6 @@ void run_diablo_macro_check(void) { } } } - #endif // TAP_DANCE_ENABLE @@ -157,31 +163,32 @@ void led_set_keymap(uint8_t usb_led) {} // Call user matrix init, set default RGB colors and then // call the keymap's init function void matrix_init_user(void) { -#ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); +#ifdef RGBLIGHT_ENABLE rgblight_enable(); +#endif // RGBLIGHT_ENABLE - if (true) { - if (default_layer & (1UL << _COLEMAK)) { - rgblight_sethsv_magenta(); - } - else if (default_layer & (1UL << _DVORAK)) { - rgblight_sethsv_green(); - } - else if (default_layer & (1UL << _WORKMAN)) { - rgblight_sethsv_goldenrod(); - } - else { - rgblight_sethsv_teal(); - } - } - else - { - rgblight_setrgb_red(); - rgblight_mode(5); - } + 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); + clicky_enable = userspace_config.clicky_enable; #if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) ) set_unicode_input_mode(UC_WINC); @@ -192,23 +199,25 @@ void matrix_init_user(void) { // No global matrix scan code, so just run keymap's matrix // scan function void matrix_scan_user(void) { + #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); #endif // TAP_DANCE_ENABLE + matrix_scan_keymap(); } + // This block is for all of the gaming macros, as they were all doing // the same thing, but with differring text sent. bool send_game_macro(const char *str, keyrecord_t *record, bool override) { if (!record->event.pressed || override) { clear_keyboard(); - register_code(is_overwatch ? KC_BSPC : KC_ENTER); - unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); + tap(userspace_config.is_overwatch ? KC_BSPC : KC_ENTER); wait_ms(50); send_string(str); - register_code(KC_ENTER); - unregister_code(KC_ENTER); + wait_ms(50); + tap(KC_ENTER); } if (override) wait_ms(3000); return false; @@ -224,19 +233,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); #endif //CONSOLE_ENABLE - // Run custom faux click code, but only if faux clicky is enabled -#ifdef AUDIO_ENABLE - if ( (faux_click_enabled && keycode != KC_FXCL) || (!faux_click_enabled && keycode == KC_FXCL) ) { - if (record->event.pressed) { - stop_all_notes(); - PLAY_SONG(fauxclicky_pressed); - } else { - stop_all_notes(); - PLAY_SONG(fauxclicky_released); - } - } -#endif //AUDIO_ENABLE - switch (keycode) { case KC_QWERTY: @@ -265,39 +261,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 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; - - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP @@ -353,11 +316,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // These are a serious of gaming macros. // Only enables for the viterbi, basically, // to save on firmware space, since it's limited. -#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez)) +#if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_iris_rev2)) case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros - if (record->event.pressed) { is_overwatch = !is_overwatch; } + if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); } #ifdef RGBLIGHT_ENABLE - is_overwatch ? rgblight_mode(17) : rgblight_mode(18); + userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18); #endif //RGBLIGHT_ENABLE return false; break; case KC_SALT: @@ -398,11 +361,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // TAP_DANCE_ENABLE - case KC_FXCL: - if (!record->event.pressed) { // Toggles the custom faux click code - faux_click_enabled = !faux_click_enabled; - } - return false; break; case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #ifdef RGBLIGHT_ENABLE if (record->event.pressed) { @@ -420,85 +378,193 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; break; #endif // RGBLIGHT_ENABLE + + + case KC_CCCV: // One key copy/paste + if(record->event.pressed){ + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + register_code(KC_LCTL); + tap(KC_C); + unregister_code(KC_LCTL); +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_copy); +#endif + } else { // Tap, paste + register_code(KC_LCTL); + tap(KC_V); + unregister_code(KC_LCTL); +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_paste); +#endif + } + } + return false; + break; + case CLICKY_TOGGLE: + userspace_config.clicky_enable = clicky_enable; + eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw); + break; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻ + if (record->event.pressed) { + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + process_unicode((0x25A1 | QK_UNICODE), record); // Mouth + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361 | QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B | QK_UNICODE), record); // Table + process_unicode((0x2501 | QK_UNICODE), record); // Table + process_unicode((0x253B | QK_UNICODE), record); // Table + } + return false; + break; +#endif // UNICODE_ENABLE + } return process_record_keymap(keycode, record); } + // Runs state check and changes underglow color and animation // on layer change, no matter where the change was initiated // Then runs keymap's layer change check uint32_t layer_state_set_user(uint32_t state) { -#ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); - if (rgb_layer_change) { - switch (biton32(state)) { - case _NAV: + 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); - break; - case _SYMB: + } +#endif // RGBLIGHT_ENABLE + break; + case _SYMB: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_blue(); rgblight_mode(2); - break; - case _MOUS: + } +#endif // RGBLIGHT_ENABLE + break; + case _MOUS: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_yellow(); rgblight_mode(1); - break; - case _MACROS: + } +#endif // RGBLIGHT_ENABLE + break; + case _MACROS: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_orange(); - is_overwatch ? rgblight_mode(17) : rgblight_mode(18); - break; - case _MEDIA: + userspace_config.is_overwatch ? rgblight_mode(17) : rgblight_mode(18); + } +#endif // RGBLIGHT_ENABLE + break; + case _MEDIA: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_chartreuse(); rgblight_mode(22); - break; - case _GAMEPAD: + } +#endif // RGBLIGHT_ENABLE + break; + case _GAMEPAD: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_orange(); rgblight_mode(17); - break; - case _DIABLO: + } +#endif // RGBLIGHT_ENABLE + break; + case _DIABLO: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_red(); rgblight_mode(5); - break; - case _RAISE: + } +#endif // RGBLIGHT_ENABLE + break; + case _RAISE: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_yellow(); rgblight_mode(5); - break; - case _LOWER: + } +#endif // RGBLIGHT_ENABLE + break; + case _LOWER: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_orange(); rgblight_mode(5); - break; - case _ADJUST: + } +#endif // RGBLIGHT_ENABLE + break; + case _ADJUST: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_red(); rgblight_mode(23); - break; - case _COVECUBE: + } +#endif // RGBLIGHT_ENABLE + break; + case _COVECUBE: +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_sethsv_green(); rgblight_mode(2); - break; - default: // for any other layers, or the default layer - if (default_layer & (1UL << _COLEMAK)) { - rgblight_sethsv_magenta(); - } - else if (default_layer & (1UL << _DVORAK)) { - rgblight_sethsv_green(); - } - else if (default_layer & (1UL << _WORKMAN)) { - rgblight_sethsv_goldenrod(); - } - else { - rgblight_sethsv_teal(); - } - if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe - rgblight_mode(2); - } else { // otherwise, stay solid - rgblight_mode(1); - } - break; } - } #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(); } +#endif // RGBLIGHT_ENABLE + } + else if (default_layer & (1UL << _DVORAK)) { +#ifdef RGBLIGHT_ENABLE + if (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(); } +#endif // RGBLIGHT_ENABLE + } + else { +#ifdef RGBLIGHT_ENABLE + if (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); } +#endif // RGBLIGHT_ENABLE + } else { // otherwise, stay solid +#ifdef RGBLIGHT_ENABLE + if (rgb_layer_change) { rgblight_mode(1); } +#endif // RGBLIGHT_ENABLE + } + break; + } return layer_state_set_keymap (state); } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 1086fa02ed0..5ef25333b13 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -20,25 +20,25 @@ along with this program. If not, see . #include "quantum.h" // Define layer names -#define _QWERTY 0 -#define _NUMLOCK 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _WORKMAN 3 -#define _MODS 4 -//#define _MISC 5 -#define _NAV 6 -#define _COVECUBE 7 -#define _SYMB 8 -#define _GAMEPAD 9 -#define _DIABLO 10 -#define _MOUS 11 -#define _MACROS 12 -#define _MEDIA 13 -#define _LOWER 14 -#define _RAISE 15 -#define _ADJUST 16 - +enum userspace_layers { + _QWERTY = 0, + _NUMLOCK = 0, + _COLEMAK, + _DVORAK, + _WORKMAN, + _MODS, + _NAV, + _COVECUBE, + _SYMB, + _GAMEPAD, + _DIABLO, + _MOUS, + _MACROS, + _MEDIA, + _LOWER, + _RAISE, + _ADJUST, +}; //define modifiers #define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -49,8 +49,22 @@ along with this program. If not, see . // 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 is_overwatch; extern bool rgb_layer_change; +extern bool clicky_enable; + +#ifdef RGBLIGHT_ENABLE +void rgblight_sethsv_default_helper(uint8_t index); +#endif // RGBLIGHT_ENABLE + +#define EECONFIG_USERSPACE (uint8_t *)20 + +typedef union { + uint32_t raw; + struct { + bool clicky_enable :1; + bool is_overwatch :1; + }; +} userspace_config_t; enum userspace_custom_keycodes { EPRM = SAFE_RANGE, // can always be here @@ -59,9 +73,6 @@ enum userspace_custom_keycodes { KC_COLEMAK, KC_DVORAK, KC_WORKMAN, - LOWER, - RAISE, - ADJUST, KC_DIABLO_CLEAR, KC_OVERWATCH, KC_SALT, @@ -83,10 +94,18 @@ enum userspace_custom_keycodes { KC_SECRET_3, KC_SECRET_4, KC_SECRET_5, - KC_FXCL, + KC_CCCV, +#ifdef UNICODE_ENABLE + UC_FLIP, +#endif //UNICODE_ENABLE NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes }; +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + + #define KC_SEC1 KC_SECRET_1 #define KC_SEC2 KC_SECRET_2 #define KC_SEC3 KC_SECRET_3 @@ -99,6 +118,20 @@ enum userspace_custom_keycodes { #define WORKMAN KC_WORKMAN #define KC_RST KC_RESET + +#ifdef SWAP_HANDS_ENABLE +#define KC_C1R3 SH_TT +#else // SWAP_HANDS_ENABLE +#define KC_C1R3 KC_BSPC +#endif // SWAP_HANDS_ENABLE + +// OSM keycodes, to keep things clean and easy to change +#define KC_MLSF OSM(MOD_LSFT) +#define KC_MRSF OSM(MOD_RSFT) + +#define MG_NKRO MAGIC_TOGGLE_NKRO + + #ifdef TAP_DANCE_ENABLE enum { TD_D3_1 = 0, @@ -124,22 +157,6 @@ enum { #define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE -// OSM keycodes, to keep things clean and easy to change -#define KC_MLSF OSM(MOD_LSFT) -#define KC_MRSF OSM(MOD_RSFT) - - - -// If we're still using the official Faux Clicky feature, substitute codes -// so that we don't have any unused/blank keys. -#ifdef FAUXCLICKY_ENABLE -#define AUD_ON FC_ON -#define AUD_OFF FC_OFF -#else // FAUXCLICKY_ENABLE -#define AUD_ON AU_ON -#define AUD_OFF AU_OFF -#endif // FAUXCLICKY_ENABLE - // Since our quirky block definitions are basically a list of comma separated @@ -200,13 +217,13 @@ enum { #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) -#define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X +#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _________________WORKMAN_L3________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V -#define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L -#define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S -#define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) +#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I +#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) #define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K @@ -217,7 +234,8 @@ enum { #define _________________NORMAN_R2_________________ KC_J, KC_N, KC_I, KC_O, KC_U #define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) - +#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 // 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 @@ -227,4 +245,9 @@ enum { #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -#endif +#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 + + +#endif // !USERSPACE diff --git a/users/drashna/drashna_unicode.h b/users/drashna/drashna_unicode.h new file mode 100644 index 00000000000..3d1bc03f9b6 --- /dev/null +++ b/users/drashna/drashna_unicode.h @@ -0,0 +1,71 @@ +#ifndef UNICODE_USERSPACE_H +#define UNICODE_USERSPACE_H + + + +/* use X(n) to call the */ + +enum unicode_name { + THINK, // thinking face 🤔 + GRIN, // grinning face 😊 + SMRK, // smirk 😏 + WEARY, // good shit 😩 + UNAMU, // unamused 😒 + + SNEK, // snke 🐍 + PENGUIN, // 🐧 + DRAGON, // 🐉 + MONKEY, // 🐒 + CHICK, // 🐥 + BOAR, // 🐗 + + OKOK, // 👌 + EFFU, // 🖕 + INUP, // 👆 + THUP, // 👍 + THDN, // 👎 + + BBB, // dat B 🅱 + POO, // poop 💩 + HUNDR, // 100 💯 + EGGPL, // EGGPLANT 🍆 + WATER, // wet 💦 + TUMBLER, // 🥃 + + LIT, // fire 🔥 + BANG, // ‽ + IRONY, // ⸮ + DEGREE // ° +}; + + +const uint32_t PROGMEM unicode_map[] = { + [THINK] = 0x1F914, + [GRIN] = 0x1F600, + [BBB] = 0x1F171, + [POO] = 0x1F4A9, + [HUNDR] = 0x1F4AF, + [SMRK] = 0x1F60F, + [WEARY] = 0x1F629, + [EGGPL] = 0x1F346, + [WATER] = 0x1F4A6, + [LIT] = 0x1F525, + [UNAMU] = 0x1F612, + [SNEK] = 0x1F40D, + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [CHICK] = 0x1F425, + [DRAGON] = 0x1F409, + [OKOK] = 0x1F44C, + [EFFU] = 0x1F595, + [INUP] = 0x1F446, + [THDN] = 0x1F44E, + [THUP] = 0x1F44D, + [TUMBLER] = 0x1F943, + [BANG] = 0x0203D, + [IRONY] = 0x02E2E, + [DEGREE] = 0x000B0 + }; + + #endif diff --git a/users/drashna/readme.md b/users/drashna/readme.md index c4e305e15bb..79758e7e569 100644 --- a/users/drashna/readme.md +++ b/users/drashna/readme.md @@ -146,3 +146,31 @@ endif ``` Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your `.c` file, rather than reading from your file. + + +Userspace EEPROM config +----------------------- + +This adds EEPROM support fo the userspace, so that certain values are configurable in such a way that persists when power is lost. Namely, just the clicky feature and the Overwatch macro option ("is_overwatch"). This is done by reading and saving the structure from EEPROM. + +To implement this, first you need to specify the location: + +```c +#define EECONFIG_USERSPACE (uint8_t *)20 +``` +This tells us where in the EEPROM that the data structure is located, and this specifies that it's a byte (8 bits). However, to maximize it's usage, we want to specify a data structure here, so that we can use multiple settings. To do that: + +```c +typedef union { + uint32_t raw; + struct { + bool clicky_enable :1; + bool is_overwatch :1; + }; +} userspace_config_t; +``` +Then, in your C file, you want to add: `userspace_config_t userspace_config;`, and in your `matrix_init_*` function, you want to add `userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);` + +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. diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 062ecd3c491..123c0cc70a3 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -2,4 +2,6 @@ SRC += drashna.c EXTRAFLAGS += -flto - +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif diff --git a/users/talljoe/config.h b/users/talljoe/config.h new file mode 100644 index 00000000000..15bbde6bcd1 --- /dev/null +++ b/users/talljoe/config.h @@ -0,0 +1,9 @@ +#ifndef USERSPACE_CONFIG_H +#define USERSPACE_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT + +#define RESET_LAYER 15 + +#endif // !USERSPACE_CONFIG_H diff --git a/users/talljoe/readme.md b/users/talljoe/readme.md new file mode 100644 index 00000000000..e70c5c6dc05 --- /dev/null +++ b/users/talljoe/readme.md @@ -0,0 +1,7 @@ +Copyright 2018 Joe Wasson @talljoe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk new file mode 100644 index 00000000000..fa23149606e --- /dev/null +++ b/users/talljoe/rules.mk @@ -0,0 +1,3 @@ +SRC += talljoe.c + +EXTRAFLAGS+=-flto diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c new file mode 100644 index 00000000000..e49a3060d29 --- /dev/null +++ b/users/talljoe/talljoe.c @@ -0,0 +1,124 @@ +#include QMK_KEYBOARD_H + +#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( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_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( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_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( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + [_COLMAK] = 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 , _______, _______, + _______, 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( + 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( + 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_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), + [_NUM] = LAYOUT( + 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_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( + 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), + // To Reset hit FN + ` + Esc + [_RESET] = LAYOUT( + 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, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET , XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), +}; + +void matrix_scan_user(void) { + #ifdef KEYBOARD_gh60 + if (IS_LAYER_ON(_GAME)) { + gh60_wasd_leds_on(); + } else { + gh60_wasd_leds_off(); + } + #endif +} + +void matrix_init_user(void) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } +} + +uint32_t default_layer_state_set_kb(uint32_t state) { + // persist changes to default layers + eeconfig_update_default_layer(state); + return state; +} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// 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); +#endif //CONSOLE_ENABLE + + switch (keycode) { + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + + #if defined(BOOTLOADER_HALFKAY) + ":teensy" + #elif defined(BOOTLOADER_CATERINA) + ":avrdude" + #else + ":dfu" + #endif + SS_TAP(X_ENTER)); + } + return false; + break; + } + return process_record_keymap(keycode, record); +} diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h new file mode 100644 index 00000000000..17e54af6993 --- /dev/null +++ b/users/talljoe/talljoe.h @@ -0,0 +1,108 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +enum userspace_custom_keycodes { + KC_MAKE = SAFE_RANGE, // can always be here + DFAULTS, + TOGGLE_BACKLIGHT, + EFFECT, + EFFECT_END = EFFECT + 10 +}; + +#ifndef RESET_LAYER +#define RESET_LAYER 15 +#endif + +enum layers { + _BASE = 0, + _WORKMAN, + _NORMAN, + _DVORAK, + _COLMAK, + _GAME, + _NAV, + _NUM, + _ADJUST, + _RESET = RESET_LAYER, +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define MO_NAV MO(_NAV) +#define MO_ADJ MO(_ADJUST) +#define MO_RST MO(_RESET) +#define TG_ADJ TG(_ADJUST) +#ifdef ENABLE_GAME_LAYER + #define TG_GAME TG(_GAME) +#else + #define TG_GAME KC_NO +#endif +#define LY_QWER DF(_BASE) +#define LY_WORK DF(_WORKMAN) +#define LY_NRMN DF(_NORMAN) +#define LY_DVRK DF(_DVORAK) +#define LY_CLMK DF(_COLMAK) +#define TG_NKRO MAGIC_TOGGLE_NKRO +#define KC_PTT KC_F24 +#define MS_MID KC_MS_BTN3 +#define FX(x) (EFFECT + x) + +#define US_CAPS CTL_T(KC_ESC) +#define US_QUOT RCTL_T(KC_QUOT) +#define US_MINS RCTL_T(KC_QUOT) +#define US_ENT LT(_NUM, KC_ENT) + +#ifndef SPACE_COUNT + #define SPACE_COUNT 1 +#endif +#if (SPACE_COUNT == 1) + #define KC_SPC1 LT(_NAV, KC_SPC) + #define KC_SPC2 XXXXXXX + #define KC_SPC3 XXXXXXX + + #define NV_SPC1 _______ + #define NV_SPC2 _______ + #define NV_SPC3 _______ + + #define NM_SPC1 _______ + #define NM_SPC2 _______ + #define NM_SPC3 _______ +#elif (SPACE_COUNT == 3) + #define KC_SPC1 KC_BSPC + #define KC_SPC2 LT(_NUM,KC_ENT) + #define KC_SPC3 LT(_NAV,KC_SPC) + + #define NV_SPC1 KC_SPC + #define NV_SPC2 C_S_T(KC_ENT) + #define NV_SPC3 KC_SPC + + #define NM_SPC2 XXXXXXX + #define NM_SPC1 KC_SPC + #define NM_SPC3 KC_0 +#else + #error "Unsupported space count:" SPACE_COUNT +#endif + +#ifndef ZEAL_RGB + #define BR_INC KC_NO + #define BR_DEC KC_NO + #define EF_INC KC_NO + #define EF_DEC KC_NO + #define ES_INC KC_NO + #define ES_DEC KC_NO + #define H1_INC KC_NO + #define H1_DEC KC_NO + #define S1_INC KC_NO + #define S1_DEC KC_NO + #define H2_INC KC_NO + #define H2_DEC KC_NO + #define S2_INC KC_NO + #define S2_DEC KC_NO + #define FN_MO13 KC_NO + #define FN_MO2 KC_NO +#endif + +#endif diff --git a/users/zer09/config.h b/users/zer09/config.h new file mode 100644 index 00000000000..76680646225 --- /dev/null +++ b/users/zer09/config.h @@ -0,0 +1,32 @@ +#ifndef USERSPACE_CONFIG_H +#define USERSPACE_CONFIG_H + +#ifndef QMK_KEYS_PER_SCAN +#define QMK_KEYS_PER_SCAN 4 +#endif // !QMK_KEYS_PER_SCAN + +// this makes it possible to do rolling combos (zx) with keys that +// convert to other keys on hold (z becomes ctrl when you hold it, +// and when this option isn't enabled, z rapidly followed by x +// actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD +#undef PREVENT_STUCK_MODIFIERS + +#define FORCE_NKRO + +#ifndef TAPPING_TOGGLE +#define TAPPING_TOGGLE 1 +#endif + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 120 + +// Disable action_get_macro and fn_actions, since we don't use these +// and it saves on space in the firmware. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#endif diff --git a/users/zer09/lights.c b/users/zer09/lights.c new file mode 100644 index 00000000000..448ef494e81 --- /dev/null +++ b/users/zer09/lights.c @@ -0,0 +1,189 @@ +#include "lights.h" + +static bool active_key_pos[50] = {}; +static uint8_t led_dim = 0; + +volatile led_key rbw_led_keys[RBW] = { + [RBW_LCTL] = {DEFAULT, 21, true}, [RBW_LCAP] = {DEFAULT, 24, false}, + [RBW_LSPR] = {DEFAULT, 23, true}, [RBW_RCTL] = {DEFAULT, 48, true}, + [RBW_RCAP] = {DEFAULT, 45, false}, [RBW_RALT] = {DEFAULT, 46, true}, + [RBW_SCRL] = {DEFAULT, 42, true}}; + +/* Pressed led color. */ +const uint32_t _PC[3] = {0xFF, 0x00, 0x00}; + +/* Layer color. */ +const uint8_t _LC[5][3] = {[_BL] = {0x00, 0x00, 0x00}, + [_UL] = {0x00, 0x00, 0xFF}, + [_VL] = {0xFF, 0xFF, 0x00}, + [_DL] = {0x00, 0xFF, 0x00}, + [_AL] = {0xFF, 0x00, 0x00}}; + +/* Color table by sine wave */ +const uint8_t _LIGHTS[360] = { + 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, + 11, 12, 9, 13, 15, 17, 18, 20, 22, 24, 26, 28, 30, 32, 35, + 37, 39, 42, 44, 47, 49, 52, 55, 58, 60, 63, 66, 69, 72, 75, + 78, 81, 85, 88, 91, 94, 97, 101, 104, 107, 111, 114, 117, 121, 124, + 127, 131, 134, 137, 141, 144, 147, 150, 154, 157, 160, 163, 167, 170, 173, + 176, 179, 182, 185, 188, 191, 194, 197, 200, 202, 205, 208, 210, 213, 215, + 217, 220, 222, 224, 226, 229, 231, 232, 234, 236, 238, 239, 241, 242, 244, + 245, 246, 248, 249, 250, 251, 251, 252, 253, 253, 254, 254, 255, 255, 255, + 255, 255, 255, 255, 254, 254, 253, 253, 252, 251, 251, 250, 249, 248, 246, + 245, 244, 242, 241, 239, 238, 236, 234, 232, 231, 229, 226, 224, 222, 220, + 217, 215, 213, 210, 208, 205, 202, 200, 197, 194, 191, 188, 185, 182, 179, + 176, 173, 170, 167, 163, 160, 157, 154, 150, 147, 144, 141, 137, 134, 131, + 127, 124, 121, 117, 114, 111, 107, 104, 101, 97, 94, 91, 88, 85, 81, + 78, 75, 72, 69, 66, 63, 60, 58, 55, 52, 49, 47, 44, 42, 39, + 37, 35, 32, 30, 28, 26, 24, 22, 20, 18, 17, 15, 13, 12, 11, + 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +void set_key_led(keyrecord_t *record, uint8_t lyr) { + static uint8_t base = 5; + + uint8_t r = record->event.key.row; + uint8_t c = record->event.key.col; + uint8_t pos; + + // This was the result of my soldering. + // Lesson of the day: always check. + if (r < 5) { + pos = r % 2 == 0 ? r * base + c : r * base + (base - (c + 1)); + } else { + pos = r % 2 == 0 ? r * base + (base - (c + 1)) : r * base + c; + } + + if (record->event.pressed) { + active_key_pos[pos] = true; + SET_LED_RGB(_PC[0], _PC[1], _PC[2], led_dim, pos); + } else { + active_key_pos[pos] = false; + SET_LED_RGB(_LC[lyr][0], _LC[lyr][1], _LC[lyr][2], led_dim, pos); + } +} + +/* Fix for unknown reason after testin flash the eeprom handedness, + the leds will ligth up after boot. + This should be call in the set layer led.*/ +bool is_first_run(void) { + static uint8_t run = 0; + + if (run == 0) { + run++; + return true; + } else { + return false; + } +} + +bool set_layer_led(uint8_t lyr) { + static uint8_t p_lyr = 0; // Previous layer. + static uint8_t p_dim = 0; // Previous dim. + + if (p_lyr == lyr && p_dim == led_dim && !is_first_run()) { + return false; + } + + p_lyr = lyr; + p_dim = led_dim; + const uint8_t r = _LC[lyr][0]; + const uint8_t g = _LC[lyr][1]; + const uint8_t b = _LC[lyr][2]; + const uint8_t d = (p_lyr == _VL && p_dim < 1) ? 1 : p_dim; + + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + SET_LED_RGB(r, g, b, d, i); + } + + return true; +} + +bool rainbow_loop(uint8_t lyr) { + static uint16_t last_timer = 0; + static uint16_t i = 0; + static uint8_t r, g, b, pos; + + if (timer_elapsed(last_timer) < 8) { + return false; + } + + if (i >= 360) { + i = 0; + } + + last_timer = timer_read(); + r = _LIGHTS[(i + 120) % 360]; + g = _LIGHTS[i]; + b = _LIGHTS[(i + 240) % 360]; + + i++; + + bool set_rbw = false; + + for (uint8_t j = 0; j < RBW; j++) { + pos = rbw_led_keys[j].pos; + + switch (rbw_led_keys[j].status) { + case ENABLED: + if (!active_key_pos[pos] || rbw_led_keys[j].forced) { + SET_LED_RGB(r, g, b, led_dim, pos); + set_rbw = true; + } + + break; + case DISABLED: + if (!active_key_pos[pos] || rbw_led_keys[j].forced) { + SET_LED_RGB(_LC[lyr][0], _LC[lyr][1], _LC[lyr][2], led_dim, pos); + set_rbw = true; + } + + rbw_led_keys[j].status = DEFAULT; + break; + default: + break; + } + } + + return set_rbw; +} + +bool led_brightness(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGUP: + if (record->event.pressed && led_dim > 0) { + led_dim--; + eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); + } + + return true; + break; + case RGDWN: + if (record->event.pressed && led_dim < 8) { + led_dim++; + eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); + } + + return true; + break; + default: + return false; + break; + } +} + +void eeprom_read_led_dim_lvl(void) { + led_dim = eeprom_read_byte(EECONFIG_LED_DIM_LVL); + + if (led_dim > 8 || led_dim < 0) { + led_dim = 0; + eeprom_write_byte(EECONFIG_LED_DIM_LVL, led_dim); + } +} diff --git a/users/zer09/lights.h b/users/zer09/lights.h new file mode 100644 index 00000000000..f1bd7245d51 --- /dev/null +++ b/users/zer09/lights.h @@ -0,0 +1,45 @@ +#ifndef LIGHTS_H +#define LIGHTS_H + +#include "eeprom.h" +#include "tap_dance.h" +#include "zer09.h" + +/* Will hold the RGB brightness level */ +#define EECONFIG_LED_DIM_LVL (uint8_t *)15 + +#define SET_LED_RGB(r, g, b, led_dim, pos) \ + setrgb(r >> led_dim, g >> led_dim, b >> led_dim, (LED_TYPE *)&led[pos]) + +typedef enum { + DEFAULT, + ENABLED, + DISABLED, +} led_status; + +typedef struct { + led_status status; + uint8_t pos; + bool forced; +} led_key; + +enum rbw_keys { + RBW_LCTL, + RBW_LCAP, + RBW_LSPR, + RBW_RCTL, + RBW_RCAP, + RBW_RALT, + RBW_SCRL, + RBW +}; + +extern volatile led_key rbw_led_keys[RBW]; + +void set_key_led(keyrecord_t *record, uint8_t lyr); +bool set_layer_led(uint8_t lyr); +bool rainbow_loop(uint8_t lyr); +bool led_brightness(uint16_t keycode, keyrecord_t *record); +void eeprom_read_led_dim_lvl(void); + +#endif diff --git a/users/zer09/rules.mk b/users/zer09/rules.mk new file mode 100644 index 00000000000..43b409eca75 --- /dev/null +++ b/users/zer09/rules.mk @@ -0,0 +1,2 @@ +SRC += zer09.c tap_dance.c lights.c +EXTRAFLAGS += -flto diff --git a/users/zer09/tap_dance.c b/users/zer09/tap_dance.c new file mode 100644 index 00000000000..a23705ad8b5 --- /dev/null +++ b/users/zer09/tap_dance.c @@ -0,0 +1,182 @@ +#include "tap_dance.h" +#include "lights.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + [DA_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lctl_finished, + dance_lctl_reset), + [DA_LSPR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lspr_finished, + dance_lspr_reset), + [DA_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_rctl_finished, + dance_rctl_reset), + [DA_RALT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ralt_finished, + dance_ralt_reset), + [DA_UPLY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_uply_finished, + dance_uply_reset), + [DA_DWLY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_dwly_finished, + dance_dwly_reset), +}; + +volatile uint8_t active_layer = _BL; +static tap upltap_state = {.state = 0}; +static tap dwltap_state = {.state = 0}; +static tap lsprtap_state = {.state = 0}; +static tap ralttap_state = {.state = 0}; + +void layer_switcher_tap(uint8_t new_layer) { + layer_off(active_layer); + layer_on(new_layer); + active_layer = new_layer; +} + +int cur_dance(qk_tap_dance_state_t *state) { + switch (state->count) { + case 1: + return state->pressed == 0 ? SINGLE_TAP : SINGLE_HOLD; + case 2: + return state->pressed == 0 ? DOUBLE_TAP : DOUBLE_HOLD; + case 3: + return state->pressed == 0 ? TRIPLE_TAP : TRIPLE_HOLD; + default: + return state->pressed == 0 ? DEFAULT_TAP : DEFAULT_HOLD; + } +} + +void dance_lctl_finished(qk_tap_dance_state_t *state, void *user_data) { + rbw_led_keys[RBW_LCTL].status = ENABLED; + register_code(KC_LCTRL); +}; + +void dance_lctl_reset(qk_tap_dance_state_t *state, void *user_data) { + unregister_code(KC_LCTRL); + rbw_led_keys[RBW_LCTL].status = DISABLED; +}; + +void dance_lspr_finished(qk_tap_dance_state_t *state, void *user_data) { + lsprtap_state.state = cur_dance(state); + + switch (lsprtap_state.state) { + case DOUBLE_HOLD: + rbw_led_keys[RBW_LSPR].status = ENABLED; + register_code(KC_LALT); + break; + default: + register_code(KC_LGUI); + break; + } +}; + +void dance_lspr_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (lsprtap_state.state) { + case DOUBLE_HOLD: + unregister_code(KC_LALT); + rbw_led_keys[RBW_LSPR].status = DISABLED; + break; + default: + unregister_code(KC_LGUI); + break; + } +}; + +void dance_rctl_finished(qk_tap_dance_state_t *state, void *user_data) { + rbw_led_keys[RBW_RCTL].status = ENABLED; + register_code(KC_RCTRL); +}; + +void dance_rctl_reset(qk_tap_dance_state_t *state, void *user_data) { + unregister_code(KC_RCTRL); + rbw_led_keys[RBW_RCTL].status = DISABLED; +}; + +void dance_ralt_finished(qk_tap_dance_state_t *state, void *user_data) { + ralttap_state.state = cur_dance(state); + + switch (ralttap_state.state) { + case DOUBLE_HOLD: + rbw_led_keys[RBW_RALT].status = ENABLED; + unregister_code(KC_LGUI); + break; + default: + register_code(KC_RALT); + break; + } +}; + +void dance_ralt_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (ralttap_state.state) { + case DOUBLE_HOLD: + unregister_code(KC_RGUI); + rbw_led_keys[RBW_RALT].status = DISABLED; + break; + default: + unregister_code(KC_RALT); + break; + } +}; + +void dance_uply_finished(qk_tap_dance_state_t *state, void *user_data) { + upltap_state.state = cur_dance(state); + + switch (upltap_state.state) { + case SINGLE_TAP: + if (active_layer == _UL) { + layer_switcher_tap(_BL); + } else { + layer_switcher_tap(_UL); + } + break; + case SINGLE_HOLD: + layer_switcher_tap(_UL); + break; + default: + layer_switcher_tap(_BL); + break; + } +} + +void dance_uply_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (upltap_state.state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + default: + layer_switcher_tap(_BL); + break; + } + upltap_state.state = 0; +} + +void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) { + dwltap_state.state = cur_dance(state); + + switch (dwltap_state.state) { + case SINGLE_TAP: + if (active_layer == _DL) { + layer_switcher_tap(_BL); + } else { + layer_switcher_tap(_DL); + } + break; + case SINGLE_HOLD: + layer_switcher_tap(_DL); + break; + case DOUBLE_HOLD: + layer_switcher_tap(_AL); + break; + default: + layer_switcher_tap(_BL); + break; + } +} + +void dance_dwly_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (dwltap_state.state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + case DOUBLE_HOLD: + default: + layer_switcher_tap(_BL); + break; + } + dwltap_state.state = 0; +} diff --git a/users/zer09/tap_dance.h b/users/zer09/tap_dance.h new file mode 100644 index 00000000000..555c1592485 --- /dev/null +++ b/users/zer09/tap_dance.h @@ -0,0 +1,55 @@ +#ifndef TAP_DANCE_H +#define TAP_DANCE_H + +#include "zer09.h" + +typedef struct { + int state; +} tap; + +enum { + DEFAULT_TAP, + DEFAULT_HOLD, + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + TRIPLE_TAP, + TRIPLE_HOLD +}; + +enum { + DA_SAFE_START, + DA_LCTL, + DA_LSPR, + DA_RCTL, + DA_RALT, + DA_UPLY, + DA_DWLY, + DA_SAFE_END +}; + +extern volatile uint8_t active_layer; + +void layer_switcher_tap(uint8_t); +int cur_dance(qk_tap_dance_state_t *); + +void dance_lctl_finished(qk_tap_dance_state_t *, void *); +void dance_lctl_reset(qk_tap_dance_state_t *, void *); + +void dance_lspr_finished(qk_tap_dance_state_t *, void *); +void dance_lspr_reset(qk_tap_dance_state_t *, void *); + +void dance_rctl_finished(qk_tap_dance_state_t *, void *); +void dance_rctl_reset(qk_tap_dance_state_t *, void *); + +void dance_ralt_finished(qk_tap_dance_state_t *, void *); +void dance_ralt_reset(qk_tap_dance_state_t *, void *); + +void dance_uply_finished(qk_tap_dance_state_t *, void *); +void dance_uply_reset(qk_tap_dance_state_t *, void *); + +void dance_dwly_finished(qk_tap_dance_state_t *, void *); +void dance_dwly_reset(qk_tap_dance_state_t *, void *); + +#endif diff --git a/users/zer09/zer09.c b/users/zer09/zer09.c new file mode 100644 index 00000000000..a6768f0a1a7 --- /dev/null +++ b/users/zer09/zer09.c @@ -0,0 +1,88 @@ +#include "zer09.h" +#include "lights.h" +#include "tap_dance.h" + +__attribute__((weak)) void matrix_init_keymap(void) {} + +__attribute__((weak)) void matrix_scan_keymap(void) {} + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, + keyrecord_t *record) { + return true; +} + +__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} + +static uint8_t c_lyr = 0; // current layer. + +bool shifted_layer(void) { + static bool is_shifted = false; + + if (c_lyr == _VL) { + if (!is_shifted) { + register_code(KC_LSFT); + is_shifted = true; + return true; + } + } else { + if (is_shifted) { + unregister_code(KC_LSFT); + is_shifted = false; + return true; + } + } + + return false; +} + +void matrix_init_user(void) { + eeprom_read_led_dim_lvl(); + + matrix_init_keymap(); +} + +void matrix_scan_user(void) { + static uint8_t is_leds_changes = 1; + c_lyr = biton32(layer_state); + + is_leds_changes = is_leds_changes << set_layer_led(c_lyr); + is_leds_changes = is_leds_changes << shifted_layer(); + is_leds_changes = is_leds_changes << rainbow_loop(c_lyr); + + if (is_leds_changes > 1) { + rgblight_set(); + is_leds_changes = 1; + } + + matrix_scan_keymap(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + set_key_led(record, c_lyr); + + if (led_brightness(keycode, record)) { + rgblight_set(); + return false; + } + + rgblight_set(); + return process_record_keymap(keycode, record); +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + rbw_led_keys[RBW_LCAP].status = ENABLED; + rbw_led_keys[RBW_RCAP].status = ENABLED; + } else { + rbw_led_keys[RBW_LCAP].status = DISABLED; + rbw_led_keys[RBW_RCAP].status = DISABLED; + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + rbw_led_keys[RBW_SCRL].status = ENABLED; + } else { + rbw_led_keys[RBW_SCRL].status = DISABLED; + } + + led_set_keymap(usb_led); +} diff --git a/users/zer09/zer09.h b/users/zer09/zer09.h new file mode 100644 index 00000000000..75c1d3cad49 --- /dev/null +++ b/users/zer09/zer09.h @@ -0,0 +1,18 @@ +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +enum custom_keycodes { CK_SAFE = SAFE_RANGE, RGUP, RGDWN, NEWPLACEHOLDER }; + +#define _______ KC_TRNS +#define KC_RGUP RGUP +#define KC_RGDWN RGDWN + +#define _BL 0 // The base layer +#define _UL 1 // The up layer +#define _DL 2 // The down layer +#define _VL 3 // The shifted up layer +#define _AL 4 // The assorted layer + +#endif diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index 8874d8325fc..1ddffbaad77 100644 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -8,6 +8,7 @@ function export_variables { export PATH=$PATH:$util_dir/flip/bin export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin + export PATH=$PATH:/mingw64/bin } export_variables diff --git a/util/atmega32a_program.py b/util/atmega32a_program.py index 298e645477d..b777b911066 100755 --- a/util/atmega32a_program.py +++ b/util/atmega32a_program.py @@ -73,7 +73,7 @@ if len(sys.argv) < 2: kb = checkForKeyboardInNormalMode() if kb is not None: - print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='') + print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') sendDeviceToBootloaderMode(kb) print(' done.') print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") diff --git a/util/linux_install.sh b/util/linux_install.sh old mode 100644 new mode 100755 index ef9de5b19f5..e071b8ad30f --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -10,6 +10,15 @@ elif grep ID /etc/os-release | grep -q debian; then sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc \ dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi \ libnewlib-arm-none-eabi +elif grep ID /etc/os-release | grep -q arch; then + sudo pacman -S gcc unzip wget zip avr-gcc avr-binutils avr-libc \ + dfu-util arm-none-eabi-gcc arm-none-eabi-binutils \ + arm-none-eabi-newlib + git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer + cd /tmp/dfu-programmer + makepkg -sic + rm -rf /tmp/dfu-programmer/ + else echo "Sorry, we don't recognize your OS. Help us by contributing support!" echo diff --git a/util/msys2_install.sh b/util/msys2_install.sh index c6468575413..d9459580c7d 100644 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -67,7 +67,7 @@ if [ ! -d "$armtools" ]; then while true; do echo echo "The ARM toolchain is not installed." - echo "This is needed for building ARM based keboards." + echo "This is needed for building ARM based keyboards." read -p "Do you want to install it? (Y/N) " res case $res in [Yy]* ) install_arm; break;; diff --git a/util/new_project.sh b/util/new_project.sh index 0c28feb4ae4..a85e8332220 100755 --- a/util/new_project.sh +++ b/util/new_project.sh @@ -2,9 +2,21 @@ # Script to make a new quantum project # Jack Humbert 2015 -if [ -z "$1" ]; then - echo "Usage: $0 " - exit 1 +KEYBOARD=$1 +KEYBOARD_TYPE=$2 + +if [ -z "$KEYBOARD" ]; then + echo "Usage: $0 " + echo "Example: $0 gh60 avr" + echo "Example: $0 bfake ps2avrgb" + exit 1 +elif [ -z "$KEYBOARD_TYPE" ]; then + KEYBOARD_TYPE=avr +fi + +if [ $KEYBOARD_TYPE != "avr" -a $KEYBOARD_TYPE != "ps2avrgb" ]; then + echo "Invalid keyboard type target" + exit 1 fi if [ -e "keyboards/$1" ]; then @@ -14,12 +26,14 @@ fi cd "$(dirname "$0")/.." -KEYBOARD=$1 KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}') KEYBOARD_NAME=$(basename $1) KEYBOARD_NAME_UPPERCASE=$(echo $KEYBOARD_NAME | awk '{print toupper($0)}') -cp -r quantum/template keyboards/$KEYBOARD + +cp -r quantum/template/base keyboards/$KEYBOARD +cp -r quantum/template/$KEYBOARD_TYPE/. keyboards/$KEYBOARD + mv keyboards/${KEYBOARD}/template.c keyboards/${KEYBOARD}/${KEYBOARD_NAME}.c mv keyboards/${KEYBOARD}/template.h keyboards/${KEYBOARD}/${KEYBOARD_NAME}.h find keyboards/${KEYBOARD} -type f -exec sed -i '' -e "s;%KEYBOARD%;${KEYBOARD_NAME};g" {} \;