diff --git a/.editorconfig b/.editorconfig index 82837f7f..4cd051ce 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,6 @@ indent_style = space indent_size = 2 # We recommend you to keep these unchanged -end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true @@ -16,3 +15,22 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false indent_size = 4 + +# Make these match what we have in .gitattributes +[*.mk] +end_of_line = lf + +[Makefile] +end_of_line = lf + +[*.sh] +end_of_line = lf + +# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files + + +# We don't have gitattributes properly for these +# So if the user have for example core.autocrlf set to true +# the line endings would be wrong. +[lib/**] +end_of_line = unset diff --git a/.gitignore b/.gitignore index 90f29a29..a8dd97ef 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ util/Win_Check_Output.txt .vscode/last.sql .vscode/temp.sql .stfolder +.tags # ignore image files *.png @@ -64,4 +65,4 @@ util/Win_Check_Output.txt # things travis sees secrets.tar id_rsa_* -/.vs +/.vs \ No newline at end of file diff --git a/build_keyboard.mk b/build_keyboard.mk index cbdaaa01..921159a5 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -113,13 +113,14 @@ endif # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA ifdef MCU_FAMILY + FIRMWARE_FORMAT=bin PLATFORM=CHIBIOS else PLATFORM=AVR + FIRMWARE_FORMAT=hex endif ifeq ($(PLATFORM),CHIBIOS) - include $(TMK_PATH)/protocol/chibios.mk include $(TMK_PATH)/chibios.mk OPT_OS = chibios ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") @@ -195,7 +196,7 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) else ifneq ($(LAYOUTS),) include build_layout.mk -else +else $(error Could not find keymap) # this state should never be reached endif @@ -245,6 +246,10 @@ endif include $(TMK_PATH)/avr.mk endif +ifeq ($(PLATFORM),CHIBIOS) + include $(TMK_PATH)/protocol/chibios.mk +endif + ifeq ($(strip $(VISUALIZER_ENABLE)), yes) VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer @@ -270,7 +275,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) all: build check-size # Change the build target to build a HEX file or a library. -build: elf cphex +build: elf cpfirmware #build: elf hex eep lss sym #build: lib diff --git a/common_features.mk b/common_features.mk index a67cf230..1c0b3546 100644 --- a/common_features.mk +++ b/common_features.mk @@ -155,6 +155,9 @@ endif ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes + endif + ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif endif diff --git a/docs/_summary.md b/docs/_summary.md index 0192db0d..50d9a37a 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -3,9 +3,16 @@ * [Install Build Tools](getting_started_build_tools.md) * Alternative: [Vagrant Guide](getting_started_vagrant.md) * [Build/Compile Instructions](getting_started_make_guide.md) - * [Flashing Instructions](flashing.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) @@ -25,6 +32,7 @@ * [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) @@ -37,6 +45,7 @@ * [RGB Lighting](feature_rgblight.md) * [Space Cadet](feature_space_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) @@ -64,7 +73,7 @@ * [Customizing Functionality](custom_quantum_functions.md) * [Documentation Best Practices](documentation_best_practices.md) * [Documentation Templates](documentation_templates.md) - * [Glossary](glossary.md) + * [Glossary](reference_glossary.md) * [Keymap Overview](keymap.md) * [Unit Testing](unit_testing.md) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index e7a45e0b..98478733 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec. * `USB_LED_COMPOSE` * `USB_LED_KANA` -### Example `led_set_kb()` Implementation +### Example `led_set_user()` Implementation ``` -void led_set_kb(uint8_t usb_led) { +void led_set_user(uint8_t usb_led) { if (usb_led & (1<Hide Empty Folders icon button above the targets tree to only show your build target. 8. Double-click the build target you created to trigger a build. 9. Select the Console view at the bottom to view the running build. + + [1]: https://en.wikipedia.org/wiki/Eclipse_(software) \ No newline at end of file diff --git a/docs/faq_build.md b/docs/faq_build.md index d38ca69d..ff409f9c 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -1,40 +1,25 @@ # Frequently Asked Build Questions -This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides. +This page covers questions about building QMK. If you haven't yet done so, you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides. ## Can't Program on Linux -You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line. +You will need proper permissions to operate a device. For Linux users, see the instructions regarding `udev` rules, below. If you have issues with `udev`, a work-around is to use the `sudo` command. If you are not familiar with this command, check its manual with `man sudo` or [see this webpage](https://linux.die.net/man/8/sudo). -In short when your controller is ATMega32u4, +An example of using `sudo`, when your controller is ATMega32u4: $ sudo dfu-programmer atmega32u4 erase --force $ sudo dfu-programmer atmega32u4 flash your.hex $ sudo dfu-programmer atmega32u4 reset -or just +or just: $ sudo make ::dfu -But to run `make` with root privilege is not good idea. Use former method if possible. - -## WINAVR is Obsolete -It is no longer recommended and may cause some problem. -See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - -## USB VID and PID -You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. - -Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. - -Also see this. -https://github.com/tmk/tmk_keyboard/issues/150 - -You can buy a really unique VID:PID here. I don't think you need this for personal use. -- http://www.obdev.at/products/vusb/license.html -- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 +Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible. ## Linux `udev` Rules -On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`. +On Linux, you'll need proper privileges to access the MCU. You can either use +`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. **/etc/udev/rules.d/50-atmel-dfu.rules:** ``` @@ -52,6 +37,21 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066 SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` +## WINAVR is Obsolete +It is no longer recommended and may cause some problem. +See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID and PID +You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. + +Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. + +Also see this. +https://github.com/tmk/tmk_keyboard/issues/150 + +You can buy a really unique VID:PID here. I don't think you need this for personal use. +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 ## Cortex: `cstddef: No such file or directory` GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA. @@ -61,7 +61,6 @@ https://github.com/tmk/tmk_keyboard/issues/212 https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef https://developer.mbed.org/forum/mbed/topic/5205/ - ## `clock_prescale_set` and `clock_div_1` Not Available Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 0fed0445..674d207a 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -14,6 +14,15 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI ![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png) +## Some Of My Keys Are Swapped Or Not Working + +QMK has two features, Bootmagic and Command, which allow you to change the behavior of your keyboard on the fly. This includes, but is not limited to, swapping Ctrl/Caps, disabling Gui, swapping Alt/Gui, swapping Backspace/Backslash, disabling all keys, and other behavioral modifications. + +As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here: + +* [Bootmagic](feature_bootmagic.md) +* [Command](feature_command.md) + ## The Menu Key Isn't Working The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key. @@ -22,13 +31,13 @@ The key found on most modern keyboards that is located between `KC_RGUI` and `KC Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and -- http://en.wikipedia.org/wiki/Magic_SysRq_key -- http://en.wikipedia.org/wiki/System_request +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request ## Power Key Doesn't Work Use `KC_PWR` instead of `KC_POWER` or vice versa. -- `KC_PWR` works with Windows and Linux, not with OSX. -- `KC_POWER` works with OSX and Linux, not with Windows. +* `KC_PWR` works with Windows and Linux, not with OSX. +* `KC_POWER` works with OSX and Linux, not with Windows. More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 @@ -40,9 +49,9 @@ https://github.com/tmk/tmk_keyboard/issues/67 Modifier keys or layers can be stuck unless layer switching is configured properly. For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. -- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching -- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 -- https://github.com/tmk/tmk_keyboard/issues/248 +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 ## Mechanical Lock Switch Support @@ -66,17 +75,17 @@ See this post for example **MACRO** code. http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 On **Windows** you can use `AltGr` key or **Alt code**. -- http://en.wikipedia.org/wiki/AltGr_key -- http://en.wikipedia.org/wiki/Alt_code +* http://en.wikipedia.org/wiki/AltGr_key +* http://en.wikipedia.org/wiki/Alt_code On **Mac** OS defines `Option` key combinations. -- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input +* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input On **Xorg** you can use `compose` key, instead. -- http://en.wikipedia.org/wiki/Compose_key +* http://en.wikipedia.org/wiki/Compose_key And see this for **Unicode** input. -- http://en.wikipedia.org/wiki/Unicode_input +* http://en.wikipedia.org/wiki/Unicode_input ## Apple/Mac Keyboard `Fn` diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 0e22154f..ceee7fad 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -116,7 +116,7 @@ These are the values you can use for the `mod` in `MT()` and `OSM()`: * MOD_HYPR * MOD_MEH -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers. +These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: @@ -129,6 +129,12 @@ 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. + +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 %} + # One Shot Keys One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys". diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 6b991a9a..5b11aa3a 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -82,6 +82,10 @@ The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, a #define PITCH_STANDARD_A 432.0f +You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: + + #define NO_MUSIC_MODE + ## 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 f6c24874..ae821431 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -1,7 +1,7 @@ # Auto Shift: Why Do We Need a Shift Key? Tap a key and you get its character. Tap a key, but hold it *slightly* longer -and you get its shifted state. Viola! No shift key needed! +and you get its shifted state. Voilà! No shift key needed! ## Why Auto Shift? diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 037830c4..e0963032 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -1,29 +1,89 @@ -# Bootmagic - - - -## Bootmagic Keycodes - -Shortcuts for bootmagic options. You can use these even when bootmagic is off. - -|Key |Aliases |Description | -|----------------------------------|---------|------------------------------------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock | -|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control | -|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI | -|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI | -|`MAGIC_NO_GUI` | |Disable the GUI key | -|`MAGIC_SWAP_GRAVE_ESC` | |Swap ` and Escape | -|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace | -|`MAGIC_HOST_NKRO` | |Force NKRO on | -|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | -|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock | -|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control | -|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI | -|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI | -|`MAGIC_UNNO_GUI` | |Enable the GUI key | -|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap ` and Escape| -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace | -|`MAGIC_UNHOST_NKRO` | |Force NKRO off | -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI | -|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off | +# Bootmagic and Magic Keycodes + +There are 3 separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality you access that functionality in different ways depending on how your keyboard is configured. + +Bootmagic is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command you hold down the bootmagic key (`KC_SPACE` on most keyboards) and one or more command keys. + +Bootmagic Keycodes allow you to access the Bootmagic functionality after your keyboard has initialized. To use Bootmagic Keycodes you assign keycodes starting with `MAGIC_`, much in the same way you define any other key. + +Command is a feature that allows you to control different aspects of your keyboard. Command used to be called Magic. Command is typically accessed by holding Left and Right Shift at the same time, although that can be customized. While it shares some functionality with Bootmagic it also allows you to access functionality that Bootmagic does not. For more information see the (Command)[feature_command.md) documentation page. + +## Enabling Bootmagic + +Bootmagic is disabled by default. To use Bootmagic you need to enable it in your `rules.mk` file: + + BOOTMAGIC_ENABLE = yes + +## Bootmagic Hotkeys and Keycodes + +This table describes the default Hotkeys for Bootmagic and the Keycodes for Magic. These may be overriden at the Keyboard or Keymap level. Some functionality is not available in both methods. + +To use the Hotkey hold down `BOOTMAGIC_KEY_SALT` (`KC_SPACE` by default) and the Hotkey while plugging in your keyboard. To use the Keycode assign that keycode to a layer. For example, if you hold down Space+B while plugging in most keyboards, you will enter bootloader mode. + +|Hotkey |Keycode |Description | +|-----------|----------------------------------|--------------------------------------------------------| +|`ESC` | |Skip bootmagic and saved eeprom configuration | +|`B` |`RESET` |Enter bootloader instead of firmware | +|`D` |`DEBUG` |Enable debugging (writes messages to serial) | +|`X` | |Enable matrix debugging | +|`K` | |Enable keyboard debugging | +|`M` | |Enable mouse debugging | +|`BACKSPACE`| |Clear the saved settings from flash | +|`CAPSLOCK` |`MAGIC_CAPSLOCK_TO_CONTROL` |Treat `Capslock` as `Control` | +| |`MAGIC_UNCAPSLOCK_TO_CONTROL` |Stop treating CapsLock as Control | +|`LCTRL` |`MAGIC_SWAP_CONTROL_CAPSLOCK` |Swap `Control` and `Capslock` | +| |`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |Unswap Left Control and Caps Lock | +| |`MAGIC_SWAP_ALT_GUI` |Swap Alt and GUI on both sides | +| |`MAGIC_UNSWAP_ALT_GUI` |Unswap Left Alt and GUI | +|`LALT` |`MAGIC_SWAP_LALT_LGUI` |Swap Left `Alt` and `GUI`, e.g. for OSX Opt and Cmd | +| |`MAGIC_UNSWAP_LALT_LGUI` |Unswap Left Alt and GUI | +|`RALT` |`MAGIC_SWAP_RALT_RGUI` |Swap Right `Alt` and `GUI` | +| |`MAGIC_UNSWAP_RALT_RGUI` |Unswap Right Alt and GUI | +|`LGUI` |`MAGIC_NO_GUI` |Disable GUI key - e.g. disable Windows key during gaming| +| |`MAGIC_UNNO_GUI` |Enable the GUI key | +|`GRAVE` |`MAGIC_SWAP_GRAVE_ESC` |Swap `\`~` and `ESC` | +| |`MAGIC_UNSWAP_GRAVE_ESC` |Unswap `\`~` and Escape | +|`BACKSLASH`|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |Swap Blackslash and Backspace | +| |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Unswap Backslash and Backspace | +|`N` |`MAGIC_HOST_NKRO` |Force N-Key Rollover (NKRO) on | +| |`MAGIC_UNHOST_NKRO` |Force NKRO off | +| |`MAGIC_TOGGLE_NKRO` |Toggle NKRO on or off | +|`0` |`DF(0)` |Make Layer 0 the default layer at bootup | +|`1` |`DF(1)` |Make Layer 1 the default layer at bootup | +|`2` |`DF(2)` |Make Layer 2 the default layer at bootup | +|`3` |`DF(3)` |Make Layer 3 the default layer at bootup | +|`4` |`DF(4)` |Make Layer 4 the default layer at bootup | +|`5` |`DF(5)` |Make Layer 5 the default layer at bootup | +|`6` |`DF(6)` |Make Layer 6 the default layer at bootup | +|`7` |`DF(7)` |Make Layer 7 the default layer at bootup | + +## Bootmagic Configuration + +When setting up your keyboard and/or keymap there are a number of `#define`s that control the behavior of Bootmagic. To use these put them in your `config.h`, either at the keyboard or keymap level. + +|Define |Default|Description | +|-------|-------|------------| +|`BOOTMAGIC_KEY_SALT`|`KC_SPACE`|The key to hold down to trigger Bootmagic during initialization.| +|`BOOTMAGIC_KEY_SKIP`|`KC_ESC`|The Hotkey to ignore saved eeprom configuration.| +|`BOOTMAGIC_KEY_EEPROM_CLEAR`|`KC_BSPACE`|The hotkey to clear the saved eeprom configuration.| +|`BOOTMAGIC_KEY_BOOTLOADER`|`KC_B`|The hotkey to enter the bootloader.| +|`BOOTMAGIC_KEY_DEBUG_ENABLE`|`KC_D`|The hotkey to enable debug mode.| +|`BOOTMAGIC_KEY_DEBUG_MATRIX`|`KC_X`|The hotkey to enable matrix debugging mode.| +|`BOOTMAGIC_KEY_DEBUG_KEYBOARD`|`KC_K`|The hotkey to enable keyboard debugging mode.| +|`BOOTMAGIC_KEY_DEBUG_MOUSE`|`KC_M`|The hotkey to enable mouse debugging mode.| +|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK`|`KC_LCTRL`|| +|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL`|`KC_CAPSLOCK`|| +|`BOOTMAGIC_KEY_SWAP_LALT_LGUI`|`KC_LALT`|| +|`BOOTMAGIC_KEY_SWAP_RALT_RGUI`|`KC_RALT`|| +|`BOOTMAGIC_KEY_NO_GUI`|`KC_LGUI`|| +|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC`|`KC_GRAVE`|| +|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH`|| +|`BOOTMAGIC_HOST_NKRO`|`KC_N`|| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_0`|`KC_0`|Hotkey to set Layer 0 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_1`|`KC_1`|Hotkey to set Layer 1 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_2`|`KC_2`|Hotkey to set Layer 2 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_3`|`KC_3`|Hotkey to set Layer 3 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_4`|`KC_4`|Hotkey to set Layer 4 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_5`|`KC_5`|Hotkey to set Layer 5 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_6`|`KC_6`|Hotkey to set Layer 6 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_7`|`KC_7`|Hotkey to set Layer 7 as the default layer| diff --git a/docs/feature_command.md b/docs/feature_command.md new file mode 100644 index 00000000..ad987aaf --- /dev/null +++ b/docs/feature_command.md @@ -0,0 +1,52 @@ +# Command (Formerly known as Magic) + +Command is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md). Whenever possible we encourage you to use that functionality instead of Command. + +## Enabling Command + +By default Command is disabled. You can enable it in your `rules.mk` file: + + COMMAND_ENABLE = yes + +## Usage + +To use Command you hold down the key combination defined by `IS_COMMAND`. By default that combination is both shift keys. While holding the key combination press the key corresponding to the command you want. + +For example, to write the current QMK version to the QMK Toolbox console, you can press `Left Shift`+`Right Shift`+`V`. + +## Configuration + +The following values can be defined in `config.h` to control the behavior of Command. + +|Define |Default | Description | +|-------|--------|-------------| +|`IS_COMMAND()` |`(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`|Key combination to activate Command| +|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Do layer switching with Function row| +|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Do layer switching with number keys.| +|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Do layer switching with custom keys (`MAGIC_KEY_LAYER0..9` below.)| +|`MAGIC_KEY_HELP1` |`H` |Show help.| +|`MAGIC_KEY_HELP2` |`SLASH` |Show help.| +|`MAGIC_KEY_DEBUG` |`D` |Turn on debug mode.| +|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Turn on matrix debugging.| +|`MAGIC_KEY_DEBUG_KBD` |`K` |Turn on keyboard debugging.| +|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Turn on mouse debugging.| +|`MAGIC_KEY_VERSION` |`V` |Write the QMK version to the console| +|`MAGIC_KEY_STATUS` |`S` |Show the current keyboard status| +|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command Console| +|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Alternate access to layer 0| +|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Alternate access to layer 0| +|`MAGIC_KEY_LAYER0` |`0` |Change default layer to 0| +|`MAGIC_KEY_LAYER1` |`1` |Change default layer to 1| +|`MAGIC_KEY_LAYER2` |`2` |Change default layer to 2| +|`MAGIC_KEY_LAYER3` |`3` |Change default layer to 3| +|`MAGIC_KEY_LAYER4` |`4` |Change default layer to 4| +|`MAGIC_KEY_LAYER5` |`5` |Change default layer to 5| +|`MAGIC_KEY_LAYER6` |`6` |Change default layer to 6| +|`MAGIC_KEY_LAYER7` |`7` |Change default layer to 7| +|`MAGIC_KEY_LAYER8` |`8` |Change default layer to 8| +|`MAGIC_KEY_LAYER9` |`9` |Change default layer to 9| +|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Exit keyboard and enter bootloader| +|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed| +|`MAGIC_KEY_EEPROM` |`E` |Erase EEPROM settings| +|`MAGIC_KEY_NKRO` |`N` |Toggle NKRO on/off| +|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping on/off| diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index 24c42c09..bfae9204 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -35,10 +35,12 @@ New names should try to stick to the standards set by existing layouts, and can ## Supporting a Layout -For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `.h`, and match the number of arguments/keys (and preferably the physical layout): +For a keyboard to support a layout, the variable must be defined in it's `.h`, and match the number of arguments/keys (and preferably the physical layout): #define LAYOUT_60_ansi KEYMAP_ANSI +The name of the layout must match this regex: `[a-z0-9_]+` + The folder name must be added to the keyboard's `rules.mk`: LAYOUTS = 60_ansi diff --git a/docs/feature_macros.md b/docs/feature_macros.md index dff692bd..006fa04b 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -22,7 +22,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case MY_CUSTOM_MACRO: SEND_STRING("QMK is the best thing ever!"); // this is our macro! - return false; break; + return false; } } return true; @@ -56,10 +56,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case MY_CUSTOM_MACRO: SEND_STRING("QMK is the best thing ever!"); - return false; break; + return false; case MY_OTHER_MACRO: SEND_STRING(SS_LCTRL("ac")); // selects all and copies - return false; break; + return false; } } return true; @@ -97,6 +97,7 @@ There's also a couple of mod shortcuts you can use: * `SS_LGUI(string)` * `SS_LALT(string)` * `SS_LSFT(string)` +* `SS_RALT(string)` These press the respective modifier, send the supplied string and then release the modifier. They can be used like this: diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md index c4239b4d..673eafae 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/feature_mouse_keys.md @@ -5,17 +5,17 @@ Mousekeys is a feature that allows you to emulate a mouse using your keyboard. Y ## Adding Mousekeys to a Keymap -There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard. +There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard. -### Adding Mousekeys Support in the `Makefile` +### Adding Mousekeys Support in the `rules.mk` -To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`: +To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`: ``` MOUSEKEY_ENABLE = yes ``` -You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile +You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk ### Mapping Mouse Actions to Keyboard Keys @@ -40,7 +40,7 @@ You can use these keycodes within your keymap to map button presses to mouse act |`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| |`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| -You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46 +You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46 ## Configuring the Behavior of Mousekeys diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md new file mode 100644 index 00000000..42f9e086 --- /dev/null +++ b/docs/feature_swap_hands.md @@ -0,0 +1,31 @@ +# Swap-Hands Action + +The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd` + +## Configuration + +The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: + +```C +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; +``` + +Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing. + +## Advanced Swap Commands + +|Macro | Description | +|------|-------------| +| `ACTION_SWAP_HANDS()` | Swaps hands when pressed, returns to normal when released (momentary). | +| `ACTION_SWAP_HANDS_TOGGLE()` | Toggles swap on and off with every key press. | +| `ACTION_SWAP_HANDS_TAP_TOGGLE()` | Toggles with a tap; momentary when held. | +| `ACTION_SWAP_HANDS_TAP_KEY(key)`| Sends `key` with a tap; momentary swap when held. | +| `ACTION_SWAP_HANDS_ON_OFF()` | Alias for `ACTION_SWAP_HANDS()` | +| `ACTION_SWAP_HANDS_OFF_ON()` | Momentarily turns off swap. | +| `ACTION_SWAP_HANDS_ON()` | Turns on swapping and leaves it on. | +| `ACTION_SWAP_HANDS_OFF()` | Turn off swapping and leaves it off. Good for returning to a known state. | \ No newline at end of file diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index cd748dbf..636b5467 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -31,11 +31,15 @@ git Install the dependencies with your favorite package manager. -Debian/Ubuntu example: +Debian / Ubuntu example: sudo apt-get update 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 +Fedora / Red Hat example: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + ## Nix If you're on [NixOS](https://nixos.org/), or have Nix installed on Linux or macOS, run `nix-shell` from the repository root to get a build environment. @@ -128,7 +132,7 @@ docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasqu On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this: ```bash -docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware +docker run -e keymap=default -e keyboard=ergodox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware ``` diff --git a/docs/getting_started_getting_help.md b/docs/getting_started_getting_help.md new file mode 100644 index 00000000..7fb3b49e --- /dev/null +++ b/docs/getting_started_getting_help.md @@ -0,0 +1,21 @@ +# Getting Help + +There are a lot of resources for getting help with QMK. + +## Realtime Chat + +You can find QMK developers and users on our main [gitter chat room](https://gitter.im/qmk/qmk_firmware). We also have other rooms for more specific discussion: + +* [Main Firmware Chat](https://gitter.im/qmk/qmk_firmware) +* [QMK Toolbox](https://gitter.im/qmk/qmk_toolbox) +* [Hardware Design Discussion](https://gitter.im/qmk/qmk_hardware) +* [Web Configurator](https://gitter.im/qmk/qmk_configurator) +* [Compiler API](https://gitter.im/qmk/qmk_compiler_api) + +## OLKB Subreddit + +The official QMK forum is [/r/olkb](https://reddit.com/r/olkb) on [reddit.com](https://reddit.com). + +## Github Issues + +You can open an [issue on GitHub](https://github.com/qmk/qmk_firmware/issues). This is especially handy when your issue will require long-term discussion or debugging. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 0a4e2d11..0892f85c 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -4,7 +4,7 @@ We welcome all keyboard projects into QMK, but ask that you try to stick to a co ## Naming Your Keyboard/Project -All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. +All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. `test`, `keyboard`, and `all` are reserved by make and are not a valid name for a keyboard. ## `readme.md` @@ -16,6 +16,22 @@ In an effort to keep the repo size down, we're no longer accepting images of any Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. +## Keyboard Defaults + +Given the amount of functionality that QMK exposes it's very easy to confuse new users. When putting together the default firmware for your keyboard we recommend limiting your enabled features and options to the minimal set needed to support your hardware. Recommendations for specific features follow. + +### Bootmagic and Command + +(Bootmagic)[feature_bootmagic.md) and (Command)[feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. + +By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in. + +If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command. + +## Custom Keyboard Programming + +As documented on (Customizing Functionality)[custom_quantum_functions.md] you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`. + ## Keyboard Metadata As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK. diff --git a/docs/keycodes.md b/docs/keycodes.md index fa02512d..030b2382 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -366,7 +366,7 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` | |`KC_QUESTION` |`KC_QUES` |`?` | -## [Switching and Toggling Layers](feature_common_shortcuts.md#switching-and-toggling-layers) +## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers) |Key |Description | |---------------|----------------------------------------------------------------------------------| diff --git a/docs/keymap.md b/docs/keymap.md index 8401ee14..090a9266 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -33,7 +33,7 @@ The state of the Keymap layer is determined by two 32 bit parameters: * **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer). * **`layer_state`** has current on/off status of each layer in its bits. -Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. +Keymap layer '0' is usually the `default_layer`, with other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. Initial state of Keymap Change base layout ----------------------- ------------------ diff --git a/docs/newbs.md b/docs/newbs.md new file mode 100644 index 00000000..eea8ea0f --- /dev/null +++ b/docs/newbs.md @@ -0,0 +1,16 @@ +# The Compelete Newbs Guide To QMK + +QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level. + +Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs. + +## Overview + +There are 4 main sections to this guide: + +* [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) + +This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md). diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md new file mode 100644 index 00000000..ea01a1a6 --- /dev/null +++ b/docs/newbs_building_firmware.md @@ -0,0 +1,73 @@ +# Building Your First Firmware + +Now that you have setup your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware. + +If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory. + +## Navigate To Your Keymaps Folder + +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. + +macOS: + + open keyboards//keymaps + +Windows: + + start keyboards//keymaps +{% endhint %} + +## Create a Copy Of The `default` Keymap + +Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character. + +## Open `keymap.c` In Your Favorite Text Editor + +Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +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 %} + +## Customize The Layout To Your Liking + +How to complete this step is entirely up to you. Make the one change that's been bugging you, or completely rework everything. You can remove layers if you don't need all of them, or add layers up to a total of 32. Check the following documentation to find out what you can define here: + +* [Keycodes](keycodes.md) +* [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 %} + +## Build Your Firmware + +When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command: + + make : + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command: + + make planck/rev5:xyverz + +While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flash Your Firmware + +Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard. diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md new file mode 100644 index 00000000..c466a4e4 --- /dev/null +++ b/docs/newbs_flashing.md @@ -0,0 +1,79 @@ +# Flashing Your Keyboard With QMK Toolbox + +Now that you've built a custom firmware file you'll want to flash your keyboard. + +## Load The File Into QMK Toolbox + +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. + +Windows: + + start . + +macOS: + + open . +{% endhint %} + +The firmware file always follows this naming format: + + _.{bin,hex} + +For example, the `plank/rev5` with a `default` keymap will have this filename: + + planck_rev5_default.hex + +Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. + +## Put Your Keyboard Into DFU (Bootloader) Mode + +In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written. + +Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order: + +* Hold down both shift keys and press `Pause` +* Hold down both shift keys and press `B` +* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys +* Press the physical `RESET` button on the bottom of the PCB +* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in + +When you are successful you will see a message similar to this in QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +## Flash Your Keyboard + +Click the `Flash` button in QMK Toolbox. You will see output similar to the following: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## Test It Out! + +Congrats! Your custom firmware has been programmed to your keyboard! + +Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality. diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md new file mode 100644 index 00000000..60b94b01 --- /dev/null +++ b/docs/newbs_getting_started.md @@ -0,0 +1,98 @@ +# Introduction + +Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard. + +QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules. + +# Getting Started + +Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for. + +## Download Software + +### Text Editor + +You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text. + +{% 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 %} + +### QMK Toolbox + +QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print. + +* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest) +* [Source Code](https://github.com/qmk/qmk_toolbox/) + +## Environment Setup + +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 %} + +### Windows + +You will need to install msys2 and git. + +* Follow the installation instructions on the msys2 homepage: http://www.msys2.org +* Close any open msys2 terminals, and open a new terminal +* Install git by running this command: `pacman -S git` + +### macOS + +You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh + +### Linux + +You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it: + +* Debian/Ubuntu/Devuan: `apt-get install git` +* Fedora/Redhat/Centos: `yum install git` +* Arch: `pacman -S git` + +## Download QMK + +Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands: + + 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 %} + +## Setup QMK + +QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command: + + ./util/qmk_install.sh + +## Test Your Build Environment + +Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format: + + make :default + +For example, to build a firmware for a Clueboard 66% use: + + make clueboard/66/rev3:default + +When it is done you should have a lot of output that ends similar to this: + +``` +Linking: .build/clueboard_66_rev2_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev2_default.hex [OK] +Copying clueboard_66_rev2_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev2_default.hex [OK] + * File size is fine - 25174/28672 +``` + +## Creating Your Layout + +Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that. diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md new file mode 100644 index 00000000..1d8021de --- /dev/null +++ b/docs/newbs_testing_debugging.md @@ -0,0 +1,33 @@ +# Testing and Debugging + +Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong. + +## Testing + +Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. There are even programs that will help you make sure that no key is missed. + +Note: These programs are not provided by or endorsed by QMK. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) +* [Keyboard Tester](http://www.keyboardtester.com) (Web Based) +* [Keyboard Checker](http://keyboardchecker.com) (Web Based) + +## Debugging With QMK Toolbox + +[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode. + + + +## Sending Your Own Debug Messages + +Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file: + + #include + +After that you can use a few different print functions: + +* `print("string")`: Print a simple string. +* `sprintf("%s string", var)`: Print a formatted string +* `dprint("string")` Print a simple string, but only when debug mode is enabled +* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled diff --git a/docs/redirects.json b/docs/redirects.json index b8480836..43e90640 100644 --- a/docs/redirects.json +++ b/docs/redirects.json @@ -16,6 +16,10 @@ "from": "feature_common_shortcuts.html", "to": "feature_advanced_keycodes.html" }, + { + "from": "glossary.html", + "to": "reference_glossary.html" + }, { "from": "key_lock.html", "to": "feature_key_lock.html" diff --git a/docs/glossary.md b/docs/reference_glossary.md similarity index 98% rename from docs/glossary.md rename to docs/reference_glossary.md index c8c54d6d..754c1469 100644 --- a/docs/glossary.md +++ b/docs/reference_glossary.md @@ -4,7 +4,7 @@ A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. ## AVR -A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported. +A line of 8-bit MCU's produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. ## AZERTY The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 13b6e2ef..4544cb26 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. -You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/rev2/rev2.h). Explaining that is outside the scope of this document. +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment @@ -135,8 +135,8 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128) * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140) * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143) - * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20) - * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/keymaps/default/keymap.c#L58) * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102) * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10) * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69) diff --git a/keyboards/1up60rgb/1up60rgb.c b/keyboards/1up60rgb/1up60rgb.c new file mode 100644 index 00000000..4ba631c7 --- /dev/null +++ b/keyboards/1up60rgb/1up60rgb.c @@ -0,0 +1 @@ +#include "1up60rgb.h" diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h new file mode 100644 index 00000000..a3d820f8 --- /dev/null +++ b/keyboards/1up60rgb/1up60rgb.h @@ -0,0 +1,20 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define KEYMAP( \ + 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, 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, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { 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 diff --git a/keyboards/1up60rgb/config.h b/keyboards/1up60rgb/config.h new file mode 100644 index 00000000..2668ab21 --- /dev/null +++ b/keyboards/1up60rgb/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 1upkeyboards +#define PRODUCT 1UP RGB Underglow PCB +#define DESCRIPTION 60% keyboard with RGB underglow + +/* 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 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1up60rgb/keymaps/default/keymap.c new file mode 100644 index 00000000..3f0f49b7 --- /dev/null +++ b/keyboards/1up60rgb/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + ; + + switch (id) { + + } + 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_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + 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/1up60rgb/keymaps/iso/keymap.c b/keyboards/1up60rgb/keymaps/iso/keymap.c new file mode 100644 index 00000000..140ff632 --- /dev/null +++ b/keyboards/1up60rgb/keymaps/iso/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + ; + + switch (id) { + + } + 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_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + 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/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1up60rgb/keymaps/tsangan/keymap.c new file mode 100644 index 00000000..6b47a1a3 --- /dev/null +++ b/keyboards/1up60rgb/keymaps/tsangan/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_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( + 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, + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_DOWN, 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) { + ; + + switch (id) { + + } + 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_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + 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/1up60rgb/readme.md b/keyboards/1up60rgb/readme.md new file mode 100644 index 00000000..0e132e44 --- /dev/null +++ b/keyboards/1up60rgb/readme.md @@ -0,0 +1,13 @@ +# 1upkeyboards 60% RGB + +Firmware for custom keyboard PCB with 60% key layout. + +Keyboard Maintainer: [rempired](https://github.com/rempired) +Hardware Supported: 1upkeyboards 60% RGB +Hardware Availability: [1upkeyboards](https://1upkeyboards.com/rgb-underglow-1up-pcb.html) + +Make example for this keyboard (after setting up your build environment): + + make 1up60rgb: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/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk new file mode 100644 index 00000000..c303af4b --- /dev/null +++ b/keyboards/1up60rgb/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/atom47/atom47.c b/keyboards/atom47/atom47.c new file mode 100644 index 00000000..7b839e79 --- /dev/null +++ b/keyboards/atom47/atom47.c @@ -0,0 +1,31 @@ +#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 + +#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 + +/* 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 + +/* 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 4 + +#endif + +#define RGB_DI_PIN D0 // The pin the LED strip is connected to +#define RGBLED_NUM 1 // Number of LEDs in your strip + +#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_INPUT B1 // usually ROW +#define QMK_LED B6 \ No newline at end of file diff --git a/keyboards/atom47/keymaps/LEdiodes/atom47.c b/keyboards/atom47/keymaps/LEdiodes/atom47.c new file mode 100644 index 00000000..7b839e79 --- /dev/null +++ b/keyboards/atom47/keymaps/LEdiodes/atom47.c @@ -0,0 +1,31 @@ +#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 + +#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 + +/* 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 + +/* 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 4 + +#endif + +#define RGB_DI_PIN D0 // The pin the LED strip is connected to +#define RGBLED_NUM 1 // Number of LEDs in your strip + +#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_INPUT B1 // usually ROW +#define QMK_LED B6 \ No newline at end of file diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c new file mode 100644 index 00000000..3ea8609b --- /dev/null +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +// These are all aliases for the function layers. +#define _L0 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_L0] = 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(_L1), \ + KC_LCTL, KC_LGUI, KC_LALT, TG(_L3), KC_SPC, KC_SPC, MO(_L2), KC_RALT, KC_APP, KC_RCTRL), \ + +[_L2] = 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, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ + +[_L1] = 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, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ + +[_L3] = KEYMAP_ANSI( + _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_0, KC_DOT, _______, _______, _______, RESET), \ +}; diff --git a/keyboards/atom47/keymaps/LEdiodes/rules.mk b/keyboards/atom47/keymaps/LEdiodes/rules.mk new file mode 100644 index 00000000..d446d3a6 --- /dev/null +++ b/keyboards/atom47/keymaps/LEdiodes/rules.mk @@ -0,0 +1,65 @@ +# 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/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c new file mode 100644 index 00000000..cd8e622f --- /dev/null +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _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), +}; \ No newline at end of file diff --git a/keyboards/atom47/keymaps/default/readme.md b/keyboards/atom47/keymaps/default/readme.md new file mode 100644 index 00000000..02422eb9 --- /dev/null +++ b/keyboards/atom47/keymaps/default/readme.md @@ -0,0 +1,10 @@ +To be updated... + + +// This layer is just a blank template to be copied for easy layer creation. please don not edit it. + + [_LX] = KEYMAP_ANSI( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md new file mode 100644 index 00000000..fec7843a --- /dev/null +++ b/keyboards/atom47/readme.md @@ -0,0 +1,28 @@ +# ATOM47 + +![ATOM47](https://i.imgur.com/rjrFTKT.png) + +## Support +Keyboard Maintainer: [Matthew Kerfoot(https://github.com/mkerfoot) +Hardware Supported: ATOM47 +Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) + + +## Features +QMK Firmware +6 Underglow RGB leds +In-switch leds +Through-hole micro usb connector (less likely to break off!) +South facing leds for the QMX/Zealencio users +Multiple layouts +Easily reachable reset button under the spacebar +CapsLock indicator + +## Build +To build the default keymap, simply run `make atom47:default`. + +For an alternative, heavily modified layout you would just need to run `make atom47:LEdiodes`. + +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. + +![ATOM47](https://i.imgur.com/WebeUOF.png) diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk new file mode 100644 index 00000000..d446d3a6 --- /dev/null +++ b/keyboards/atom47/rules.mk @@ -0,0 +1,65 @@ +# 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/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 2e78e64b..43ec0b23 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -359,7 +359,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 457db372..1617f1ba 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -14,6 +14,19 @@ static bool mouse_lock = false; +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + + // Cloud9 macros + CLOUD9_TAB_LEFT, + CLOUD9_TAB_RIGHT, + CLOUD9_TAB_CLOSE, + CLOUD9_GOTO_SYMBOL, + CLOUD9_GOTO_LINE, + CLOUD9_NAVIGATE, + +}; + // building instructions: // make atreus:dvorak_42_key @@ -30,10 +43,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [KEYNAV] = { - {KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, }, - {MEH(KC_F11), MEH(KC_F12), 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), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), 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), } + {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] = { @@ -64,6 +77,40 @@ const uint16_t PROGMEM fn_actions[] = { }; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + switch (keycode) { + // Cloud9 macros + case CLOUD9_TAB_LEFT: + SEND_STRING(SS_LCTRL("[")); + return true; + break; + case CLOUD9_TAB_RIGHT: + SEND_STRING(SS_LCTRL("]")); + return true; + break; + case CLOUD9_TAB_CLOSE: + SEND_STRING(SS_LALT("w")); + return true; + break; + case CLOUD9_GOTO_SYMBOL: + SEND_STRING(SS_LSFT(SS_LCTRL("e"))); + return true; + break; + case CLOUD9_GOTO_LINE: + SEND_STRING(SS_LCTRL("g")); + return true; + break; + case CLOUD9_NAVIGATE: + SEND_STRING(SS_LCTRL("e")); + return true; + break; + } + } + + return true; +} + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 33d0a60c..2160706f 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -16,7 +16,12 @@ along with this program. If not, see . */ #include "bfake.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE #include "rgblight.h" +#endif #include @@ -24,6 +29,7 @@ along with this program. If not, see . #include "i2c.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -38,8 +44,23 @@ void rgblight_set(void) { i2c_init(); i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); } +#endif __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); +} + +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } } diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index c0e0face..de8c4b5d 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -37,7 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 - +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 9165de42..6577ea19 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -37,7 +37,7 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 @@ -47,4 +47,4 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c # programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex \ No newline at end of file +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/chibios_test/config.h b/keyboards/chibios_test/config.h index c32a77b3..89eb1f33 100644 --- a/keyboards/chibios_test/config.h +++ b/keyboards/chibios_test/config.h @@ -24,11 +24,9 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 /* in python2: list(u"whatever".encode('utf-16-le')) */ /* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER "QMK" -#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' -#define PRODUCT "ChibiOS QMK test" -#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', 't', '\x00', 'e', '\x00', 's', '\x00', 't', '\x00' -#define DESCRIPTION "QMK keyboard firmware test for ChibiOS" +#define MANUFACTURER QMK +#define PRODUCT ChibiOS QMK test +#define DESCRIPTION QMK keyboard firmware test for ChibiOS /* key matrix size */ #define MATRIX_ROWS 1 diff --git a/keyboards/chibios_test/stm32_f072_onekey/halconf.h b/keyboards/chibios_test/stm32_f072_onekey/halconf.h index 1a450d63..76257255 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/halconf.h +++ b/keyboards/chibios_test/stm32_f072_onekey/halconf.h @@ -139,7 +139,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE +#define HAL_USE_SERIAL_USB TRUE #endif /** @@ -313,7 +313,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /*===========================================================================*/ diff --git a/keyboards/chibios_test/stm32_f103_onekey/halconf.h b/keyboards/chibios_test/stm32_f103_onekey/halconf.h index 1a450d63..76257255 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/halconf.h +++ b/keyboards/chibios_test/stm32_f103_onekey/halconf.h @@ -139,7 +139,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE +#define HAL_USE_SERIAL_USB TRUE #endif /** @@ -313,7 +313,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /*===========================================================================*/ diff --git a/keyboards/chibios_test/teensy_lc_onekey/halconf.h b/keyboards/chibios_test/teensy_lc_onekey/halconf.h index 0436408b..5e1f6a8a 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/halconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/halconf.h @@ -139,7 +139,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE +#define HAL_USE_SERIAL_USB TRUE #endif /** @@ -170,6 +170,172 @@ #define HAL_USE_WDG FALSE #endif +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + /*===========================================================================*/ /* USB driver related settings. */ /*===========================================================================*/ @@ -185,3 +351,4 @@ #endif /* _HALCONF_H_ */ /** @} */ + diff --git a/keyboards/chimera_ergo/chimera_ergo.c b/keyboards/chimera_ergo/chimera_ergo.c new file mode 100644 index 00000000..29470f90 --- /dev/null +++ b/keyboards/chimera_ergo/chimera_ergo.c @@ -0,0 +1,31 @@ +#include "chimera_ergo.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void led_init(void) { + DDRD |= (1<<1); + PORTD |= (1<<1); + DDRF |= (1<<4) | (1<<5); + PORTF |= (1<<4) | (1<<5); +} + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + +} diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h new file mode 100644 index 00000000..36525ac0 --- /dev/null +++ b/keyboards/chimera_ergo/chimera_ergo.h @@ -0,0 +1,82 @@ +#ifndef CHIMERA_ERGO_H +#define CHIMERA_ERGO_H + +#include "quantum.h" +#include "matrix.h" +#include "backlight.h" +#include + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +/* +#define LED_B 5 +#define LED_R 6 +#define LED_G 7 + +#define all_leds_off PORTF &= ~(1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef 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 unknown +#define PRODUCT Chimera Ergo +#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ergo + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define PREVENT_STUCK_MODIFIERS + +/* 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 + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#endif diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c new file mode 100644 index 00000000..0479fa41 --- /dev/null +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -0,0 +1,206 @@ +// 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 "chimera_ergo.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum chimera_ergo_layers +{ + _QWERTY, + _CAPS, + _NUMPAD, + _SYMBOLS, + _MACROS, + _NAV +}; + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) +#define KC_SPFN LT(_NAV,KC_EQL) +#define KC_SCTL MT(MOD_LCTL, KC_LBRC) +#define KC_SCTR MT(MOD_LCTL, KC_RBRC) +#define KC_SPLT MT(MOD_LALT, KC_MINS) +#define KC_SPRT MT(MOD_LALT, KC_1) +#define KC_GBRC MT(MOD_RGUI, KC_RBRC) +#define KC_GQOT MT(MOD_LGUI, KC_QUOT) +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_INCL M(0) +#define KC_PULL M(1) +#define KC_PUSH M(2) +#define KC_SCAP M(3) +#define KC_SCOF M(4) +#define KC_CAD LALT(LCTL(KC_DEL)) + +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + LBRC, 1 ,SCTL,SPLT,SPFN, 5 , 6 ,GBRC,SPRT,SCTR, 0 ,RBRC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + MESC, Q , W , E , R , T , Y , U , I , O , P ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , A , S , D , F , G , H , J , K , L ,SCLN,ENT , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + NMPD,BSPC, SPC ,SYMB + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_CAPS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,UNDS, , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , ,COLN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCOF, , , , , , , , , , ,SCOF, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_NUMPAD] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , ,MINS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,COLN, , , , , 7 , 8 , 9 ,ASTR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,DOT , , , , , 4 , 5 , 6 ,PLUS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , 1 , 2 , 3 ,SLSH, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , 0 + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_SYMBOLS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F7 , F8 , F9 ,F10 ,F11 ,F12 , GRV ,PLUS,MINS,LBRC,RBRC, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + PIPE, , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_MACROS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , ,INCL, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,CAD , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , , ,PULL,PUSH, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_NAV] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,PGUP, UP ,PGDN,PSCR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,DEL , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + layer_on(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + layer_off(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _CAPS: + set_led_white; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_cyan; + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ergo/matrix.c b/keyboards/chimera_ergo/matrix.c new file mode 100644 index 00000000..21d46ef9 --- /dev/null +++ b/keyboards/chimera_ergo/matrix.c @@ -0,0 +1,164 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 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 +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#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) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +__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; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[14] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 14; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 6; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1 + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +/* +#define LED_B 5 +#define LED_R 6 +#define LED_G 7 + +#define all_leds_off PORTF &= ~(1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef 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 unknown +#define PRODUCT Chimera Lets Split +#define DESCRIPTION q.m.k. keyboard firmware for Chimera Lets Split + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define PREVENT_STUCK_MODIFIERS + +/* 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 + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#endif diff --git a/keyboards/chimera_ls/keymaps/default/keymap.c b/keyboards/chimera_ls/keymaps/default/keymap.c new file mode 100644 index 00000000..493b8eee --- /dev/null +++ b/keyboards/chimera_ls/keymaps/default/keymap.c @@ -0,0 +1,191 @@ +// 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 "chimera_ls.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum chimera_lets_split_layers +{ + _QWERTY, + _CAPS, + _NUMPAD, + _SYMBOLS, + _MACROS, + _NAV +}; + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) +#define KC_SPFN LT(_NAV,KC_EQL) +#define KC_SCTL MT(MOD_LCTL, KC_BSLS) +#define KC_SCTR MT(MOD_LCTL, KC_RBRC) +#define KC_SPLT MT(MOD_LALT, KC_MINS) +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_INCL M(0) +#define KC_PULL M(1) +#define KC_PUSH M(2) +#define KC_SCAP M(3) +#define KC_SCOF M(4) +#define KC_CAD LALT(LCTL(KC_DEL)) + +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + MESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , A , S , D , F , G , H , J , K , L ,SCLN, ENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCTL,SPFN,SPLT,AMPR,NMPD,SPC , SPC ,SYMB,ASTR,EXLM,LBRC,SCTR + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_CAPS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , ,COLN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,UNDS, , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + + [_NUMPAD] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , 7 , 8 , 9 ,MINS,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , 4 , 5 , 6 ,PLUS, ENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, , , , , , , 1 , 2 , 3 ,ASTR, EQL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , ,BSPC, SPC , 0 , 0 , DOT,SLSH, + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_SYMBOLS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F7 , F8 , F9 , F10, F11, F12, GRV ,PLUS,MINS,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , NO ,BSPC, SPC , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_NAV] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , DEL,BSPC, ,HOME, UP , END, INS,PSCR, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,LSFT,LCTL, ENT, ,LEFT,DOWN,RGHT, DEL, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,PGUP,PGDN, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , ,DEL , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_MACROS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , ,INCL, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,CAD , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , , ,PULL,PUSH, ,SCAP, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + layer_on(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + layer_off(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _CAPS: + set_led_white; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_cyan; + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ls/matrix.c b/keyboards/chimera_ls/matrix.c new file mode 100644 index 00000000..665d0d35 --- /dev/null +++ b/keyboards/chimera_ls/matrix.c @@ -0,0 +1,168 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 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 +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#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) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#elif (MATRIX_COLS <= 64) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse64(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop64(matrix[i]) +# define ROW_SHIFTER ((uint64_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +__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; +} + +void matrix_init(void) { + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[11] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 11; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1. /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; -__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(); diff --git a/keyboards/chocopad/README.md b/keyboards/chocopad/README.md new file mode 100644 index 00000000..ad0f6b35 --- /dev/null +++ b/keyboards/chocopad/README.md @@ -0,0 +1,14 @@ +Chocopad +======== + +A 4x4 macropad keyboard using Kailh PG1350 Lower Profile Choc switches. + +Keyboard Maintainer: Keebio +Hardware Supported: Chocopad PCB, Arduino Pro Micro +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make chocopad: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/chocopad/chocopad.c b/keyboards/chocopad/chocopad.c new file mode 100644 index 00000000..f54753af --- /dev/null +++ b/keyboards/chocopad/chocopad.c @@ -0,0 +1 @@ +#include "chocopad.h" diff --git a/keyboards/chocopad/chocopad.h b/keyboards/chocopad/chocopad.h new file mode 100644 index 00000000..329e2d56 --- /dev/null +++ b/keyboards/chocopad/chocopad.h @@ -0,0 +1,32 @@ +#ifndef CHOCOPAD_H +#define CHOCOPAD_H + +#include "quantum.h" + +#define KEYMAP( \ + A1, A2, A3, A4, \ + B1, B2, B3, B4, \ + C1, C2, C3, C4, \ + D1, D2, D3, D4 \ +) { \ + { A1, A2, A3, A4 }, \ + { B1, B2, B3, B4 }, \ + { C1, C2, C3, C4 }, \ + { D1, D2, D3, D4 } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + A1, A2, A3, A4, \ + B1, B2, B3, B4, \ + C1, C2, C3, C4, \ + D1, D2, D3, D4 \ +) \ + KEYMAP( \ + KC_##A1, KC_##A2, KC_##A3, KC_##A4, \ + KC_##B1, KC_##B2, KC_##B3, KC_##B4, \ + KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ + KC_##D1, KC_##D2, KC_##D3, KC_##D4 \ + ) + +#endif diff --git a/keyboards/chocopad/config.h b/keyboards/chocopad/config.h new file mode 100644 index 00000000..bf861ccd --- /dev/null +++ b/keyboards/chocopad/config.h @@ -0,0 +1,59 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1144 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Chocopad +#define DESCRIPTION 4x4 macropad using Kailh Choc low-profile switches + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D7, E6, B3, B2 } +#define MATRIX_COL_PINS { D2, D4, F6, F5 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 6 + +/* 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 + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 4 +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +#endif \ No newline at end of file diff --git a/keyboards/chocopad/keymaps/default/config.h b/keyboards/chocopad/keymaps/default/config.h new file mode 100644 index 00000000..7fa3bf32 --- /dev/null +++ b/keyboards/chocopad/keymaps/default/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/chocopad/keymaps/default/keymap.c new file mode 100644 index 00000000..c4536a1b --- /dev/null +++ b/keyboards/chocopad/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include "chocopad.h" + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_X1 MO(_FN1) +#define KC_X2 MO(_FN2) +#define KC_RST RESET +#define KC_BSTP BL_STEP +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KC_KEYMAP( + //,----+----+----+----. + PGUP,HOME, UP ,END , + //|----+----+----+----| + PGDN,LEFT,DOWN,RGHT, + //|----+----+----+----| + X2 ,VOLU,MPLY,MPRV, + //|----+----+----+----| + X1 ,VOLD,MUTE,MNXT + //`----+----+----+----' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----. + ESC , P7 , P8 , P9 , + //|----+----+----+----| + TAB , P4 , P5 , P6 , + //|----+----+----+----| + ENT , P1 , P2 , P3 , + //|----+----+----+----| + , P0 , P0 ,DOT + //`----+----+----+----' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----. + RTOG,RHUI,RSAI,RVAI, + //|----+----+----+----| + RMOD,RHUD,RSAD,RVAD, + //|----+----+----+----| + , , ,RST , + //|----+----+----+----| + BSTP, , , + //`----+----+----+----' + ) + +}; diff --git a/keyboards/lets_split/keymaps/hexwire/rules.mk b/keyboards/chocopad/keymaps/default/rules.mk similarity index 100% rename from keyboards/lets_split/keymaps/hexwire/rules.mk rename to keyboards/chocopad/keymaps/default/rules.mk diff --git a/keyboards/chocopad/rules.mk b/keyboards/chocopad/rules.mk new file mode 100644 index 00000000..cd9222a1 --- /dev/null +++ b/keyboards/chocopad/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 = 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 +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 diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c index 897f20a8..4331155d 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c @@ -62,13 +62,15 @@ const PALConfig pal_default_config = { }; #endif +void enter_bootloader_mode_if_requested(void); + /** * @brief Early initialization code. * @details This initialization must be performed just after stack setup * and before any other initialization. */ void __early_init(void) { - + enter_bootloader_mode_if_requested(); stm32_clock_init(); } diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h index 7405c0ea..e09112eb 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h @@ -1164,14 +1164,14 @@ /* * USB bus activation macro, required by the USB driver. */ -// #define usb_lld_connect_bus(usbp) +// #define usb_lld_connect_bus(usbp) #define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) // #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) /* * USB bus de-activation macro, required by the USB driver. */ // #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) #if !defined(_FROM_ASM_) diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index 333698a0..5c5a8629 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -22,11 +22,9 @@ #define VENDOR_ID 0xC1ED #define PRODUCT_ID 0x2350 #define DEVICE_VER 0x0001 -#define MANUFACTURER "Clueboard" -#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00' -#define PRODUCT "Clueboard60" -#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', ' ', '\x00', '6', '\x00', '0', '\x00', '%', '\x00' -#define DESCRIPTION "Clueboard 60%" +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard 60% +#define DESCRIPTION Clueboard 60% /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/clueboard/60/halconf.h b/keyboards/clueboard/60/halconf.h index 254470cb..8fe8e0c6 100644 --- a/keyboards/clueboard/60/halconf.h +++ b/keyboards/clueboard/60/halconf.h @@ -320,7 +320,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** diff --git a/keyboards/clueboard/60/keymaps/yanfali/keymap.c b/keyboards/clueboard/60/keymaps/yanfali/keymap.c new file mode 100644 index 00000000..eec17720 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/yanfali/keymap.c @@ -0,0 +1,134 @@ +#include "60.h" + +#define _______ KC_TRNS + +enum keyboard_layers { + _BL, + _FL, + _CL, + _YF +}; + +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |-----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------------| + * |MT(CTL, ESC)| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------------' + * |Ctrl |Alt|Gui | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------------' + */ + [_BL] = 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_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, \ + MT(MOD_LCTL, 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_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, MO(_YF), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + [_FL] = 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, _______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(_YF), \ + _______,_______,_______, _______, _______, _______, MO(_FL), _______), + [_CL] = KEYMAP( + BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(_YF), \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______), + [_YF] = KEYMAP( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,KC_UP ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(_YF), \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + } + return true; +} diff --git a/keyboards/clueboard/60/keymaps/yanfali/readme.md b/keyboards/clueboard/60/keymaps/yanfali/readme.md new file mode 100644 index 00000000..8b870517 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/yanfali/readme.md @@ -0,0 +1,14 @@ +# /u/yanfali keymap for clueboard 60% + +Almost the same as default but differs in the following ways + + 1. `Caps Lock` -> `MT(KC_LCTL, KC_ESC)`. + I'm a heavy vim user and I prefer escape to be closer than default. I also move `Control` to this key if you hold it. + 1. Switch Alt and GUI. + I spend most of my time on OSX, so I reverse Alt and GUI to be + more comfortable on OSX. + 1. Added a custom layer. + I use this to map the cursor keys to WASD, the familiar directional + gaming keys. As I use a split right shift, this naturally leads + to the left hand being used for navigation. This is also the + best place to add custom mappings, macros and combo keys. diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index 93e6019a..3664b6d2 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -28,14 +28,16 @@ MCU = cortex-m4 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 ARMV = 7 +USE_FPU = yes + # Vector table for application # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = +OPT_DEFS = # Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave # Build Options # comment out to disable the options. diff --git a/keyboards/clueboard/66/keymaps/66_ansi/keymap.c b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c new file mode 100644 index 00000000..cfa641dc --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c @@ -0,0 +1,36 @@ +#include "66.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. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT_66_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_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + 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), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT_66_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_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, + _______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT_66_ansi( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, + _______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/66_ansi/readme.md b/keyboards/clueboard/66/keymaps/66_ansi/readme.md new file mode 100644 index 00000000..25b5d7eb --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_ansi/readme.md @@ -0,0 +1,11 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Basic Clueboard 66% Hotswap Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. + +This uses `LAYOUT_66_ansi`, which is compatable with the `66_ansi` community +layout. diff --git a/keyboards/clueboard/66/keymaps/66_iso/keymap.c b/keyboards/clueboard/66/keymaps/66_iso/keymap.c new file mode 100644 index 00000000..577cf045 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_iso/keymap.c @@ -0,0 +1,36 @@ +#include "66.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. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT_66_iso( + 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_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_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_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_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT_66_iso( + 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_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, + _______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT_66_iso( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, + _______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/66_iso/readme.md b/keyboards/clueboard/66/keymaps/66_iso/readme.md new file mode 100644 index 00000000..019131ae --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_iso/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c index d23b4cb8..73543cbf 100644 --- a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c +++ b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_INS, KC_DEL, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, \ +[_BL] = 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_INS, KC_DEL, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, KC_LCTL, KC_LGUI, MO(_FL), KC_LALT, KC_BSPC,KC_SPC, KC_RALT, KC_APP, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_END, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, _______, KC_MYCM, MO(_FL), _______, _______,_______, _______, KC_CALC, MO(_FL), _______, KC_MPRV, KC_MSTP, KC_MNXT), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, \ +[_CL] = LAYOUT( + KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, + _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), }; diff --git a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c index 4a5fa72d..c48c5073 100644 --- a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c index 4759823e..3666bd0e 100644 --- a/keyboards/clueboard/66/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/66/keymaps/colemak/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_NUHS, KC_ENT, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_NUHS, KC_ENT, + 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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_CAPS, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, \ - KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_CAPS, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, + KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c index 86916539..555ff97f 100644 --- a/keyboards/clueboard/66/keymaps/default/keymap.c +++ b/keyboards/clueboard/66/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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. #define _BL 0 @@ -12,28 +9,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + 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_RO, KC_RSFT, KC_UP, KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c index 9b03ae3a..118efe0a 100644 --- a/keyboards/clueboard/66/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/66/keymaps/jokrik/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_PAUS, \ - 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = 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_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_PAUS, + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c index 8f54a7be..29d96842 100644 --- a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + 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_RO, KC_RSFT, KC_UP, KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RGUI,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index bb3ca962..7f91224c 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,7 +1,6 @@ #include "66.h" // Helpful defines -#define _______ KC_TRNS #define xxxxxxx KC_NO // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -49,60 +48,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ - [_BL] = 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_BSPC, KC_INS, \ - 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_BSLS, KC_DEL, \ - ESC_FUN, 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_UP, \ + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, + 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_BSLS, KC_DEL, + ESC_FUN, 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_UP, KC_LCTL, KC_LGUI, KC_LALT,_______, L_MOUSE, L_MOUSE, _______, KC_RALT, KC_RCTL, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function layer */ - [_FL] = KEYMAP( - 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, _______, _______, BL_STEP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ - KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, \ + [_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, _______, _______, BL_STEP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO_FUNC, KC_HOME, KC_PGDN, KC_END), /* Keymap _ME: Media layer */ - [_ME] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, \ + [_ME] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT), /* Keymap _CL: Control layer */ - [_CL] = KEYMAP( - _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + [_CL] = LAYOUT( + _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), /* Keymap _ML: Mouse layer */ - [_ML] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, \ + [_ML] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, L_MOUSE, L_MOUSE, _______, KC_BTN1, KC_BTN3, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R), #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) /* Keymap _MI: MIDI layer (Advanced)*/ - [_MI] = KEYMAP( - TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, \ - MI_MOD, 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, MI_G_1, xxxxxxx, \ - MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, \ + [_MI] = LAYOUT( + TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, + xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, + MI_MOD, 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, MI_G_1, xxxxxxx, + MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), #elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) /* Keymap _MI: MIDI layer (Basic)*/ - [_MI] = KEYMAP( - TO_BASE, 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, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + [_MI] = LAYOUT( + TO_BASE, 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, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), #endif }; diff --git a/keyboards/clueboard/66/keymaps/manofinterests/keymap.c b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c new file mode 100644 index 00000000..08815dc5 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c @@ -0,0 +1,36 @@ +#include "66.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. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, RGB_VAI, + 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, RGB_VAD, + 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_RO, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/manofinterests/readme.md b/keyboards/clueboard/66/keymaps/manofinterests/readme.md new file mode 100644 index 00000000..019131ae --- /dev/null +++ b/keyboards/clueboard/66/keymaps/manofinterests/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c index bf577d1a..1b117dc6 100644 --- a/keyboards/clueboard/66/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/66/keymaps/maximised/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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, \ - MO(_FL), 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(_FL), KC_UP, \ +[_BL] = 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_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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, + MO(_FL), 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(_FL), KC_UP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Reset/Underlight layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c index e3422a5a..2169312d 100644 --- a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -15,37 +12,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), /* Keymap _ML: Mouse layer */ - [_ML] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ + [_ML] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), }; diff --git a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c index 7697ff29..abf98615 100644 --- a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c +++ b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c @@ -1,7 +1,4 @@ -#include "clueboard.h" - -// Helpful defines -#define _______ KC_TRNS +#include "66.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,29 +10,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_HOME, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ - 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_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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + 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_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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_PGUP, \ - _______, RGB_TOG, KC_MPRV, KC_MPLY, KC_MNXT,_______,_______,KC_HOME,KC_UP, KC_END, _______, _______, _______, KC_PSCR, KC_PGDN, \ - _______, RGB_VAI, KC_MUTE, KC_VOLD, KC_VOLU,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT, _______, _______, _______, _______, \ - _______, RGB_VAD, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_PGUP, + _______, RGB_TOG, KC_MPRV, KC_MPLY, KC_MNXT,_______,_______,KC_HOME,KC_UP, KC_END, _______, _______, _______, KC_PSCR, KC_PGDN, + _______, RGB_VAI, KC_MUTE, KC_VOLD, KC_VOLU,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT, _______, _______, _______, _______, + _______, RGB_VAD, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI) }; /* Keymap _CL: Control layer -[_CL] = KEYMAP( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), };*/ diff --git a/keyboards/clueboard/66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c index 1c9f21d4..32507e91 100644 --- a/keyboards/clueboard/66/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/66/keymaps/serubin/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -15,38 +12,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - F(1), 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_RO, KC_RSFT, KC_UP, \ +[_BL] = 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_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + F(1), 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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = 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_HOME, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = 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_HOME, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END), /* Keymap _FL: Function Layer */ -[_ME] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \ +[_ME] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c index cf6223ef..3736db89 100644 --- a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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, + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ +[_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, S(KC_GRV), KC_DEL, BL_STEP, + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/skully/keymap.c b/keyboards/clueboard/66/keymaps/skully/keymap.c index 8ec2bed0..7f34a8cb 100644 --- a/keyboards/clueboard/66/keymaps/skully/keymap.c +++ b/keyboards/clueboard/66/keymaps/skully/keymap.c @@ -1,7 +1,8 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS +enum custom_keycodes { + M_SHRUG = SAFE_RANGE +}; // 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,28 +15,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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, + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ +[_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, S(KC_GRV), KC_DEL, BL_STEP, + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + M_SHRUG, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case M_SHRUG: + SEND_STRING("/shrug"SS_TAP(X_ENTER)); + return false; break; + } + } + return true; +}; diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index 095623cc..42dcfeca 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -17,7 +17,6 @@ enum planck_keycodes { }; // Helpful defines -#define _______ KC_TRNS #define XXXXXXX KC_NO // Custom macros @@ -40,11 +39,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_QWERTY] = 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_GRV, KC_PGUP, \ - 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_PGDN, \ - CTL_ESC, 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, SFT_ENT, MO(_FL), KC_UP, \ +[_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, + 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_PGDN, + CTL_ESC, 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, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _COLEMAK: Base Layer @@ -60,11 +59,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_COLEMAK] = 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_GRV, KC_PGUP, \ - 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_PGDN, \ - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ +[_COLEMAK] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, + 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_PGDN, + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _DVORAK: Base Layer @@ -80,29 +79,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \ - 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_PGDN, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \ +[_DVORAK] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, + 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_PGDN, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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, _______, _______, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ +[_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, _______, _______, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c index 4eeb719f..f7c6d4c1 100644 --- a/keyboards/clueboard/66/keymaps/tetris/keymap.c +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -3,7 +3,6 @@ // Helpful defines #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define _______ KC_TRNS // 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. @@ -16,29 +15,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c index 91f5250c..927e8485 100644 --- a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - 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_INS, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c index 83c9a671..24323501 100644 --- a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // 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 @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = 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_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_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_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_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_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index d7093f0a..3f08808a 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| * `----------------------------------------------------------------------------------' */ -[_BL] = KEYMAP( +[_BL] = LAYOUT( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | _FL|HOME|PGDN| END| * `----------------------------------------------------------------------------------' */ -[_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, KC_TRNS, KC_DEL, BL_STEP, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| * `----------------------------------------------------------------------------------' */ -[_RS] = KEYMAP( +[_RS] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/keyboards/clueboard/66/readme.md b/keyboards/clueboard/66/readme.md index ad14ae9d..42a261e2 100644 --- a/keyboards/clueboard/66/readme.md +++ b/keyboards/clueboard/66/readme.md @@ -6,13 +6,13 @@ A fully customizable 66% keyboard. * Keyboard Maintainer: [Zach White](https://github.com/skullydazed) * Hardware Supported: Clueboard 66% PCB - * rev1 (1.0) - * rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) - * rev3 (2.7) + * rev1 (PCB Version 1.0) + * rev2 (PCB Versions 2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) + * rev3 (PCB Versions 2.7, 2.8) * Hardware Availability: [clueboard.co](https://clueboard.co/) Make example for this keyboard (after setting up your build environment): - make clueboard/66:default + make clueboard/66/rev3:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h index ca54df1e..58694fcb 100644 --- a/keyboards/clueboard/66/rev1/rev1.h +++ b/keyboards/clueboard/66/rev1/rev1.h @@ -30,7 +30,7 @@ // 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, 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, k2C, k2D, \ @@ -43,5 +43,34 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E, k4F } \ } +#define KEYMAP LAYOUT + +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, 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, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO, k1F }, \ + { 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, k3E }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ +} + +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + 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, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, KC_NO, k1F }, \ + { 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, KC_NO, k3D, k3E }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ +} #endif diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index 9a1b7271..5eedcd23 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -30,7 +30,7 @@ // 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, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \ k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \ @@ -48,5 +48,48 @@ { k80, k81, k82, k83, k84, k85, k86, KC_NO }, \ { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ } +#define KEYMAP LAYOUT + +/* LAYOUT_66_ansi, standard 66 key ANSI layout + */ +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ +) { \ + { 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, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, KC_NO, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ +} + +/* LAYOUT_66_iso, standard 67 key ISO layout + */ +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \ + k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ +) { \ + { 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, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ + { k60, k61, k62, k63, k64, KC_NO, KC_NO, k67 }, \ + { k70, k71, k72, k73, k74, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ +} #endif diff --git a/keyboards/clueboard/66/rev3/rev3.c b/keyboards/clueboard/66/rev3/rev3.c index 8f703d2c..713d998e 100644 --- a/keyboards/clueboard/66/rev3/rev3.c +++ b/keyboards/clueboard/66/rev3/rev3.c @@ -4,10 +4,10 @@ #include "print.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(); + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); // JTAG disable for PORT F. write JTD bit twice within four cycles. MCUCR |= (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CLUEBOARD_66_CONFIG_H +#define CLUEBOARD_66_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard 66% HotSwap +#define DESCRIPTION QMK keyboard firmware for Clueboard 66% + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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)) \ +) + +/* + * 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/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h new file mode 100644 index 00000000..d8163f53 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -0,0 +1,53 @@ +#ifndef CLUEBOARD_66_REV3_CONFIG_H +#define CLUEBOARD_66_REV3_CONFIG_H + +#include "config_common.h" + +#define PRODUCT_ID 0x2390 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +* row: 0 1 2 3 4 5 6 7 8 9 +* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 +*/ + +#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } +/* Column pin configuration + * col: 0 1 2 3 4 5 6 7 + * pin: F0 F1 F4 F5 F6 F7 E6 B1 + */ +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } +#define UNUSED_PINS + +/* Speaker configuration + */ +//#define SPEAKER_PIN B7 // FIXME: find the correct name for this define + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 26 // Number of LEDs +#define RGBLIGHT_HUE_STEP 32 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up + +#endif diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c new file mode 100644 index 00000000..01f74bc5 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -0,0 +1,63 @@ +#include "gen1.h" +#include +#include "backlight.h" +#include "print.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(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* 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 diff --git a/keyboards/contra/contra.c b/keyboards/contra/contra.c new file mode 100755 index 00000000..3ef66a9c --- /dev/null +++ b/keyboards/contra/contra.c @@ -0,0 +1 @@ +#include "contra.h" diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h new file mode 100755 index 00000000..873429b5 --- /dev/null +++ b/keyboards/contra/contra.h @@ -0,0 +1,46 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT_grid( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} + +#define LAYOUT_mit( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ +} + +#define KC_LAYOUT_grid( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) \ + LAYOUT_grid( \ + KC_##K000, KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \ + KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, KC_##K111, \ + KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208, KC_##K209, KC_##K210, KC_##K211, \ + KC_##K300, KC_##K301, KC_##K302, KC_##K303, KC_##K304, KC_##K305, KC_##K306, KC_##K307, KC_##K308, KC_##K309, KC_##K310, KC_##K311 \ + ) +#define KEYMAP LAYOUT_grid +#define LAYOUT_ortho_4x12 LAYOUT_grid +#define KC_LAYOUT_ortho_4x12 KC_LAYOUT_grid + +#endif diff --git a/keyboards/contra/keymaps/dana/config.h b/keyboards/contra/keymaps/dana/config.h new file mode 100644 index 00000000..2846b579 --- /dev/null +++ b/keyboards/contra/keymaps/dana/config.h @@ -0,0 +1,30 @@ +/* +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 CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + + +#undef TAPPING_TERM +#define TAPPING_TERM 190 + +#define MUSIC_MASK (keycode != KC_NO) +#define MIDI_ADVANCED + +#endif diff --git a/keyboards/contra/keymaps/dana/keymap.c b/keyboards/contra/keymaps/dana/keymap.c new file mode 100644 index 00000000..52949192 --- /dev/null +++ b/keyboards/contra/keymaps/dana/keymap.c @@ -0,0 +1,37 @@ +// 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. + +#include "contra.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 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 | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | Cmd |Lower | Space |Raise | Enter| Cmd | Alt |Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + { MI_C_4, MI_Cs_4, MI_D_4, MI_Ds_4, MI_E_4, MI_F_4, MI_Fs_4, MI_G_4, MI_Gs_4, MI_A_4, MI_As_4, MI_B_4 }, + { MI_C_3, MI_Cs_3, MI_D_3, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, MI_Gs_3, MI_A_3, MI_As_3, MI_B_3 }, + { MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2, MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, MI_A_2, MI_As_2, MI_B_2 }, + { MI_C_1, MI_Cs_1, MI_D_1, MI_Ds_1, MI_E_1, MI_F_1, MI_Fs_1, MI_G_1, MI_Gs_1, MI_A_1, MI_As_1, MI_B_1 } +} +}; + + + + diff --git a/keyboards/contra/keymaps/dana/readme.md b/keyboards/contra/keymaps/dana/readme.md new file mode 100644 index 00000000..75b4582d --- /dev/null +++ b/keyboards/contra/keymaps/dana/readme.md @@ -0,0 +1,6 @@ +# Dana musical MIDI keyboard layout + +Has the contra mapped as a MIDI keyboard, where each row is an octave. + +The keyboard has only MIDI, nothing else! + diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk new file mode 100644 index 00000000..1198f378 --- /dev/null +++ b/keyboards/contra/keymaps/dana/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 = 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 - 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 = yes # 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 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/contra/keymaps/default/config.h b/keyboards/contra/keymaps/default/config.h new file mode 100644 index 00000000..a1635f2b --- /dev/null +++ b/keyboards/contra/keymaps/default/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(PLANCK_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 \ No newline at end of file diff --git a/keyboards/contra/keymaps/default/keymap.c b/keyboards/contra/keymaps/default/keymap.c new file mode 100644 index 00000000..176b2508 --- /dev/null +++ b/keyboards/contra/keymaps/default/keymap.c @@ -0,0 +1,264 @@ +/* Copyright 2015-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 "contra.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | 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 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + 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); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} diff --git a/keyboards/contra/keymaps/default/readme.md b/keyboards/contra/keymaps/default/readme.md new file mode 100644 index 00000000..80aba109 --- /dev/null +++ b/keyboards/contra/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Contra Layout + diff --git a/keyboards/contra/readme.md b/keyboards/contra/readme.md new file mode 100644 index 00000000..a8322850 --- /dev/null +++ b/keyboards/contra/readme.md @@ -0,0 +1,16 @@ +CONTRA +=== + +![CONTRA](https://cartel.ltd/wp-content/uploads/2018/01/img_3209.jpg) + +A 40% keyboard by + +Keyboard Maintainer: The QMK Community +Hardware Supported: CONTRA +Hardware Availability: [CARTEL](https://cartel.ltd/projects/contra/) + +Make example for this keyboard (after setting up your build environment): + + make contra:dana + +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/contra/rules.mk b/keyboards/contra/rules.mk new file mode 100755 index 00000000..a926dfc0 --- /dev/null +++ b/keyboards/contra/rules.mk @@ -0,0 +1,61 @@ +# 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 +# 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 = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS_HAS_RGB = no diff --git a/keyboards/crawlpad/readme.md b/keyboards/crawlpad/readme.md index 98d04bfa..0bdc0f17 100644 --- a/keyboards/crawlpad/readme.md +++ b/keyboards/crawlpad/readme.md @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): 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. -For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com]. \ No newline at end of file +For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com). \ No newline at end of file diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h new file mode 100644 index 00000000..df009c95 --- /dev/null +++ b/keyboards/cu24/config.h @@ -0,0 +1,192 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar/CapsUnlocked +#define PRODUCT CU24 +#define DESCRIPTION A luxurious fully customisable numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { E6, F5, B4, B6, C6, C7 } +#define MATRIX_COL_PINS { F0, F1, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* Backlight */ +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* RGB Glow */ +#define RGB_DI_PIN F4 // The pin the LED strip is connected to +#define RGBLED_NUM 5 // Number of LEDs in your strip +#define RGBLIGHT_ANIMATIONS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* 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/cu24/cu24.c b/keyboards/cu24/cu24.c new file mode 100644 index 00000000..0c976f07 --- /dev/null +++ b/keyboards/cu24/cu24.c @@ -0,0 +1,16 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "cu24.h" diff --git a/keyboards/cu24/cu24.h b/keyboards/cu24/cu24.h new file mode 100644 index 00000000..e8e6b46e --- /dev/null +++ b/keyboards/cu24/cu24.h @@ -0,0 +1,42 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef CU24_H +#define CU24_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 KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ +} + +#endif diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c new file mode 100644 index 00000000..8e2f6563 --- /dev/null +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "cu24.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( /* Base */ + KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, \ + MO(1) , KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7 , KC_P8 , KC_P9 , KC_PPLS, \ + KC_P4 , KC_P5 , KC_P6 , KC_PPLS, \ + KC_P1 , KC_P2 , KC_P3 , KC_PENT, \ + KC_P0 , KC_P0 , KC_PDOT, KC_PENT +), + +[1] = KEYMAP( /* FN */ + RGB_TOG, RGB_MOD, BL_STEP, BL_BRTG, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, \ + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RESET , KC_TRNS +), +}; + +/* Use this function to add 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; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/cu24/keymaps/default/readme.md b/keyboards/cu24/keymaps/default/readme.md new file mode 100644 index 00000000..5528d6c0 --- /dev/null +++ b/keyboards/cu24/keymaps/default/readme.md @@ -0,0 +1,10 @@ +https://imgur.com/a/vpHFj + +![CU24 Layout Image](https://imgur.com/X1c1qeY) + +# Default CU24 Layout + +This is the default layout that comes flashed on every CU24. It is like a normal numpad, +with all the led customization on the Fn layer. + +See [All Layouts](https://imgur.com/trwO7dN) for all supported configurations! \ No newline at end of file diff --git a/keyboards/cu24/readme.md b/keyboards/cu24/readme.md new file mode 100644 index 00000000..4624c1aa --- /dev/null +++ b/keyboards/cu24/readme.md @@ -0,0 +1,15 @@ +# CU24 + +![CU24](https://geekhack.org/index.php?action=dlattach;topic=93289.0;attach=185492;image) + +A luxurious 24 key keypad with various layouts. Includes RGB underglow, backlight and an aluminium, brass and nylon case. + +Keyboard Maintainer: [Yiancar](https://github.com/yiancar) +Hardware Supported: PCB v1.0 (uses a 32u4) +Hardware Availability: [caps-unlocked.com](http://caps-unlocked.com/) + +Make example for this keyboard (after setting up your build environment): + + make CU24: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/cu24/rules.mk b/keyboards/cu24/rules.mk new file mode 100644 index 00000000..86f1a847 --- /dev/null +++ b/keyboards/cu24/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 + + +# 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 = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # RGB drivers diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h new file mode 100644 index 00000000..c21e1da0 --- /dev/null +++ b/keyboards/cu75/config.h @@ -0,0 +1,151 @@ +/* +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 CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6062 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LFKeyboards/CapsUnlocked +#define PRODUCT CU75 +#define DESCRIPTION A luxurious fully customisable 75% + +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 +#define MATRIX_ROW_PINS {F1, B7, B3, D2, D3, B2} +#define MATRIX_COL_PINS {F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, B1, B0, F0} +#define UNUSED_PINS {} + +#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile +#define RGBLED_NUM 24 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* 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 */ +#define BACKLIGHT_LEVELS 8 +#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255} + +/* 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 + +/* + * 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 + +#endif diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c new file mode 100644 index 00000000..6dc28984 --- /dev/null +++ b/keyboards/cu75/cu75.c @@ -0,0 +1,179 @@ +#include +#include +#include +#include "cu75.h" +#include "keymap.h" +#include "debug.h" +#include "../lfkeyboards/issi.h" +#include "../lfkeyboards/TWIlib.h" +#include "../lfkeyboards/lighting.h" + +#ifdef AUDIO_ENABLE +float test_sound[][2] = SONG(STARTUP_SOUND); +#include