diff --git a/.gitignore b/.gitignore index 39b26f8b7062..d879d7114b04 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,10 @@ util/Win_Check_Output.txt *.png *.jpg *.gif + +# Do not ignore MiniDox left/right hand eeprom files +!keyboards/minidox/*.eep + +# things travis sees +secrets.tar +id_rsa_* diff --git a/.travis.yml b/.travis.yml index 1707c0599164..e1cccf1e8d97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ addons: - binutils-arm-none-eabi - libnewlib-arm-none-eabi - diffutils + - dos2unix after_success: bash util/travis_compiled_push.sh notifications: diff --git a/Dockerfile b/Dockerfile index bc0285a447b1..dfde33b5cca0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ ENV keymap=default VOLUME /qmk WORKDIR /qmk -CMD make clean; make; +CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} diff --git a/Makefile b/Makefile index af83c4bf695a..82d1819d7df4 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ endif # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly override SILENT := false +QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null) +ifneq ($(QMK_VERSION),) +$(info QMK Firmware v$(QMK_VERSION)) +endif + ON_ERROR := error_occurred=1 BREAK_ON_ERRORS = no @@ -310,11 +315,21 @@ define PARSE_SUBPROJECT ifneq ($$(CURRENT_SP),allsp) # get a list of all keymaps KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.))) + LAYOUTS := + $$(eval -include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/rules.mk) + KEYBOARD_LAYOUTS := $$(LAYOUTS) ifneq ($$(CURRENT_SP),) # if the subproject is defined, then also look for keymaps inside the subproject folder SP_KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/keymaps/*/.))) KEYMAPS := $$(sort $$(KEYMAPS) $$(SP_KEYMAPS)) + # $$(eval -include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/rules.mk) + # KEYBOARD_LAYOUTS := $$(sort $$(KEYBOARD_LAYOUTS) $$(LAYOUTS)) endif + + LAYOUT_KEYMAPS := + $$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.))))) + + KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS)) # if the rule after removing the start of it is empty (we haven't specified a kemap or target) # compile all the keymaps ifeq ($$(RULE),) @@ -420,7 +435,7 @@ define BUILD_TEST MAKE_TARGET := $2 COMMAND := $1 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) - MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS) + MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" MAKE_MSG := $$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) ifneq ($$(MAKE_TARGET),clean) diff --git a/book.json b/book.json index 887d2a6431a3..79206bf35a4a 100644 --- a/book.json +++ b/book.json @@ -3,15 +3,13 @@ "summary": "_summary.md" }, "plugins" : [ - "anchors", "edit-link", "forkmegithub", - "git-author", "hints", - "numbered-headings", "page-toc", "terminal", - "toolbar" + "toolbar", + "bulk-redirect" ], "pluginsConfig": { "edit-link": { @@ -25,6 +23,11 @@ "page-toc": { "selector": ".markdown-section h1, .markdown-section h2" }, + "terminal": { + "copyButtons": true, + "fade": false, + "style": "flat" + }, "toolbar": { "buttons": [ { @@ -33,6 +36,10 @@ "url": "https://github.com/qmk/qmk_firmware" } ] + }, + "bulk-redirect": { + "basepath": "/", + "redirectsFile": "docs/redirects.json" } }, "root": "./docs/" diff --git a/build_full_test.mk b/build_full_test.mk index 94356d57529d..170020b96855 100644 --- a/build_full_test.mk +++ b/build_full_test.mk @@ -21,12 +21,13 @@ $(TEST)_SRC= \ $(TEST_PATH)/keymap.c \ $(TMK_COMMON_SRC) \ $(QUANTUM_SRC) \ + $(SRC) \ tests/test_common/matrix.c \ tests/test_common/test_driver.cpp \ tests/test_common/keyboard_report_util.cpp \ tests/test_common/test_fixture.cpp $(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) -$(TEST)_DEFS=$(TMK_COMMON_DEFS) +$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS) $(TEST)_CONFIG=$(TEST_PATH)/config.h VPATH+=$(TOP_DIR)/tests/test_common \ No newline at end of file diff --git a/build_keyboard.mk b/build_keyboard.mk index 3ec389ac9f5a..e8e21f2ba168 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -39,6 +39,7 @@ ifneq ("$(wildcard $(KEYBOARD_C))","") else $(error "$(KEYBOARD_C)" does not exist) endif +OPT_DEFS += -DKEYBOARD_$(KEYBOARD) ifneq ($(SUBPROJECT),) SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT) @@ -97,11 +98,13 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","") -include $(MAIN_KEYMAP_PATH)/Makefile KEYMAP_C := $(MAIN_KEYMAP_C) KEYMAP_PATH := $(MAIN_KEYMAP_PATH) +else ifneq ($(LAYOUTS),) + include build_layout.mk else - $(error "$(MAIN_KEYMAP_C)/keymap.c" does not exist) + $(error Could not find keymap) + # this state should never be reached endif - # Object files directory # To put object files in current directory, use a dot (.), do NOT make # this an empty or blank macro! @@ -157,7 +160,10 @@ endif OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) -$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" +$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \ +-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD).h\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH)/config.h\" \ +-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \ +-DQMK_SUBPROJECT=\"$(SUBPROJECT)\" -DQMK_SUBPROJECT_H=\"$(SUBPROJECT).h\" -DQMK_SUBPROJECT_CONFIG_H=\"$(SUBPROJECT_PATH)/config.h\" $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC) diff --git a/build_layout.mk b/build_layout.mk new file mode 100644 index 000000000000..beb1cb66278a --- /dev/null +++ b/build_layout.mk @@ -0,0 +1,18 @@ +LAYOUTS_PATH := layouts +LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/)))) + +define SEARCH_LAYOUTS_REPO + LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP) + LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c + ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") + -include $$(LAYOUT_KEYMAP_PATH)/rules.mk + KEYMAP_C := $$(LAYOUT_KEYMAP_C) + KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) + endif +endef + +define SEARCH_LAYOUTS + $$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO))) +endef + +$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) \ No newline at end of file diff --git a/common_features.mk b/common_features.mk index 5eb56ccbfc23..f405d5c07b92 100644 --- a/common_features.mk +++ b/common_features.mk @@ -54,6 +54,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c endif +ifeq ($(strip $(STENO_ENABLE)), yes) + OPT_DEFS += -DSTENO_ENABLE + VIRTSER_ENABLE := yes + SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) OPT_DEFS += -DVIRTSER_ENABLE endif @@ -98,6 +104,11 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c endif +ifeq ($(strip $(KEY_LOCK_ENABLE)), yes) + OPT_DEFS += -DKEY_LOCK_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c +endif + ifeq ($(strip $(PRINTING_ENABLE)), yes) OPT_DEFS += -DPRINTING_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c @@ -150,4 +161,4 @@ QUANTUM_SRC:= \ ifndef CUSTOM_MATRIX QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c -endif \ No newline at end of file +endif diff --git a/docs/README.md b/docs/README.md index 06597a2b690b..515ddb778380 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk ## How to compile {#how-to-compile} -Before you are able to compile, you'll need to [install an environment](build_environment_setup.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: +Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: make planck-rev4-default @@ -22,4 +22,4 @@ This would build the `rev4` revision of the `planck` with the `default` keymap. ## How to customize {#how-to-customize} -QMK has lots of [features](features/README.md) to explore, and a good deal of [reference documentation](reference/README.md) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). +QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). diff --git a/docs/_summary.md b/docs/_summary.md index 8a649a33709a..77d208fc3cd0 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -1,33 +1,57 @@ -* [Getting started](README.md) - * [QMK Overview](qmk_overview.md) - * [Build Environment Setup](build_environment_setup.md) - * [Vagrant Guide](vagrant_guide.md) - * [Make instructions](make_instructions.md) - * [FAQ: Creating a Keymap](faq_keymap.md) - * [FAQ: Compiling QMK](faq_build.md) - * [How to Github](how_to_github.md) +* [Getting started](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Install Build Tools](getting_started_build_tools.md) + * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md) + * [Build/Compile instructions](getting_started_make_guide.md) + * [How to Use Github](getting_started_github.md) -* [Features](features/README.md) - * [Layer switching](key_functions.md) - * [Leader Key](leader_key.md) - * [Macros](macros.md) +* [FAQ](faq.md) + * [General FAQ](faq_general.md) + * [Build/Compile QMK](faq_build.md) + * [Debugging/Troubleshooting QMK](faq_debug.md) + * [Keymap](faq_keymap.md) + +* [Features](features.md) + * [Layouts](feature_layouts.md) + * [Common Shortcuts](feature_common_shortcuts.md) + * [Backlight](feature_backlight.md) + * [Bootmagic](feature_bootmagic.md) * [Dynamic Macros](dynamic_macros.md) + * [Key Lock](key_lock.md) + * [Leader Key](feature_leader_key.md) + * [Macros](macros.md) + * [Mouse keys](mouse_keys.md) + * [PS2 Mouse](feature_ps2_mouse.md) * [Space Cadet](space_cadet_shift.md) * [Tap Dance](tap_dance.md) - * [Mouse keys](mouse_keys.md) + * [Audio](feature_audio.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Stenography](stenography.md) * [Unicode](unicode.md) * Reference * [Glossary](glossary.md) * [Keymap overview](keymap.md) * [Keycodes](keycodes.md) - * [Basic Keycodes](basic_keycodes.md) - * [Quantum Keycodes](quantum_keycodes.md) + * [Basic](keycodes_basic.md) + * [Quantum](quantum_keycodes.md) + * [Backlight](feature_backlight.md#backlight-keycodes) + * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) + * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) + * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers) + * [Mod+Key](feature_common_shortcuts.md#modifier-keys) + * [Mod Tap](feature_common_shortcuts.md#mod-tap) + * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys) + * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) + * [Stenography](stenography.md#keycode-reference) + * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * [The `config.h` File](config_options.md) * [Customizing Functionality](custom_quantum_functions.md) * [Documentation Best Practices](documentation_best_practices.md) * [Unit Testing](unit_testing.md) - + * For Makers and Modders * [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md) * [Adding features to QMK](adding_features_to_qmk.md) @@ -37,9 +61,8 @@ * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md) * For a Deeper Understanding - * [How Keyboards Work](basic_how_keyboards_work.md) + * [How Keyboards Work](how_keyboards_work.md) * [Understanding QMK](understanding_qmk.md) - + * Other Topics - * [General FAQ](faq.md) * [Using Eclipse with QMK](eclipse.md) diff --git a/docs/adding_features_to_qmk.md b/docs/adding_features_to_qmk.md index fb036496c76e..e031ddbb7b6a 100644 --- a/docs/adding_features_to_qmk.md +++ b/docs/adding_features_to_qmk.md @@ -11,6 +11,6 @@ Once you have implemented your new feature you will generally submit a [pull req * **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it. * **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back. -* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work. +* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on. * **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work. -* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues). +* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved. diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index c017c0cdb31f..10a718431c35 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -36,7 +36,7 @@ enum my_keycodes { ## Programming The Behavior Of Any Keycode -When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()' and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required. +When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required. These function are called every time a key is pressed or released. diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md index 8c5b4795a652..059b25bcd3b5 100644 --- a/docs/documentation_best_practices.md +++ b/docs/documentation_best_practices.md @@ -22,6 +22,14 @@ Your page should generally have multiple "H1" headings. Only H1 and H2 headings You can have styled hint blocks drawn around text to draw attention to it. +``` +{% hint style='info' %} +This uses `hint style='info'` +{% endhint %} +``` + +### Examples: + {% hint style='info' %} This uses `hint style='info'` {% endhint %} @@ -37,3 +45,53 @@ This uses `hint style='danger'` {% hint style='working' %} This uses `hint style='working'` {% endhint %} + +# Styled Terminal Blocks + +You can present styled terminal blocks by including special tokens inside your text block. + +``` +\`\`\` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +\`\`\` +``` + +### Example + +``` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +``` + +# Documenting Features + +If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentances describing your feature and a table listing any relevant keycodes is enough. Here is a basic template: + +```markdown +# My Cool Feature + +This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone. + +## My Cool Feature Keycodes + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_COFFEE||Make Coffee| +|KC_CREAM||Order Cream| +|KC_SUGAR||Order Sugar| +``` + +Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. diff --git a/docs/faq.md b/docs/faq.md index d7f2a6f4fd60..506f57a72b46 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,214 +1,6 @@ # Frequently Asked Questions -## What is QMK? - -[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard). - -## What Differences Are There Between QMK and TMK? - -TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. - -From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Quantum Keycodes](quantum_keycodes.html). - -From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary. - -Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. - -# Debug Console -## hid_listen can't recognize device -When debug console of your device is not ready you will see like this: - -``` -Waiting for device:......... -``` - -once the device is pluged in then *hid_listen* finds it you will get this message: - -``` -Waiting for new device:......................... -Listening: -``` - -If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile] - -You may need privilege to access the device on OS like Linux. -- try `sudo hid_listen` - -## Can't get message on console -Check: -- *hid_listen* finds your device. See above. -- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). -- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. -- try using 'print' function instead of debug print. See **common/print.h**. -- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). - -## Linux or UNIX like system requires Super User privilege -Just use 'sudo' to execute *hid_listen* with privilege. -``` -$ sudo hid_listen -``` - -Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. - -File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) -``` -# tmk keyboard products https://github.com/tmk/tmk_keyboard -SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" -``` - -*** - -# Miscellaneous -## NKRO Doesn't work -First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. - -Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. - -If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles. - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - - -## TrackPoint needs reset circuit(PS/2 mouse support) -Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. - -- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 -- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf - - -## Can't read column of matrix beyond 16 -Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16. - -In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`. - -http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 - - -## Bootloader jump doesn't work -Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. -``` -# Size of Bootloaders in bytes: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 -# Teensy++ halfKay(AT90USB128) 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -``` -AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. -Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. - -AVR Boot section is located at end of Flash memory like the followings. -``` -byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-4KB | | 128KB-8KB -0x6000 +---------------+ 0x1E000 +---------------+ - | Bootloader | 4KB | Bootloader | 8KB -0x7FFF +---------------+ 0x1FFFF +---------------+ - - -byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-512B | | 128KB-2KB -0x7E00 +---------------+ 0x1FC00 +---------------+ - | Bootloader | 512B | Bootloader | 2KB -0x7FFF +---------------+ 0x1FFFF +---------------+ -``` - -And see this discussion for further reference. -https://github.com/tmk/tmk_keyboard/issues/179 - - -## Special Extra key doesn't work(System, Audio control keys) -You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. - -``` -EXTRAKEY_ENABLE = yes # Audio control and System control -``` - -## Wakeup from sleep doesn't work - -In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. - -Pressing any key during sleep should wake host. - -## Using Arduino? - -**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. - -- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf -- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf - -Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. - - -## Using PF4-7 pins of USB AVR? -You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. - -If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. - -See this code. -``` - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<] [KEYMAP=...] clean - $ make [-f Makefile.] [KEYMAP=...] - $ make [-f Makefile.] [KEYMAP=...] dfu - +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](make_instructions.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 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. In short when your controller is ATMega32u4, @@ -21,16 +13,16 @@ In short when your controller is ATMega32u4, or just - $ sudo make dfu + $ sudo make --dfu -But to run `make` with root privilege is not good idea. Use former method as possible. +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 [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). +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 least chance of collision with other product. +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. @@ -41,7 +33,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person - 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 - ## 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/`. diff --git a/docs/faq_debug.md b/docs/faq_debug.md new file mode 100644 index 000000000000..3f7cfe7477f1 --- /dev/null +++ b/docs/faq_debug.md @@ -0,0 +1,242 @@ +# Debugging FAQ + +This page details various common questions people have about troubleshooting their keyboards. + +# Debug Console + +## hid_listen can't recognize device +When debug console of your device is not ready you will see like this: + +``` +Waiting for device:......... +``` + +once the device is pluged in then *hid_listen* finds it you will get this message: + +``` +Waiting for new device:......................... +Listening: +``` + +If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile] + +You may need privilege to access the device on OS like Linux. +- try `sudo hid_listen` + +## Can't get message on console +Check: +- *hid_listen* finds your device. See above. +- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). +- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. +- try using 'print' function instead of debug print. See **common/print.h**. +- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). + +## Linux or UNIX like system requires Super User privilege +Just use 'sudo' to execute *hid_listen* with privilege. +``` +$ sudo hid_listen +``` + +Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. + +File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# Miscellaneous +## Safety Considerations + +You probably don't want to "brick" your keyboard, making it impossible +to rewrite firmware onto it. Here are some of the parameters to show +what things are (and likely aren't) too risky. + +- If your keyboard map does not include RESET, then, to get into DFU + mode, you will need to press the reset button on the PCB, which + requires unscrewing the bottom. +- Messing with tmk_core / common files might make the keyboard + inoperable +- Too large a .hex file is trouble; `make dfu` will erase the block, + test the size (oops, wrong order!), which errors out, failing to + flash the keyboard, leaving it in DFU mode. + - To this end, note that the maximum .hex file size on Planck is + 7000h (28672 decimal) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + + - The above file is of size 22396/577ch, which is less than + 28672/7000h + - As long as you have a suitable alternative .hex file around, you + can retry, loading that one + - Some of the options you might specify in your keyboard's Makefile + consume extra memory; watch out for BOOTMAGIC_ENABLE, + MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE +- DFU tools do /not/ allow you to write into the bootloader (unless + you throw in extra fruitsalad of options), so there is little risk + there. +- EEPROM has around a 100000 write cycle. You shouldn't rewrite the + firmware repeatedly and continually; that'll burn the EEPROM + eventually. +## NKRO Doesn't work +First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. + +Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. + +If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles. + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + + +## TrackPoint needs reset circuit(PS/2 mouse support) +Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + + +## Can't read column of matrix beyond 16 +Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16. + +In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`. + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + + +## Bootloader jump doesn't work +Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. +``` +# Size of Bootloaders in bytes: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` +AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. +Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. + +AVR Boot section is located at end of Flash memory like the followings. +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +And see this discussion for further reference. +https://github.com/tmk/tmk_keyboard/issues/179 + + +## Special Extra key doesn't work(System, Audio control keys) +You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. + +``` +EXTRAKEY_ENABLE = yes # Audio control and System control +``` + +## Wakeup from sleep doesn't work + +In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. + +Pressing any key during sleep should wake host. + +## Using Arduino? + +**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. + + +## Using PF4-7 pins of USB AVR? +You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. + +If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. + +See this code. +``` + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< + +## What Differences Are There Between QMK and TMK? + +TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. + +From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md). + +From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary. + +Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. + diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index d6442ac53ada..eb49a369968f 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -1,9 +1,9 @@ -# Frequently Asked Keymap Questions +# Keymap FAQ -This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first. +This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.md) first. ## What Keycodes Can I Use? -See [Basic Keycodes](keycodes.html) and [Quantum Keycodes](quantum_keycodes.html) for most of the keys you can define. +See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available. Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). @@ -116,7 +116,9 @@ https://github.com/tekezo/Karabiner/issues/403 ## Esc and `~ on a key -Use `GRAVE_ESC` or `KC_GESC` in your keymap. +Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `` ` `` and `SHIFT`+`GRAVE_ESC` results in `~`. + +Note that this will break the CTRL+SHIFT+ESC shortcut to the Windows task manager. Use `#define GRAVE_ESC_CTRL_OVERRIDE` in your `config.h` to get the shortcut back. With this option, `ESC_GRAVE` results in `ESC` if `CTRL` is held, even if `SHIFT` or `GUI` are also held. ## Arrow on Right Modifier keys with Dual-Role This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**. diff --git a/docs/feature_audio.md b/docs/feature_audio.md new file mode 100644 index 000000000000..c142ff69c25a --- /dev/null +++ b/docs/feature_audio.md @@ -0,0 +1,204 @@ +# Audio + +Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. + +If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration: + +``` +STARTUP_SONG // plays when the keyboard starts up (audio.c) +GOODBYE_SONG // plays when you press the RESET key (quantum.c) +AG_NORM_SONG // plays when you press AG_NORM (quantum.c) +AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c) +MUSIC_ON_SONG // plays when music mode is activated (process_music.c) +MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c) +CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c) +GUITAR_SONG // plays when the guitar music mode is selected (process_music.c) +VIOLIN_SONG // plays when the violin music mode is selected (process_music.c) +MAJOR_SONG // plays when the major music mode is selected (process_music.c) +``` + +You can override the default songs by doing something like this in your `config.h`: + +```c +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +``` + +A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h). + +To play a custom sound at a particular time, you can define a song like this (near the top of the file): + +```c +float my_song[][2] = SONG(QWERTY_SOUND); +``` + +And then play your song like this: + +```c +PLAY_SONG(my_song); +``` + +Alternatively, you can play it in a loop like this: + +```c +PLAY_LOOP(my_song); +``` + +It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard. + +## Music mode + +The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. + +Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. + +Keycodes available: + +* `MU_ON` - Turn music mode on +* `MU_OFF` - Turn music mode off +* `MU_TOG` - Toggle music mode +* `MU_MOD` - Cycle through the music modes: + * `CHROMATIC_MODE` - Chromatic scale, row changes the octave + * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st) + * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st) + * `MAJOR_MODE` - Major scale + +In music mode, the following keycodes work differently, and don't pass through: + +* `LCTL` - start a recording +* `LALT` - stop recording/stop playing +* `LGUI` - play recording +* `KC_UP` - speed-up playback +* `KC_DOWN` - slow-down playback + +By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this: + + #define MUSIC_MASK keycode != KC_NO + +Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! + +The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: + + #define PITCH_STANDARD_A 432.0f + +## MIDI functionalty + +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_backlight.md b/docs/feature_backlight.md new file mode 100644 index 000000000000..c419b7cccb96 --- /dev/null +++ b/docs/feature_backlight.md @@ -0,0 +1,17 @@ +# Backlighting + + + +## Backlight Keycodes + +These keycodes control the backlight. Most keyboards use this for single color in-switch lighting. + +|Name|Description| +|----|-----------| +|`BL_x`|Set a specific backlight level between 0-9| +|`BL_ON`|An alias for `BL_9`| +|`BL_OFF`|An alias for `BL_0`| +|`BL_DEC`|Turn the backlight level down by 1| +|`BL_INC`|Turn the backlight level up by 1| +|`BL_TOGG`|Toggle the backlight on or off| +|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.| diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md new file mode 100644 index 000000000000..79a54208ead0 --- /dev/null +++ b/docs/feature_bluetooth.md @@ -0,0 +1,17 @@ +# Bluetooth + +## Bluetooth functionality + +This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. + + + +## Bluetooth Keycodes + +This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both. + +|Name|Description| +|----|-----------| +|`OUT_AUTO`|auto mode| +|`OUT_USB`|usb only| +|`OUT_BT`|bluetooth| diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md new file mode 100644 index 000000000000..3cf7d8d2a969 --- /dev/null +++ b/docs/feature_bootmagic.md @@ -0,0 +1,29 @@ +# Bootmagic + + + +## Bootmagic Keycodes + +Shortcuts for bootmagic options. You can use these even when bootmagic is off. + +|Name|Description| +|----|-----------| +|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control| +|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key| +|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys| +|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys| +|`MAGIC_NO_GUI`|Disable the GUI key| +|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.| +|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack 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`|Disable the Control/Capslock swap| +|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control | +|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching| +|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching| +|`MAGIC_UNNO_GUI`|Enable the GUI key | +|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap | +|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap| +|`MAGIC_UNHOST_NKRO`|Force NKRO off| +|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching| +|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off| diff --git a/docs/feature_common_shortcuts.md b/docs/feature_common_shortcuts.md new file mode 100644 index 000000000000..a3dde8b6707e --- /dev/null +++ b/docs/feature_common_shortcuts.md @@ -0,0 +1,163 @@ +# Common Keymap Shortcuts + +Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you. + +People often define custom names using `#define`. For example: + +```c +#define FN_CAPS LT(_FL, KC_CAPSLOCK) +#define ALT_TAB LALT(KC_TAB) +``` + +This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. + +### Limits of these aliases + +Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html). + +## Switching and toggling layers + +These functions allow you to activate layers in various ways. + +* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. +* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. +* `TG(layer)` - toggles a layer on or off. +* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). +* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. + +## Working With Layers + +Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems. + +### Beginners + +If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers: + +* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.) +* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer. +* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone. + +### Intermediate Users + +Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as multually exclusive. When one base layer is on the others are off. + +### Advanced Users + +Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways. + +Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. + +## Modifier keys + +These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent. + +* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode) +* `RSFT(kc)` - applies right Shift to *kc* +* `LCTL(kc)` - applies left Control to *kc* +* `RCTL(kc)` - applies right Control to *kc* +* `LALT(kc)` - applies left Alt to *kc* +* `RALT(kc)` - applies right Alt to *kc* +* `LGUI(kc)` - applies left GUI (command/win) to *kc* +* `RGUI(kc)` - applies right GUI (command/win) to *kc* +* `HYPR(kc)` - applies Hyper (all modifiers) to *kc* +* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* +* `LCAG(kc)` - applies CtrlAltGui to *kc* + +You can also chain these, like this: + + LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. + +## Shifted Keycodes + +The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. + +|Name|Description| +|----|-----------| +| KC_TILD | ~ | +| KC_EXLM | ! | +| KC_QUES | ? | +| KC_AT | @ | +| KC_HASH | # | +| KC_DLR | $ | +| KC_PERC | % | +| KC_CIRC | ^ | +| KC_AMPR | & | +| KC_ASTR | * | +| KC_LPRN | ( | +| KC_RPRN | ) | +| KC_UNDS | _ | +| KC_PLUS | + | +| KC_DQUO | " | +| KC_LCBR | { | +| KC_RCBR | } | +| KC_LABK | < | +| KC_RABK | > | +| KC_PIPE | | | +| KC_COLN | : | + +## Mod Tap + +`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. + +These are the values you can use for the `mod` in `MT()` and `OSM()`: + + * MOD_LCTL + * MOD_LSFT + * MOD_LALT + * MOD_LGUI + * MOD_RCTL + * MOD_RSFT + * MOD_RALT + * MOD_RGUI + * 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. + +We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: + + * `CTL_T(kc)` - is LCTL when held and *kc* when tapped + * `SFT_T(kc)` - is LSFT when held and *kc* when tapped + * `ALT_T(kc)` - is LALT when held and *kc* when tapped + * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped + * `GUI_T(kc)` - is LGUI when held and *kc* when tapped + * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) + * `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. + +## One Shot Keys + +One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time. + +For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released. + +One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key. + +You can control the behavior of one shot keys by defining these in `config.h`: + +```c +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ +``` + +* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes. +* `OSL(layer)` - momentary switch to *layer*. + +## Permissive Hold + +As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: + +``` +#define PERMISSIVE_HOLD +``` + +This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register. + +Example: (Tapping Term = 200ms) + +- SHFT_T(KC_A) Down +- KC_X Down +- KC_X Up +- SHFT_T(KC_A) Up + +With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X). diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md new file mode 100644 index 000000000000..4d75270dcdf1 --- /dev/null +++ b/docs/feature_layouts.md @@ -0,0 +1,77 @@ +# Layouts: Using a keymap with multiple keyboards + +The `layouts/` folder contains different physical key layouts that can apply to different keyboards. + +``` +layouts/ ++ default/ +| + 60_ansi/ +| | + readme.md +| | + layout.json +| | + a_good_keymap/ +| | | + keymap.c +| | | + readme.md +| | | + config.h +| | | + rules.mk +| | + / +| | + ... +| + / ++ community/ +| + / +| + ... +``` + +The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple reposistories here. + +Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: + +```md +# 60_ansi + + LAYOUT_60_ansi +``` + +New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue. + +## 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 preferrably the physical layout): + + #define LAYOUT_60_ansi KEYMAP_ANSI + +The folder name must be added to the keyboard's `rules.mk`: + + LAYOUTS = 60_ansi + +`LAYOUTS` can be appended in the subproject's `rules.mk`: + + LAYOUTS += 60_iso + +but the `LAYOUT_` variable must be defined in `.h` as well. + +## Tips for making layouts keyboard-agnostic + +Instead of using `#include "planck.h"`, you can use this line to include whatever `.h` (`.h` should not be included here) file that is being compiled: + + #include QMK_KEYBOARD_H + +In your config.h, you can also use this variable to include the keyboard's `config.h`: + + #include QMK_KEYBOARD_CONFIG_H + +If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement: + +* `KEYBOARD_` +* `SUBPROJECT_` + +For example: + +```c +#ifdef KEYBOARD_planck + #ifdef SUBPROJECT_rev4 + planck_rev4_function(); + #endif +#endif +``` + +Note that the names are lowercase and match the folder/file names for the keyboard/subproject exactly. \ No newline at end of file diff --git a/docs/leader_key.md b/docs/feature_leader_key.md similarity index 100% rename from docs/leader_key.md rename to docs/feature_leader_key.md diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md new file mode 100644 index 000000000000..8629b28cffaf --- /dev/null +++ b/docs/feature_ps2_mouse.md @@ -0,0 +1,238 @@ +## PS/2 Mouse Support + +Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. + +To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki. + +There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended). + +### Busywait version + +Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. + +In rules.mk: + +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_BUSYWAIT = yes +``` + +In your keyboard config.h: + +``` +#ifdef PS2_USE_BUSYWAIT +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 1 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 +#endif +``` + +### Interrupt version + +The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. + +In rules.mk: + +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_INT = yes +``` + +In your keyboard config.h: + +``` +#ifdef PS2_USE_INT +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 2 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 5 + +#define PS2_INT_INIT() do { \ + EICRA |= ((1< + +## RGB Under Glow Mod + +![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) + +Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). + +For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile. + + RGBLIGHT_ENABLE = yes + +In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`. + +Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default: + + #define RGB_DI_PIN F4 // The pin your RGB strip is wired to + #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio) + #define RGBLED_NUM 14 // Number of LEDs + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 + +You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to. + +The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c` + +### WS2812 Wiring + +![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg) + +Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. + +## RGB Lighting Keycodes + +This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting. + +|Name|Description| +|----|-----------| +|`RGB_TOG`|toggle on/off| +|`RGB_MOD`|cycle through modes| +|`RGB_HUI`|hue increase| +|`RGB_HUD`|hue decrease| +|`RGB_SAI`|saturation increase| +|`RGB_SAD`|saturation decrease| +|`RGB_VAI`|value increase| +|`RGB_VAD`|value decrease| diff --git a/docs/feature_thermal_printer.md b/docs/feature_thermal_printer.md new file mode 100644 index 000000000000..0c5d15116a36 --- /dev/null +++ b/docs/feature_thermal_printer.md @@ -0,0 +1,10 @@ +# Thermal Printer + + + +## Thermal Printer Keycodes + +|Name|Description| +|----|-----------| +|`PRINT_ON`|Start printing everything the user types| +|`PRINT_OFF`|Stop printing everything the user types| diff --git a/docs/features/README.md b/docs/features.md similarity index 98% rename from docs/features/README.md rename to docs/features.md index 72187d2d417a..c5965f4c0ecb 100644 --- a/docs/features/README.md +++ b/docs/features.md @@ -7,7 +7,7 @@ Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) ## The Leader key: A new kind of modifier -Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page. +Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page. ## Tap Dance: A single key can do 3, 5, or 100 different things @@ -102,4 +102,4 @@ case MACRO_RAISED: update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST); } break; -``` \ No newline at end of file +``` diff --git a/docs/build_environment_setup.md b/docs/getting_started_build_tools.md similarity index 80% rename from docs/build_environment_setup.md rename to docs/getting_started_build_tools.md index 2282e9d13145..e46b7f2e5370 100644 --- a/docs/build_environment_setup.md +++ b/docs/getting_started_build_tools.md @@ -1,25 +1,77 @@ -# Build Environment Setup +# Installing Build Tools This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.) -# Windows 10 +## Linux -## Creators Update +To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** + +You can also install things manually, but this documentation might not be always up to date with all requirements. + +The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently. + +``` +build-essential +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 +git +``` + +Install the dependencies with your favorite package manager. + +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 + +# Mac +If you're using [homebrew,](http://brew.sh/) you can use the following commands: + + brew tap osx-cross/avr + brew install avr-libc + brew install dfu-programmer + +This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage. + +## Windows with msys2 (recommended) + +The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org). + +* Install msys2 by downloading and following the instructions here: http://www.msys2.org +* Open the "MSYS2 MingGW 64-bit" shortcut +* Navigate to your qmk checkout. For example, if it's in the root of your c drive: + * `$ cd /c/qmk_firmware` +* Run `util/msys2_install.sh` and follow the prompts + +## Windows 10 (deprecated) +These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). + +### Creators Update If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). -## Windows Subsystem for Linux +### Windows Subsystem for Linux In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. -## Git +### Git If you already have cloned the repository on your Windows file system you can ignore this section. You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. -## Toolchain setup +### Toolchain setup The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. 1. Open "Bash On Ubuntu On Windows" from the start menu. @@ -28,13 +80,16 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro 4. Close the Bash command window, and re-open it. 5. You are ready to compile and flash the firmware! -## Some important things to keep in mind +### Some important things to keep in mind * You can run `util/wsl_install.sh` again to get all the newest updates. * Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. * The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations * You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. -# Windows (Vista and later) +## Windows (Vista and later) (Deprecated) + +These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). + 1. If you have ever installed WinAVR, uninstall it. 2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). @@ -46,58 +101,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. -# Mac -If you're using [homebrew,](http://brew.sh/) you can use the following commands: - - brew tap osx-cross/avr - brew install avr-libc - brew install dfu-programmer - -This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage. - -You can also try these instructions: - -1. Install Xcode from the App Store. -2. Install the Command Line Tools from `Xcode->Preferences->Downloads`. -3. Install [DFU-Programmer](https://dfu-programmer.github.io/). - -If you are going to flash Infinity based keyboards you will also need dfu-util - - brew install dfu-util - -# Linux - -To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** - -You can also install things manually, but this documentation might not be always up to date with all requirements. - -The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently. - -``` -build-essential -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 -git -``` - -Install the dependencies with your favorite package manager. - -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 - -# Docker +## Docker If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap: @@ -115,11 +119,5 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash. -# Vagrant +## Vagrant If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). - -# Verify Your Installation -1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. -2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. -3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. -4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. diff --git a/docs/how_to_github.md b/docs/getting_started_github.md similarity index 100% rename from docs/how_to_github.md rename to docs/getting_started_github.md diff --git a/docs/getting_started_instroduction.md b/docs/getting_started_instroduction.md new file mode 100644 index 000000000000..3cd27504d3ba --- /dev/null +++ b/docs/getting_started_instroduction.md @@ -0,0 +1,47 @@ +# Introduction + +This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make. + +## Basic QMK structure + +QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. + +### Keyboard project structure + +Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure: + +* `keymaps/`: Different keymaps that can be built +* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`. +* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. + +### Keymap structure + +In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen. + +* `config.h`: the options to configure your keymap +* `keymap.c`: all of your keymap code, required +* `rules.mk`: the features of QMK that are enabled +* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur. + +# The `config.h` file + +There are 2 `config.h` locations: + +* keyboard (`/keyboards//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code: + +``` +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" +``` + +If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this: + +```c +#undef MY_SETTING +#define MY_SETTING 4 +``` diff --git a/docs/make_instructions.md b/docs/getting_started_make_guide.md similarity index 97% rename from docs/make_instructions.md rename to docs/getting_started_make_guide.md index 64c1cb0f0006..fac801082f6b 100644 --- a/docs/make_instructions.md +++ b/docs/getting_started_make_guide.md @@ -21,7 +21,7 @@ As mentioned above, there are some shortcuts, when you are in a: * `keyboard` folder, the command will automatically fill the `` part. So you only need to type `--` * `subproject` folder, it will fill in both `` and `` * `keymap` folder, then `` and `` will be filled in. If you need to specify the `` use the following syntax `-` - * Note in order to support this shortcut, the keymap needs its own Makefile (see the example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk)) + * Note in order to support this shortcut, the keymap needs its own Makefile * `keymap` folder of a `subproject`, then everything except the `` will be filled in The `` means the following @@ -142,7 +142,7 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly `AUDIO_ENABLE` -This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information. +This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information. `FAUXCLICKY_ENABLE` @@ -150,7 +150,7 @@ Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue swi `VARIABLE_TRACE` -Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information. +Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information. `API_SYSEX_ENABLE` @@ -158,6 +158,10 @@ This enables using the Quantum SYSEX API to send strings (somewhere?) This consumes about 5390 bytes. +`KEY_LOCK_ENABLE` + +This enables [key lock](key_lock.md). This consumes an additional 260 bytes. + ## Customizing Makefile options on a per-keymap basis If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard. diff --git a/docs/vagrant_guide.md b/docs/getting_started_vagrant.md similarity index 100% rename from docs/vagrant_guide.md rename to docs/getting_started_vagrant.md diff --git a/docs/gitbook/images/favicon.ico b/docs/gitbook/images/favicon.ico index bd9e65bce28f..2b4e04abafb3 100644 Binary files a/docs/gitbook/images/favicon.ico and b/docs/gitbook/images/favicon.ico differ diff --git a/docs/gitbook/images/favicon.png b/docs/gitbook/images/favicon.png index 0f3343db0d90..509cebd8798b 100644 Binary files a/docs/gitbook/images/favicon.png and b/docs/gitbook/images/favicon.png differ diff --git a/docs/glossary.md b/docs/glossary.md index fac1952a6dd6..e1103ec94af0 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -1,29 +1,170 @@ # Glossary of QMK terms +## ARM +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. + +## AZERTY +The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. + +## Backlight +A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches. + +## Bluetooth +A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard. + +## Bootloader +A special program that is written to a protected area of your MCU that allows the MCU to upgrade its own firmware, typically over USB. + +## Bootmagic +A feature that allows for various keyboard behavior changes to happen on the fly, such as swapping or disabling common keys. + +## C +A low-level programming language suitable for system code. Most QMK code is written in C. + +## Colemak +An alternative keyboard layout that is gaining in popularity. + +## Compile +The process of turning human readable code into machine code your MCU can run. + +## Dvorak +An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A shortened form of the Dvorak Simplified Keyboard. + ## Dynamic Macro A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. +* [Dynamic Macro Documentation](dynamic_macros.html) + +## Eclipse +An IDE that is popular with many C developers. + +* [Eclipse Setup Instructions](eclipse.html) + +## Firmware +The software that controls your MCU. + +## FLIP +Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required. + ## git Versioning software used at the commandline +## GitHub +The website that hosts most of the QMK project. It provides integration with git, issue tracking, and other features that help us run QMK. + +## ISP +In-system programming, a method of programming an AVR chip using external hardware and the JTAG pins. + +## hid_listen +An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html) + ## Keycode -A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html). +A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html). + +## Key Down +An event that happens when a key is pressed down, but is completed before a key is released. + +## Key Up +An event that happens when a key is released. ## Keymap An array of keycodes mapped to a physical keyboard layout, which are processed on key presses and releases +## Layer +An abstraction used to allow a key to serve multiple purposes. The highest active layer takes precedence. + +## Leader Key +A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features. + +* [Leader Key Documentation](feature_leader_key.html) + +## LED +Light Emitting Diode, the most common device used for indicators on a keyboard. + +## Make +Software package that is used to compile all the source files. You run `make` with various options to compile your keyboard firmware. + ## Matrix -A wiring pattern of columns and rows (and usually diodes) that enables the MCU to detect keypresses with a fewer number of pins +A wiring pattern of columns and rows that enables the MCU to detect keypresses with a fewer number of pins. The matrix often incorporates diodes to allow for NKRO. ## Macro A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key. +* [Macro Documentation](macros.html) + +## MCU +Microcontrol Unit, the processor that powers your keyboard. + +## Modifier +A key that is held down while typing another key to modify the action of that key. Examples include Ctrl, Alt, and Shift. + ## Mousekeys A feature that lets you control your mouse cursor and click from your keyboard. * [Mousekeys Documentation](mouse_keys.html) +## N-Key Rollover (NKRO) +A term that applies to keyboards that are capable of reporting any number of key-presses at once. + +## Oneshot Modifier +A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. + +## ProMicro +A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros. + +## Pull Request +A request to submit code to QMK. We encourage all users to submit Pull Requests for their personal keymaps. + +## QWERTY +The standard English keyboard layout, and often a shortcut for other language's standard layouts. Named for the first 6 letters on the keyboard. + +## QWERTZ +The standard Deutsche (German) keyboard layout. Named for the first 6 letters on the keyboard. + +## Rollover +The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO. + +## Scancode +A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/). + +## Space Cadet Shift +A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times. + +* [Space Cadet Shift Documentation](space_cadet_shift.html) + +## Tap +Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once. + ## Tap Dance A feature that lets you assign muiltple keycodes to the same key based on how many times you press it. -* [Tap Dance Documentation](tap_dance.html) +* [Tap Dance Documentation](tap_dance.md) + +## Teensy +A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple. + +## Underlight +A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. + +## Unicode +In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. + +* [Unicode Documentation](unicode.md) + +## Unit Testing +A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. + +* [Unit Testing Documentation](unit_testing.md) + +## USB +Universal Serial Bus, the most common wired interface for a keyboard. + +## USB Host (or simply Host) +The USB Host is your computer, or whatever device your keyboard is plugged into. + +# Couldn't find the term you're looking for? + +[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :) diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 9f63095426b1..263cd5994830 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -298,13 +298,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; ``` -Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. +Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file. It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. ## Compiling your firmware -After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](build_guide.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy. +After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy. Once everything is installed, running `make` in the terminal should get you some output, and eventually a `.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section. @@ -328,4 +328,4 @@ If you've done all of these things, keep in mind that sometimes you might have h Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) +There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) diff --git a/docs/basic_how_keyboards_work.md b/docs/how_keyboards_work.md similarity index 98% rename from docs/basic_how_keyboards_work.md rename to docs/how_keyboards_work.md index 3969c5680de9..edd219a32390 100644 --- a/docs/basic_how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -51,7 +51,7 @@ layout is set to QWERTY, a sample of the matching table is as follow: ## Back to the firmware -As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in `keycode.txt`. +As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in [keycodes](keycodes.md). ## List of Characters You Can Send diff --git a/docs/key_functions.md b/docs/key_functions.md deleted file mode 100644 index 8a579f305885..000000000000 --- a/docs/key_functions.md +++ /dev/null @@ -1,128 +0,0 @@ -# Quick Aliases To Common Actions - -Your keymap can include shortcuts to common operations (called "function actions" in tmk). - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the qmk `ACTION_*` functions, please see the [Keymap documentation](keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -## Limits of these aliases - -Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used, [see this list](keycodes.html). - -# Switching and toggling layers - -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). - -`TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 1` for just one tap. - - -# Modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* -* `HYPR(kc)` - applies Hyper (all modifiers) to *kc* -* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* -* `LCAG(kc)` - applies CtrlAltGui to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -# Shifted Keycodes - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `quantum/quantum_keycodes.h`. - - KC_TILD ~ - KC_EXLM ! - KC_QUES ? - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_DQUO " - KC_LCBR { - KC_RCBR } - KC_LABK < - KC_RABK > - KC_PIPE | - KC_COLN : - -# One Shot - -`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :) - -`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers). - - -# Mod Tap - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` and `OSM()`: - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - * MOD_RCTL - * MOD_RSFT - * MOD_RALT - * MOD_RGUI - * 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. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - * `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. - -# Permissive Hold - -As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: - -``` -#define PERMISSIVE_HOLD -``` - -This makes it easier for fast typists to use dual-function keys. As described in the PR: - -Without this, if you let go of a held key inside the tapping term, it won't register. - -Example: (Tapping Term = 200) - -- SHFT_T(KC_A) Down -- KC_X Down -- KC_X Up -- SHFT_T(KC_A) Up - -With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X). - -With defaults, if above is typed within tapping term, this will emit `ax`, which I doubt is what anyone really wants diff --git a/docs/key_lock.md b/docs/key_lock.md new file mode 100644 index 000000000000..e424061a9a6e --- /dev/null +++ b/docs/key_lock.md @@ -0,0 +1,11 @@ +## Key Lock: Holding down keys for you + +Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged. + +Here's how to use it: + +1. Pick a key on your keyboard. This will be the key lock key. Assign it the keycode `KC_LOCK`. This will be a single-action key: you won't be able to use it for anything else. +2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile. +3. That's it! + +Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be. diff --git a/docs/keycodes.md b/docs/keycodes.md index 7c5cae8b3165..c601ad4ced67 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -1,17 +1,315 @@ # Overview -When defining a [keymap](keymap.md) each key needs a valid key definition. +When defining a [keymap](keymap.md) each key needs a valid key definition. This page documents the symbols that correspond to keycodes that are available to you in QMK. This is a reference only. Where possible keys link to the page documenting their functionality. -This page documents the symbols that correspond to keycodes that are available to you in QMK. +## Keycode Index -## Basic keycodes (`0x00` - `0xFF`) - -[Basic keycodes](basic_keycodes.md) in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions: - -* `KC_NO` = 0 for no action -* `KC_TRNS` = 1 for layer transparency -* internal special keycodes in the `0xA5-DF` range (tmk heritage). - -## Quantum keycodes (`0x0100` - `0xFFFF`) - -[Quantum keycodes](quantum_keycodes.md) allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. +|Long Name|Short Name|Description| +|---------|----------|-----------| +|`KC_1`|||| +|`KC_2`|||| +|`KC_3`|||| +|`KC_4`|||| +|`KC_5`|||| +|`KC_6`|||| +|`KC_7`|||| +|`KC_8`|||| +|`KC_9`|||| +|`KC_0`|||| +|`KC_F1`|||| +|`KC_F2`|||| +|`KC_F3`|||| +|`KC_F4`|||| +|`KC_F5`|||| +|`KC_F6`|||| +|`KC_F7`|||| +|`KC_F8`|||| +|`KC_F9`|||| +|`KC_F10`|||| +|`KC_F11`|||| +|`KC_F12`|||| +|`KC_F13`|||| +|`KC_F14`|||| +|`KC_F15`|||| +|`KC_F16`|||| +|`KC_F17`|||| +|`KC_F18`|||| +|`KC_F19`|||| +|`KC_F20`|||| +|`KC_F21`|||| +|`KC_F22`|||| +|`KC_F23`|||| +|`KC_F24`|||| +|`KC_A`|||| +|`KC_B`|||| +|`KC_C`|||| +|`KC_D`|||| +|`KC_E`|||| +|`KC_F`|||| +|`KC_G`|||| +|`KC_H`|||| +|`KC_I`|||| +|`KC_J`|||| +|`KC_K`|||| +|`KC_L`|||| +|`KC_M`|||| +|`KC_N`|||| +|`KC_O`|||| +|`KC_P`|||| +|`KC_Q`|||| +|`KC_R`|||| +|`KC_S`|||| +|`KC_T`|||| +|`KC_U`|||| +|`KC_V`|||| +|`KC_W`|||| +|`KC_X`|||| +|`KC_Y`|||| +|`KC_Z`|||| +|`KC_ENTER`|`KC_ENT`|`Return (ENTER)`| +|`KC_ESCAPE`|`KC_ESC`|`ESCAPE`| +|`KC_BSPACE`|`KC_BSPC`|`DELETE (Backspace)`| +|`KC_TAB`||`Tab`| +|`KC_SPACE`|`KC_SPC`|Spacebar| +|`KC_MINUS`|`KC_MINS`|`-` and `_`| +|`KC_EQUAL`|`KC_EQL`|`=` and `+`| +|`KC_LBRACKET`|`KC_LBRC`|`[` and `{`| +|`KC_RBRACKET`|`KC_RBRC`|`]` and `}`| +|`KC_BSLASH`|`KC_BSLS`|`\` and | | +|`KC_NONUS_HASH`|`KC_NUHS`|Non-US `#` and `~`| +|`KC_NONUS_BSLASH`|`KC_NUBS`|Non-US `\` and | | +|`KC_INT1`|`KC_RO`|JIS `\` and | | +|`KC_INT2`|`KC_KANA`|International216| +|`KC_INT3`|`KC_JYEN`|Yen Symbol (`¥`)| +|`KC_SCOLON`|`KC_SCLN`|`;` and `:`| +|`KC_QUOTE`|`KC_QUOT`|`‘` and `“`| +|`KC_GRAVE`|`KC_GRV`|Grave Accent and Tilde| +|`KC_COMMA`|`KC_COMM`|`,` and `<`| +|`KC_DOT`||`.` and `>`| +|`KC_SLASH`|`KC_SLSH`|`/` and `?`| +|`KC_CAPSLOCK`|`KC_CAPS`|Caps Lock| +|`KC_LCTRL`|`KC_LCTL`|LeftControl| +|`KC_LSHIFT`|`KC_LSFT`|LeftShift| +|`KC_LALT`||LeftAlt| +|`KC_LGUI`||Left GUI(Windows/Apple/Meta key)| +|`KC_RCTRL`|`KC_RCTL`|RightControl| +|`KC_RSHIFT`|`KC_RSFT`|RightShift| +|`KC_RALT`||RightAlt| +|`KC_RGUI`||Right GUI(Windows/Apple/Meta key)| +|`KC_LOCKING_CAPS`|`KC_LCAP`|Locking Caps Lock| +|`KC_LOCKING_NUM`|`KC_LNUM`|Locking Num Lock| +|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock| +|`KC_INT4`|`KC_HENK`|JIS Henken| +|`KC_INT5`|`KC_MHEN`|JIS Muhenken| +|`KC_PSCREEN`|`KC_PSCR`|PrintScreen| +|`KC_SCROLLLOCK`|`KC_SLCK`|Scroll Lock| +|`KC_PAUSE`|`KC_PAUS`|Pause| +|`KC_INSERT`|`KC_INS`|Insert| +|`KC_HOME`||Home| +|`KC_PGUP`||PageUp| +|`KC_DELETE`|`KC_DEL`|Delete Forward| +|`KC_END`||End| +|`KC_PGDOWN`|`KC_PGDN`|PageDown| +|`KC_RIGHT`|`KC_RGHT`|RightArrow| +|`KC_LEFT`||LeftArrow| +|`KC_DOWN`||DownArrow| +|`KC_UP`||UpArrow| +|`KC_APPLICATION`|`KC_APP`|Application| +|`KC_POWER`||Power| +|`KC_EXECUTE`||Execute| +|`KC_HELP`||Help| +|`KC_MENU`||Menu| +|`KC_SELECT`||Select| +|`KC_AGAIN`||Again| +|`KC_UNDO`||Undo| +|`KC_CUT`||Cut| +|`KC_COPY`||Copy| +|`KC_PASTE`||Paste| +|`KC_FIND`||Find| +|`KC_ALT_ERASE`||Alternate Erase| +|`KC_SYSREQ`||SysReq/Attention| +|`KC_CANCEL`||Cancel| +|`KC_CLEAR`||Clear| +|`KC_PRIOR`||Prior| +|`KC_RETURN`||Return| +|`KC_SEPARATOR`||Separator| +|`KC_OUT`||Out| +|`KC_OPER`||Oper| +|`KC_CLEAR_AGAIN`||Clear/Again| +|`KC_CRSEL`||CrSel/Props| +|`KC_EXSEL`||ExSel| +|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down| +|`KC_SYSTEM_SLEEP`|`KC_SLEP`|System Sleep| +|`KC_SYSTEM_WAKE`|`KC_WAKE`|System Wake| +|`KC_MAIL`|`KC_MAIL`|| +|`KC_CALCULATOR`|`KC_CALC`|| +|`KC_MY_COMPUTER`|`KC_MYCM`|| +|`KC_WWW_SEARCH`|`KC_WSCH`|| +|`KC_WWW_HOME`|`KC_WHOM`|| +|`KC_WWW_BACK`|`KC_WBAK`|| +|`KC_WWW_FORWARD`|`KC_WFWD`|| +|`KC_WWW_STOP`|`KC_WSTP`|| +|`KC_WWW_REFRESH`|`KC_WREF`|| +|`KC_WWW_FAVORITES`|`KC_WFAV`|| +|`KC_STOP`||Stop| +|`KC__MUTE`||Mute| +|`KC__VOLUP`||Volume Up| +|`KC__VOLDOWN`||Volume Down| +|`KC_AUDIO_MUTE`|`KC_MUTE`|| +|`KC_AUDIO_VOL_UP`|`KC_VOLU`|| +|`KC_AUDIO_VOL_DOWN`|`KC_VOLD`|| +|`KC_MEDIA_NEXT_TRACK`|`KC_MNXT`|Next Track (Windows)| +|`KC_MEDIA_PREV_TRACK`|`KC_MPRV`|Previous Track (Windows)| +|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS)| +|`KC_MEDIA_REWIND`|`KC_MRWD`|Previous Track (macOS)| +|`KC_MEDIA_STOP`|`KC_MSTP`|| +|`KC_MEDIA_PLAY_PAUSE`|`KC_MPLY`|| +|`KC_MEDIA_SELECT`|`KC_MSEL`|| +|`KC_NUMLOCK`|`KC_NLCK`|Keypad Num Lock and Clear| +|`KC_KP_SLASH`|`KC_PSLS`|Keypad /| +|`KC_KP_ASTERISK`|`KC_PAST`|Keypad *| +|`KC_KP_MINUS`|`KC_PMNS`|Keypad -| +|`KC_KP_PLUS`|`KC_PPLS`|Keypad +| +|`KC_KP_ENTER`|`KC_PENT`|Keypad ENTER`| +|`KC_KP_1`|`KC_P1`|Keypad 1 and End| +|`KC_KP_2`|`KC_P2`|Keypad 2 and Down Arrow| +|`KC_KP_3`|`KC_P3`|Keypad 3 and PageDn| +|`KC_KP_4`|`KC_P4`|Keypad 4 and Left Arrow| +|`KC_KP_5`|`KC_P5`|Keypad 5| +|`KC_KP_6`|`KC_P6`|Keypad 6 and Right Arrow| +|`KC_KP_7`|`KC_P7`|Keypad 7 and Home| +|`KC_KP_8`|`KC_P8`|Keypad 8 and Up Arrow| +|`KC_KP_9`|`KC_P9`|Keypad 9 and PageUp| +|`KC_KP_0`|`KC_P0`|Keypad 0 and Insert| +|`KC_KP_DOT`|`KC_PDOT`|Keypad . and Delete| +|`KC_KP_EQUAL`|`KC_PEQL`|Keypad =| +|`KC_KP_COMMA`|`KC_PCMM`|Keypad Comma| +|`KC_KP_EQUAL_AS400`||Keypad Equal Sign| +|`KC_NO`||Ignore this key. (NOOP) | +|`KC_TRNS`||Make this key transparent to find the key on a lower layer.| +|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| +|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| +|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| +|[`KC_MS_RIGHT`](mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right| +|[`KC_MS_BTN1`](mouse_keys.md)|`KC_BTN1`|Mouse Button 1| +|[`KC_MS_BTN2`](mouse_keys.md)|`KC_BTN2`|Mouse Button 2| +|[`KC_MS_BTN3`](mouse_keys.md)|`KC_BTN3`|Mouse Button 3| +|[`KC_MS_BTN4`](mouse_keys.md)|`KC_BTN4`|Mouse Button 4| +|[`KC_MS_BTN5`](mouse_keys.md)|`KC_BTN5`|Mouse Button 5| +|[`KC_MS_WH_UP`](mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up| +|[`KC_MS_WH_DOWN`](mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down| +|[`KC_MS_WH_LEFT`](mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left| +|[`KC_MS_WH_RIGHT`](mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right| +|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| +|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| +|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| +|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing| +|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode| +|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| +|[`KC_LSPO`](quantum_keycodes.md#qmk-keycodes)||Left shift when held, open paranthesis when tapped| +|[`KC_RSPC`](quantum_keycodes.md#qmk-keycodes)||Right shift when held, close paranthesis when tapped| +|[`KC_LEAD`](feature_leader_key.md)||The leader key| +|[`FUNC(n)`](quantum_keycodes.md#qmk-keycodes)|`F(n)`|Call `fn_action(n)`| +|[`M(n)`](quantum_keycodes.md#qmk-keycodes)||to call macro n| +|[`MACROTAP(n)`](quantum_keycodes.md#qmk-keycodes)||to macro-tap n idk FIXME`| +|[`MAGIC_SWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Swap Capslock and Left Control| +|[`MAGIC_CAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Treat Capslock like a Control Key| +|[`MAGIC_SWAP_LALT_LGUI`](feature_bootmagic.md)||Swap the left Alt and GUI keys| +|[`MAGIC_SWAP_RALT_RGUI`](feature_bootmagic.md)||Swap the right Alt and GUI keys| +|[`MAGIC_NO_GUI`](feature_bootmagic.md)||Disable the GUI key| +|[`MAGIC_SWAP_GRAVE_ESC`](feature_bootmagic.md)||Swap the Grave and Esc key.| +|[`MAGIC_SWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Swap backslack and backspace| +|[`MAGIC_HOST_NKRO`](feature_bootmagic.md)||Force NKRO on| +|[`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`](feature_bootmagic.md)||Swap Alt and Gui on both sides| +|[`MAGIC_UNSWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Disable the Control/Capslock swap| +|[`MAGIC_UNCAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Disable treating Capslock like Control | +|[`MAGIC_UNSWAP_LALT_LGUI`](feature_bootmagic.md)||Disable Left Alt and GUI switching| +|[`MAGIC_UNSWAP_RALT_RGUI`](feature_bootmagic.md)||Disable Right Alt and GUI switching| +|[`MAGIC_UNNO_GUI`](feature_bootmagic.md)||Enable the GUI key | +|[`MAGIC_UNSWAP_GRAVE_ESC`](feature_bootmagic.md)||Disable the Grave/Esc swap | +|[`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Disable the backslash/backspace swap| +|[`MAGIC_UNHOST_NKRO`](feature_bootmagic.md)||Force NKRO off| +|[`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`](feature_bootmagic.md)||Disable the Alt/GUI switching| +|[`MAGIC_TOGGLE_NKRO`](feature_bootmagic.md)||Turn NKRO on or off| +|[`BL_x`](feature_backlight.md)||Set a specific backlight level between 0-9| +|[`BL_ON`](feature_backlight.md)||An alias for `BL_9`| +|[`BL_OFF`](feature_backlight.md)||An alias for `BL_0`| +|[`BL_DEC`](feature_backlight.md)||Turn the backlight level down by 1| +|[`BL_INC`](feature_backlight.md)||Turn the backlight level up by 1| +|[`BL_TOGG`](feature_backlight.md)||Toggle the backlight on or off| +|[`BL_STEP`](feature_backlight.md)||Step through backlight levels, wrapping around to 0 when you reach the top.| +|[`RGB_TOG`](feature_rgblight.md)||toggle on/off| +|[`RGB_MOD`](feature_rgblight.md)||cycle through modes| +|[`RGB_HUI`](feature_rgblight.md)||hue increase| +|[`RGB_HUD`](feature_rgblight.md)||hue decrease| +|[`RGB_SAI`](feature_rgblight.md)||saturation increase| +|[`RGB_SAD`](feature_rgblight.md)||saturation decrease| +|[`RGB_VAI`](feature_rgblight.md)||value increase| +|[`RGB_VAD`](feature_rgblight.md)||value decrease| +|[`PRINT_ON`](feature_thermal_printer.md)||Start printing everything the user types| +|[`PRINT_OFF`](feature_thermal_printer.md)||Stop printing everything the user types| +|[`OUT_AUTO`](feature_bluetooth.md)||auto mode| +|[`OUT_USB`](feature_bluetooth.md)||usb only| +|[`OUT_BT`](feature_bluetooth.md)||bluetooth (when `BLUETOOTH_ENABLE`)| +|[`KC_HYPR`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT + LGUI`| +|[`KC_MEH`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT`| +|[`LCTL(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `kc`| +|[`LSFT(kc)`](quantum_keycodes.md#modifiers)|[`S(kc)`](quantum_keycodes.md#modifiers)|`LSFT` + `kc`| +|[`LALT(kc)`](quantum_keycodes.md#modifiers)||`LALT` + `kc`| +|[`LGUI(kc)`](quantum_keycodes.md#modifiers)||`LGUI` + `kc`| +|[`RCTL(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `kc`| +|[`RSFT(kc)`](quantum_keycodes.md#modifiers)||`RSFT` + `kc`| +|[`RALT(kc)`](quantum_keycodes.md#modifiers)||`RALT` + `kc`| +|[`RGUI(kc)`](quantum_keycodes.md#modifiers)||`RGUI` + `kc`| +|[`HYPR(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`| +|[`MEH(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `kc`| +|[`LCAG(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `LGUI` + `kc`| +|[`ALTG(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `RALT` + `kc`| +|[`SCMD(kc)`](quantum_keycodes.md#modifiers)|[`SWIN(kc)`](quantum_keycodes.md#modifiers)|`LGUI` + `LSFT` + `kc`| +|[`LCA(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `kc`| +|[`CTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LCTL` when held, `kc` when tapped| +|[`RCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RCTL` when held, `kc` when tapped| +|[`SFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LSFT` when held, `kc` when tapped| +|[`RSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RSFT` when held, `kc` when tapped| +|[`ALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LALT` when held, `kc` when tapped| +|[`RALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`ALGR_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`RALT` when held, `kc` when tapped| +|[`GUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` when held, `kc` when tapped| +|[`RGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RGUI` when held, `kc` when tapped| +|[`C_S_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` when held, `kc` when tapped| +|[`MEH_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped| +|[`LCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped| +|[`RCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped| +|[`ALL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|[`SCMD_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`SWIN_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` + `LSFT` when held, `kc` when tapped| +|[`LCA_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` when held, `kc` when tapped| +|[`KC_TILD`](keycodes_us_ansi_shifted.md)|`KC_TILDE`|tilde `~`| +|[`KC_EXLM`](keycodes_us_ansi_shifted.md)|`KC_EXCLAIM`|exclamation mark `!`| +|[`KC_AT`](keycodes_us_ansi_shifted.md)||at sign `@`| +|[`KC_HASH`](keycodes_us_ansi_shifted.md)||hash sign `#`| +|[`KC_DLR`](keycodes_us_ansi_shifted.md)|`KC_DOLLAR`|dollar sign `$`| +|[`KC_PERC`](keycodes_us_ansi_shifted.md)|`KC_PERCENT`|percent sign `%`| +|[`KC_CIRC`](keycodes_us_ansi_shifted.md)|`KC_CIRCUMFLEX`|circumflex `^`| +|[`KC_AMPR`](keycodes_us_ansi_shifted.md)|`KC_AMPERSAND`|ampersand `&`| +|[`KC_ASTR`](keycodes_us_ansi_shifted.md)|`KC_ASTERISK`|asterisk `*`| +|[`KC_LPRN`](keycodes_us_ansi_shifted.md)|`KC_LEFT_PAREN`|left parenthesis `(`| +|[`KC_RPRN`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_PAREN`|right parenthesis `)`| +|[`KC_UNDS`](keycodes_us_ansi_shifted.md)|`KC_UNDERSCORE`|underscore `_`| +|[`KC_PLUS`](keycodes_us_ansi_shifted.md)||plus sign `+`| +|[`KC_LCBR`](keycodes_us_ansi_shifted.md)|`KC_LEFT_CURLY_BRACE`|left curly brace `{`| +|[`KC_RCBR`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`| +|[`KC_LT`/`KC_LABK`](keycodes_us_ansi_shifted.md)|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`| +|[`KC_GT`/`KC_RABK`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`| +|[`KC_COLN`](keycodes_us_ansi_shifted.md)|`KC_COLON`|colon `:`| +|[`KC_PIPE`](keycodes_us_ansi_shifted.md)||pipe `\|`| +|[`KC_QUES`](keycodes_us_ansi_shifted.md)|`KC_QUESTION`|question mark `?`| +|[`KC_DQT`/`KC_DQUO`](keycodes_us_ansi_shifted.md)|`KC_DOUBLE_QUOTE`|double quote `"`| +|[`LT(layer, kc)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer (0-15) when held, kc ([basic keycodes](keycodes_basic.md)) when tapped| +|[`TO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer when depressed| +|[`MO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)| +|[`DF(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||sets the base (default) layer| +|[`TG(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||toggle layer on/off| +|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`| +|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress| +|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress| +|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| +|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| diff --git a/docs/basic_keycodes.md b/docs/keycodes_basic.md similarity index 91% rename from docs/basic_keycodes.md rename to docs/keycodes_basic.md index 2be3ada1558a..b1f69ab16796 100644 --- a/docs/basic_keycodes.md +++ b/docs/keycodes_basic.md @@ -1,5 +1,11 @@ # Basic keycodes +Basic keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions: + +* `KC_NO` = 0 for no action +* `KC_TRNS` = 1 for layer transparency +* internal special keycodes in the `0xA5-DF` range (tmk heritage). + ## Letters and Numbers |KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8| @@ -51,9 +57,9 @@ |KC_RSHIFT|KC_RSFT|RightShift| |KC_RALT||RightAlt| |KC_RGUI||Right GUI(Windows/Apple/Meta key)| -|KC_LOCKING_CAPS||Locking Caps Lock| -|KC_LOCKING_NUM||Locking Num Lock| -|KC_LOCKING_SCROLL||Locking Scroll Lock| +|KC_LOCKING_CAPS|KC_LCAP|Locking Caps Lock| +|KC_LOCKING_NUM|KC_LNUM|Locking Num Lock| +|KC_LOCKING_SCROLL|KC_LSCR|Locking Scroll Lock| |KC_INT4|KC_HENK|JIS Henken| |KC_INT5|KC_MHEN|JIS Muhenken| @@ -183,4 +189,4 @@ Windows and Mac use different key codes for next track and previous track. Make |KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right| |KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0| |KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1| -|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| \ No newline at end of file +|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md new file mode 100644 index 000000000000..6c7ef4caaa5d --- /dev/null +++ b/docs/keycodes_us_ansi_shifted.md @@ -0,0 +1,31 @@ +# US ANSI Shifted symbols + +These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode. + +It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations. + +## US ANSI Shifted Keycodes + +|Short Name|Long Name|Description| +|----------|---------|-----------| +|`KC_TILD`|`KC_TILDE`|tilde `~`| +|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`| +|`KC_AT`||at sign `@`| +|`KC_HASH`||hash sign `#`| +|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`| +|`KC_PERC`|`KC_PERCENT`|percent sign `%`| +|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`| +|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`| +|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`| +|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`| +|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`| +|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`| +|`KC_PLUS`||plus sign `+`| +|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`| +|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`| +|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`| +|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`| +|`KC_COLN`|`KC_COLON`|colon `:`| +|`KC_PIPE`||pipe `\|`| +|`KC_QUES`|`KC_QUESTION`|question mark `?`| +|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`| diff --git a/docs/keymap.md b/docs/keymap.md index 53b17f401962..170fdaed7d89 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -215,8 +215,7 @@ To actually handle the keypress event we define an `action_function()`. This fun This should have given you a basic overview for creating your own keymap. For more details see the following resources: -* https://github.com/qmk/qmk_firmware/wiki/Keycodes -* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap -* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples +* [Keycodes](keycodes.md) +* [Keymap FAQ](faq_keymap.md) -We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! \ No newline at end of file +We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! diff --git a/docs/macros.md b/docs/macros.md index 6b128541b80e..c7a9b2e7a6f2 100644 --- a/docs/macros.md +++ b/docs/macros.md @@ -24,7 +24,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { }; ``` -This defines two macros which will be run when the key they are assigned to is pressed. If you'd like them to run when the release is released instead you can change the if statement: +This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement: ```c if (!record->event.pressed) { diff --git a/docs/modding_your_keyboard.md b/docs/modding_your_keyboard.md deleted file mode 100644 index 44e6e6e72ad6..000000000000 --- a/docs/modding_your_keyboard.md +++ /dev/null @@ -1,388 +0,0 @@ - -## Audio output from a speaker - -Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. - -The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits: - -``` -#include "audio.h" -``` - -Then, lower down the file: - -``` -float tone_startup[][2] = { - ED_NOTE(_E7 ), - E__NOTE(_CS7), - E__NOTE(_E6 ), - E__NOTE(_A6 ), - M__NOTE(_CS7, 20) -}; -``` - -This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here. - -Then, we have this chunk: - -``` -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); -``` - -Wherein we bind predefined songs (from [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives. - -So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this: - -``` -PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style -``` - -This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime. - -"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes. - -## Music mode - -The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. - -Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. - -Keycodes available: - -* `MU_ON` - Turn music mode on -* `MU_OFF` - Turn music mode off -* `MU_TOG` - Toggle music mode - -In music mode, the following keycodes work differently, and don't pass through: - -* `LCTL` - start a recording -* `LALT` - stop recording/stop playing -* `LGUI` - play recording -* `KC_UP` - speed-up playback -* `KC_DOWN` - slow-down playback - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## RGB Under Glow Mod - -![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) - -Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). - -For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile. - - RGBLIGHT_ENABLE = yes - -In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`. - -Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default: - - #define RGB_DI_PIN F4 // The pin your RGB strip is wired to - #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio) - #define RGBLED_NUM 14 // Number of LEDs - #define RGBLIGHT_HUE_STEP 10 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 - -You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to. - -The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c` - -### WS2812 Wiring - -![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg) - -Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. - -## PS/2 Mouse Support - -Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. - -To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki. - -There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended). - -### Busywait version - -Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. - -In rules.mk: - -``` -PS2_MOUSE_ENABLE = yes -PS2_USE_BUSYWAIT = yes -``` - -In your keyboard config.h: - -``` -#ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 -#endif -``` - -### Interrupt version - -The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. - -In rules.mk: - -``` -PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes -``` - -In your keyboard config.h: - -``` -#ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 - -#define PS2_INT_INIT() do { \ - EICRA |= ((1</Makefile` +## `/keyboards//rules.mk` The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`. @@ -34,7 +34,7 @@ The values at the top likely won't need to be changed, since most boards use the OPT_DEFS += -DBOOTLOADER_SIZE=512 ``` -At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options). +At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options). ## `/keyboards//readme.md` @@ -42,7 +42,7 @@ This is where you'll describe your keyboard - please write as much as you can ab ## `/keyboards//.c` -This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps) +This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md). ## `/keyboards//.h` diff --git a/docs/qmk_overview.md b/docs/qmk_overview.md deleted file mode 100644 index 6fdb68c49fbe..000000000000 --- a/docs/qmk_overview.md +++ /dev/null @@ -1,75 +0,0 @@ -# QMK Overview - -This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make. - -# Basic QMK structure - -QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. - -## Keyboard project structure - -Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure: - -* `keymaps/`: Different keymaps that can be built -* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`. -* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. - -### Keymap structure - -In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen. - -* `config.h`: the options to configure your keymap -* `keymap.c`: all of your keymap code, required -* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder -* `readme.md`: a description of your keymap, how others might use it, and explanations of features -* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap. - -# The `make` command - -The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder. - -**NOTE:** To abort a make command press `Ctrl-c` - -For more details on the QMK build process see [Make Instructions](make_instructions.md). - -### Simple instructions for building and uploading a keyboard - -**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first** - -1. Enter the `root` folder -2. Run `make ---` - -In the above commands, replace: - -* `` with the name of your keyboard -* `` with the name of your keymap -* `` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`. - * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command. -* `` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use. - * If you don't add `-/`) -* keymap (`/keyboards//keymaps//`) - -The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this: - -```c -#undef MY_SETTING -#define MY_SETTING 4 -``` - -For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it. - -You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index 36dbda7a9c20..a5160bf94aa6 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -1,8 +1,10 @@ # Quantum Keycodes +Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. + All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification. -On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well. Keycodes above `0x00FF` may not be used with any of the mod/layer-tap keys listed +On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well. ## QMK keycodes @@ -10,344 +12,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |----|-----------| |`RESET`|Put the keyboard into DFU mode for flashing| |`DEBUG`|Toggles debug mode| -|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| +|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```| |`KC_LSPO`|Left shift when held, open paranthesis when tapped| |`KC_RSPC`|Right shift when held, close paranthesis when tapped| -|`KC_LEAD`|The [leader key](leader_key.md)| -|`FUNC(n)`/`F(n)`|Call `fn_action(n)`| +|`KC_LEAD`|The [leader key](feature_leader_key.md)| +|`KC_LOCK`|The [lock key](key_lock.md)| +|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)| |`M(n)`|to call macro n| |`MACROTAP(n)`|to macro-tap n idk FIXME| - -## Bootmagic Keycodes - -Shortcuts for bootmagic options (these work even when bootmagic is off.) - -|Name|Description| -|----|-----------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control| -|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key| -|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys| -|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys| -|`MAGIC_NO_GUI`|Disable the GUI key| -|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.| -|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack 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`|Disable the Control/Capslock swap| -|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control | -|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching| -|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching| -|`MAGIC_UNNO_GUI`|Enable the GUI key | -|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap | -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap| -|`MAGIC_UNHOST_NKRO`|Force NKRO off| -|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching| -|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off| - - - -## Backlight - -These keycodes control the backlight. Most keyboards use this for single color in-switch lighting. - -|Name|Description| -|----|-----------| -|`BL_x`|Set a specific backlight level between 0-9| -|`BL_ON`|An alias for `BL_9`| -|`BL_OFF`|An alias for `BL_0`| -|`BL_DEC`|Turn the backlight level down by 1| -|`BL_INC`|Turn the backlight level up by 1| -|`BL_TOGG`|Toggle the backlight on or off| -|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.| - -## RGBLIGHT WS2818 LEDs - -This controls the `RGBLIGHT` functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting. - -|Name|Description| -|----|-----------| -|`RGB_TOG`|toggle on/off| -|`RGB_MOD`|cycle through modes| -|`RGB_HUI`|hue increase| -|`RGB_HUD`|hue decrease| -|`RGB_SAI`|saturation increase| -|`RGB_SAD`|saturation decrease| -|`RGB_VAI`|value increase| -|`RGB_VAD`|value decrease| - -## Thermal Printer (experimental) - -|Name|Description| -|----|-----------| -|`PRINT_ON`|Start printing everything the user types| -|`PRINT_OFF`|Stop printing everything the user types| - -## Keyboard output selection - -This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both. - -|Name|Description| -|----|-----------| -|`OUT_AUTO`|auto mode| -|`OUT_USB`|usb only| -|`OUT_BT`|bluetooth (when `BLUETOOTH_ENABLE`)| - -## Modifiers - -These are special keycodes that simulate pressing several modifiers at once. - -|Name|Description| -|----|-----------| -|`KC_HYPR`|Hold down LCTL + LSFT + LALT + LGUI| -|`KC_MEH`|Hold down LCTL + LSFT + LALT| - -/* FIXME: Should we have these in QMK too? - * |`KC_LCAG`|`LCTL` + `LALT` + `LGUI`| - * |`KC_ALTG`|`RCTL` + `RALT`| - * |`KC_SCMD`/`KC_SWIN`|`LGUI` + `LSFT`| - * |`KC_LCA`|`LCTL` + `LALT`| - */ - -### Modifiers with keys - -|Name|Description| -|----|-----------| -|`LCTL(kc)`|`LCTL` + `kc`| -|`LSFT(kc)`/`S(kc)`|`LSFT` + `kc`| -|`LALT(kc)`|`LALT` + `kc`| -|`LGUI(kc)`|`LGUI` + `kc`| -|`RCTL(kc)`|`RCTL` + `kc`| -|`RSFT(kc)`|`RSFT` + `kc`| -|`RALT(kc)`|`RALT` + `kc`| -|`RGUI(kc)`|`RGUI` + `kc`| -|`HYPR(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`| -|`MEH(kc)`|`LCTL` + `LSFT` + `LALT` + `kc`| -|`LCAG(kc)`|`LCTL` + `LALT` + `LGUI` + `kc`| -|`ALTG(kc)`|`RCTL` + `RALT` + `kc`| -|`SCMD(kc)`/`SWIN(kc)`|`LGUI` + `LSFT` + `kc`| -|`LCA(kc)`|`LCTL` + `LALT` + `kc`| - -### One Shot Keys - -Most modifiers work by being held down while you push another key. You can use `OSM()` to setup a "One Shot" modifier. When you tap a one shot mod it will remain is a pressed state until you press another key. - -To specify a your modifier you need to pass the `MOD` form of the key. For example, if you want to setup a One Shot Control you would use `OSM(MOD_LCTL)`. - -|Name|Description| -|----|-----------| -|`OSM(mod)`|use mod for one keypress| -|`OSL(layer)`|switch to layer for one keypress| - -### Mod-tap keys - -These keycodes will press the mod(s) when held, and the key when tapped. They only work with [basic keycodes](basic_keycodes.md). - -|Name|Description| -|----|-----------| -|`CTL_T(kc)`/`LCTL_T(kc)`|`LCTL` when held, `kc` when tapped| -|`RCTL_T(kc)`|`RCTL` when held, `kc` when tapped| -|`SFT_T(kc)`/`LSFT_T(kc)`|`LSFT` when held, `kc` when tapped| -|`RSFT_T(kc)`|`RSFT` when held, `kc` when tapped| -|`ALT_T(kc)`/`LALT_T(kc)`|`LALT` when held, `kc` when tapped| -|`RALT_T(kc)`/`ALGR_T(kc)`|`RALT` when held, `kc` when tapped| -|`GUI_T(kc)`/`LGUI_T(kc)`|`LGUI` when held, `kc` when tapped| -|`RGUI_T(kc)`|`RGUI` when held, `kc` when tapped| -|`C_S_T(kc)`|`LCTL` + `LSFT` when held, `kc` when tapped| -|`MEH_T(kc)`|`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped| -|`LCAG_T(kc)`|`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped| -|`RCAG_T(kc)`|`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped| -|`ALL_T(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SCMD_T(kc)`/`SWIN_T(kc)`|`LGUI` + `LSFT` when held, `kc` when tapped| -|`LCA_T(kc)`|`LCTL` + `LALT` when held, `kc` when tapped| - -## US ANSI Shifted symbols - -These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode. - -It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations. - -|Short Name|Long Name|Description| -|----------|---------|-----------| -|`KC_TILD`|`KC_TILDE`|tilde `~`| -|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`| -|`KC_AT`||at sign `@`| -|`KC_HASH`||hash sign `#`| -|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`| -|`KC_PERC`|`KC_PERCENT`|percent sign `%`| -|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`| -|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`| -|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`| -|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`| -|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`| -|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`| -|`KC_PLUS`||plus sign `+`| -|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`| -|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`| -|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`| -|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`| -|`KC_COLN`|`KC_COLON`|colon `:`| -|`KC_PIPE`||pipe `\|`| -|`KC_QUES`|`KC_QUESTION`|question mark `?`| -|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`| - -## Layer Changes - -These are keycodes that can be used to change the current layer. - -|Name|Description| -|----|-----------| -|`LT(layer, kc)`|turn on layer (0-15) when held, kc ([basic keycodes](basic_keycodes.md)) when tapped| -|`TO(layer)`|turn on layer when depressed| -|`MO(layer)`|momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)| -|`DF(layer)`|sets the base (default) layer| -|`TG(layer)`|toggle layer on/off| -|`TT(layer)`|tap toggle? idk FIXME| -|`OSL(layer)`|switch to layer for one keycode| - -## Unicode - -These keycodes can be used in conjuction with the [Unicode](unicode_and_additional_language_support.md) support. - -|`UNICODE(n)`/`UC(n)`|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| -|`X(n)`|if `UNICODEMAP_ENABLE`, also sends unicode via a different method| - -# `SAFE_RANGE`, or safely defining custom keycodes - -Sometimes you want to define your own custom keycodes to make your keymap easier to read. QMK provides `SAFE_RANGE` to help you do that. `SAFE_RANGE` is the first available keycode in the `0x0000`-`0xFFFF` range and you can use it when creating your own custom keycode enum: - -``` -enum my_keycodes { - FOO = SAFE_RANGE, - BAR -}; -``` - -You can then use `process_record_user()` to do something with your keycode: - -``` -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case FOO: - // Do something here - break; - case BAR: - // Do something here - break; - } -} -``` diff --git a/docs/redirects.json b/docs/redirects.json new file mode 100644 index 000000000000..11f217a7c906 --- /dev/null +++ b/docs/redirects.json @@ -0,0 +1,12 @@ +{ + "redirects": [ + { + "from": "build_environment_setup.html", + "to": "getting_started_build_tools.html" + }, + { + "from": "make_instructions.html", + "to": "getting_started_make_guide.html" + } + ] +} \ No newline at end of file diff --git a/docs/stenography.md b/docs/stenography.md new file mode 100644 index 000000000000..5b457a2a6c15 --- /dev/null +++ b/docs/stenography.md @@ -0,0 +1,108 @@ +# Stenography in QMK + +[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy). + +The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports + +## Plover with QWERTY Keyboard + +Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar. + +To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys. + +## Plover with Steno Protocol + +Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`. + +When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover. + +In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart. + +> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time. + +### TX Bolt + +TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets. + +### GeminiPR + +GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories. + +## Configuring QMK for Steno + +Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them. + +```Makefile +STENO_ENABLE = yes +MOUSEKEY_ENABLE = no +``` + +In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function: + +```C +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +} +``` + +Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control). + +On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno! + +## Learning Stenography + +* [Learn Plover!](https://sites.google.com/site/ploverdoc/) +* [QWERTY Steno](http://qwertysteno.com/Home/) +* [Steno Jig](https://joshuagrams.github.io/steno-jig/) +* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki + +## Keycode Reference + +As defined in `keymap_steno.h`. + +> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both. + +|GeminiPR|TX Bolt|Steno Key| +|--------|-------|-----------| +|`STN_N1`|`STN_NUM`|Number bar #1| +|`STN_N2`|`STN_NUM`|Number bar #2| +|`STN_N3`|`STN_NUM`|Number bar #3| +|`STN_N4`|`STN_NUM`|Number bar #4| +|`STN_N5`|`STN_NUM`|Number bar #5| +|`STN_N6`|`STN_NUM`|Number bar #6| +|`STN_N7`|`STN_NUM`|Number bar #7| +|`STN_N8`|`STN_NUM`|Number bar #8| +|`STN_N9`|`STN_NUM`|Number bar #9| +|`STN_NA`|`STN_NUM`|Number bar #A| +|`STN_NB`|`STN_NUM`|Number bar #B| +|`STN_NC`|`STN_NUM`|Number bar #C| +|`STN_S1`|`STN_SL`| `S-` upper| +|`STN_S2`|`STN_SL`| `S-` lower| +|`STN_TL`|`STN_TL`| `T-`| +|`STN_KL`|`STN_KL`| `K-`| +|`STN_PL`|`STN_PL`| `P-`| +|`STN_WL`|`STN_WL`| `W-`| +|`STN_HL`|`STN_HL`| `H-`| +|`STN_RL`|`STN_RL`| `R-`| +|`STN_A`|`STN_A`| `A` vowel| +|`STN_O`|`STN_O`| `O` vowel| +|`STN_ST1`|`STN_STR`| `*` upper-left | +|`STN_ST2`|`STN_STR`| `*` lower-left| +|`STN_ST3`|`STN_STR`| `*` upper-right| +|`STN_ST4`|`STN_STR`| `*` lower-right| +|`STN_E`|`STN_E`| `E` vowel| +|`STN_U`|`STN_U`| `U` vowel| +|`STN_FR`|`STN_FR`| `-F`| +|`STN_PR`|`STN_PR`| `-P`| +|`STN_RR`|`STN_RR`| `-R`| +|`STN_BR`|`STN_BR`| `-B`| +|`STN_LR`|`STN_LR`| `-L`| +|`STN_GR`|`STN_GR`| `-G`| +|`STN_TR`|`STN_TR`| `-T`| +|`STN_SR`|`STN_SR`| `-S`| +|`STN_DR`|`STN_DR`| `-D`| +|`STN_ZR`|`STN_ZR`| `-Z`| +|`STN_FN`|| (GeminiPR only)| +|`STN_RES1`||(GeminiPR only)| +|`STN_RES2`||(GeminiPR only)| +|`STN_PWR`||(GeminiPR only)| diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 28927f0eff49..2ac4f3036504 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -3,7 +3,7 @@ This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents: * [QMK Overview](qmk_overview.md) -* [How Keyboards Work](basic_how_keyboards_work.md) +* [How Keyboards Work](how_keyboards_work.md) * [FAQ](faq.md) ## Startup diff --git a/keyboards/9key/9key.c b/keyboards/9key/9key.c new file mode 100644 index 000000000000..ed8e91e73b59 --- /dev/null +++ b/keyboards/9key/9key.c @@ -0,0 +1,5 @@ +#include "9key.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} \ No newline at end of file diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h new file mode 100644 index 000000000000..f1cb30628f00 --- /dev/null +++ b/keyboards/9key/9key.h @@ -0,0 +1,17 @@ +#ifndef NINEKEY_H +#define NINEKEY_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} + +#endif diff --git a/keyboards/9key/Makefile b/keyboards/9key/Makefile new file mode 100644 index 000000000000..4e2a6f00fd8e --- /dev/null +++ b/keyboards/9key/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/9key/config.h b/keyboards/9key/config.h new file mode 100644 index 000000000000..c0a7eb355db5 --- /dev/null +++ b/keyboards/9key/config.h @@ -0,0 +1,52 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bishop Keyboards +#define PRODUCT 9Key +#define DESCRIPTION Bishop Keyboards 9Key // Charleston, SC Meetup Handout + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* 9Key PCB default pin-out */ +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { F4, F5, F6 } +#define UNUSED_PINS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F7 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 1 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define TAPPING_TERM 150 + +#endif diff --git a/keyboards/ergodox/keymaps/jack/Makefile b/keyboards/9key/keymaps/default/Makefile similarity index 100% rename from keyboards/ergodox/keymaps/jack/Makefile rename to keyboards/9key/keymaps/default/Makefile diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c new file mode 100644 index 000000000000..23364e8537a9 --- /dev/null +++ b/keyboards/9key/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +#include "9key.h" + +// Tap Dance Declarations +enum { + ENT_5 = 0 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ,-----------------. + * | 1 | 2 | 3 | + * |-----+-----+-----| + * | 4 |5/ENT| 6 | Dbl Tap 5 for Enter + * |-----+-----+-----| + * | 7 | 8 | FN | + * `-----------------' + */ +[0] = KEYMAP( \ + KC_1, KC_2, KC_3, \ + KC_4, TD(ENT_5), KC_6, \ + KC_7, KC_8, MO(1) \ +), + +/* LAYER 1 + * ,-----------------. + * | 9 | 0 | - | + * |-----+-----+-----| + * | + | * | / | + * |-----+-----+-----| + * | F1 | F2 | | + * `-----------------' + */ +[1] = KEYMAP( \ + KC_9, KC_0, KC_MINS, \ + KC_PLUS, KC_ASTR, KC_SLSH, \ + KC_F1, KC_F2, KC_TRNS \ +) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT) +}; + +void matrix_init_user(void) { +} \ No newline at end of file diff --git a/keyboards/9key/readme.md b/keyboards/9key/readme.md new file mode 100644 index 000000000000..e50329810950 --- /dev/null +++ b/keyboards/9key/readme.md @@ -0,0 +1,17 @@ +9key +=== + +![9key](http://i.imgur.com/a3wWc7h.jpg) +![9KeyBehind](http://i.imgur.com/2PWf5wu.jpg) + +A compact minipad (3x3) keyboard made and sold by Bishop Keyboards. + +Keyboard Maintainer: QMK Community +Hardware Supported: 9key PCB, Pro Micro ATmega32U4 +Hardware Availability: [BishopKeyboards.com](https://www.reddit.com/user/se7en9057) (BishopKeyboards.com under renovation) + +Make example for this keyboard (after setting up your build environment): + + make 9key-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk new file mode 100644 index 000000000000..e252640f7e6e --- /dev/null +++ b/keyboards/9key/rules.mk @@ -0,0 +1,69 @@ +# 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 +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = yes +TAP_DANCE_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index f265c3358e68..83af132dfc62 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -20,12 +20,30 @@ along with this program. If not, see . #include "quantum.h" /* Alps64 keymap definition macro */ + #define KEYMAP( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ K30, K40, K50, K60, K70, K00, K10, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} + +#define KC_KEYMAP( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ + K30, K40, K50, K60, K70, K00, K10, K20 \ ) { \ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 2c45dc7f342d..49ef9b2bf3ab 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -2,7 +2,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ - KEYMAP( \ + KC_KEYMAP( \ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ diff --git a/keyboards/alps64/readme.md b/keyboards/alps64/readme.md index 1798b193a531..f282730490ee 100644 --- a/keyboards/alps64/readme.md +++ b/keyboards/alps64/readme.md @@ -1,4 +1,14 @@ -Alps64 keyboard firmware -====================== +Alps64 +=== -TODO: to be updated. +An Alps-only 60% board designed by Hasu. + +Keyboard Maintainer: QMK Community +Hardware Supported: Alps64 PCB +Hardware Availability: https://geekhack.org/index.php?topic=69666.0 + +Make example for this keyboard (after setting up your build environment): + + make alps64-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/amj40/Makefile b/keyboards/amj40/Makefile new file mode 100755 index 000000000000..4e2a6f00fd8e --- /dev/null +++ b/keyboards/amj40/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/amj40/amj40.c b/keyboards/amj40/amj40.c new file mode 100755 index 000000000000..5a2376999127 --- /dev/null +++ b/keyboards/amj40/amj40.c @@ -0,0 +1,30 @@ +#include "amj40.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<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (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 0x6072 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Han Chen +#define PRODUCT AMJ40 +#define DESCRIPTION qmk port of AMJ40 v2 PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { F4, F5, F6, F7} +#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} +#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 + +/* Underlight configuration + */ + +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/amj40/keymaps/default/Makefile b/keyboards/amj40/keymaps/default/Makefile new file mode 100755 index 000000000000..034e697bc2f2 --- /dev/null +++ b/keyboards/amj40/keymaps/default/Makefile @@ -0,0 +1,27 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/default/build.sh b/keyboards/amj40/keymaps/default/build.sh new file mode 100755 index 000000000000..6b4b4568f54d --- /dev/null +++ b/keyboards/amj40/keymaps/default/build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# adjust for cpu +# -j 16 gave best result on a hyperthreaded quad core core i7 + +LIMIT=10 +THREADS="-j 16" +KMAP=iso_split_rshift + +echo "We need sudo later" +sudo ls 2>&1 /dev/null + +function wait_bootloader { + echo "Waiting for Bootloader..." + local STARTTIME=$(date +"%s") + local REMIND=0 + local EXEC=dfu-programmer + local TARGET=atmega32u4 + while true + do + sudo $EXEC $TARGET get > /dev/null 2>&1 + [ $? -eq 0 ] && break + ENDTIME=$(date +"%s") + DURATION=$(($ENDTIME-$STARTTIME)) + if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] + then + echo "Did you forget to press the reset button?" + REMIND=1 + fi + sleep 1 + done +} +make clean +make KEYMAP=${KMAP} ${THREADS} +if [[ $? -eq 0 ]] +then + echo "please trigger flashing!" + wait_bootloader + sudo make KEYMAP=${KMAP} dfu ${THREADS} +else + echo "make failed" + exit 77 +fi diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c new file mode 100755 index 000000000000..13b48c2ada6c --- /dev/null +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -0,0 +1,173 @@ + + +// 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 "amj40.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 _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + + + + +// increase readability +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default Layer + * ,-----------------------------------------------------------. + * | Esc| Q | W | E | R | T | Y | U | I | O | P | BS | + * |-----------------------------------------------------------| + * | Tab | A | S | D | F | G | H | J | K | L | Ent | + * |-----------------------------------------------------------| + * | LSft | Z | X | C | V | B | N | M | , | . | /? | + * |-----------------------------------------------------------| + * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | + * `-----------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ + KC_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bkspc| + * |-----------------------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | [ | ] | Pipe | + * |-----------------------------------------------------------| + * | F7 | F8 | F9 | F10 | F11 | F12 | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),BL_TOGG, BL_INC, BL_DEC, \ + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| ⏮ | ⏯ | ⏭ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | ⏏ | | * | / |Hone|PgUp| ← | → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL, \ + _______, KC_TRNS, _______, KC_TRNS, KC_TRNS, _______, _______, RGB_TOG \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| ⏮ | ⏯ | ⏭ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | ⏏ | | * | / |Hone|PgUp| ← | → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ + KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + +}; + + + + +enum function_id { + LAUNCH, + RGBLED_TOGGLE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), + +}; + + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + + return MACRO_NONE; +}; + + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/amj40/keymaps/default/readme.md b/keyboards/amj40/keymaps/default/readme.md new file mode 100755 index 000000000000..2659292ae54f --- /dev/null +++ b/keyboards/amj40/keymaps/default/readme.md @@ -0,0 +1,11 @@ +AMJ40 Default Layout +===================== + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +# Features +* Based on a combination of the original AMJ40 keymap from the TMK firmware as well as the Planck Ortholinear keyboard's "Lower," "Raise," and "Adjust" layers. +* View the keymap.c file to understand they layout of the keymap. +* Has keys to toggle both the switch LEDs and underglow LEDs. + diff --git a/keyboards/amj40/keymaps/default/updatemerge.sh b/keyboards/amj40/keymaps/default/updatemerge.sh new file mode 100755 index 000000000000..da5457e19531 --- /dev/null +++ b/keyboards/amj40/keymaps/default/updatemerge.sh @@ -0,0 +1,4 @@ +#!/bin/bash +git checkout amj60 # gets you on branch amj60 +git fetch origin # gets you up to date with origin +git merge origin/master diff --git a/keyboards/amj40/keymaps/fabian/Makefile b/keyboards/amj40/keymaps/fabian/Makefile new file mode 100755 index 000000000000..a914e4c0cec3 --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/Makefile @@ -0,0 +1,27 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c new file mode 100755 index 000000000000..51064b636598 --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -0,0 +1,236 @@ +#include "amj40.h" + +// Set the custom keymap +#undef KEYMAP +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k39, k3a, k3b \ +) { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b}, \ + {k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, k39, k3a, k3b} \ +} + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset |Colemk|Qwerty|Dvorak| | | | | MU | | |Reset | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |AGNorm|AGSwap| | | | | ML | MD | MR | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |AudOn |AudOff| | | | |MBtn1 |MBtn2 |MBtn3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + RESET, COLEMAK, QWERTY, DVORAK, _______, _______, _______, _______, KC_MS_U, _______, _______, RESET, \ + _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \ + _______, AU_ON, AU_OFF, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_BSPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/amj40/readme.md b/keyboards/amj40/readme.md new file mode 100755 index 000000000000..e705f20feafd --- /dev/null +++ b/keyboards/amj40/readme.md @@ -0,0 +1,35 @@ +AMJ40 keyboard firmware +====================== +DIY/Assembled compact 40% keyboard. + +Ported by N.Hou from the original TMK firmware. + +*Supports both backlight LEDs as well as RGB underglow. + +*For reference, the AMJ40 uses pin D3 for underglow lighting. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/amj40 +folder. Once your dev env is setup, you'll be able to type `make` to generate +your .hex - you can then use `make dfu` to program your PCB once you hit the +reset button. + +Depending on which keymap you would like to use, you will have to compile +slightly differently. + +### Default +To build with the default keymap, simply run `sudo make all`. +The .hex file will appear in the root of the qmk firmware folder. + + + + +### Original tmk firmware +The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ40). + + diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk new file mode 100755 index 000000000000..18403ac32803 --- /dev/null +++ b/keyboards/amj40/rules.mk @@ -0,0 +1,66 @@ + +# 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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= 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/amj60/amj60.h b/keyboards/amj60/amj60.h index c508e479ca6b..b6aa6b7d3c04 100644 --- a/keyboards/amj60/amj60.h +++ b/keyboards/amj60/amj60.h @@ -63,6 +63,8 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } +#define LAYOUT_60_ansi KEYMAP_ANSI + /* AMJ60 HHKB matrix layout * ,------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 | @@ -119,6 +121,7 @@ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX}, \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } + /* ISO w/ split right shift key matrix layout * ,-----------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | diff --git a/keyboards/amj60/readme.md b/keyboards/amj60/readme.md index 0896134e0c0c..b7107c7cfb63 100644 --- a/keyboards/amj60/readme.md +++ b/keyboards/amj60/readme.md @@ -1,57 +1,14 @@ -AMJ60 keyboard firmware -====================== -DIY/Assembled compact 60% keyboard. +AMJ60 +=== -## Quantum MK Firmware +A 60% keyboard. -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: AMJ60 +Hardware Availability: https://geekhack.org/index.php?topic=77636.0 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/amj60 -folder. Once your dev env is setup, you'll be able to type `make` to generate -your .hex - you can then use `make dfu` to program your PCB once you hit the -reset button. + make amj60-maximized -Depending on which keymap you would like to use, you will have to compile -slightly differently. - -### Default -To build with the default keymap, simply run `make`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to -define your favorite layout yourself. To define your own keymap create file -named `.c` in the keymaps folder, and see keymap document (you can find -in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with -`KEYMAP` option like: -`` -$ make KEYMAP=[default|jack|] -`` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` -folder. - -## Variations -KEYMAP macros for the following layouts are available: - -* default, for all the available, possible keys -* ANSI, for 60% ANSI keyboard -* ISO -* ISO w/ split right shift key -* HHKB - -Remark: all but "ISO w/ split right shift key" are untested and were done to the best of my knowledge. - -### Original tmk firmware -The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ60). - -## Further information -Since information and documentation for this board are sparse, (at least for non-chinese speaking ppl) here is everything that could be found - -* [geekhack discussion](https://geekhack.org/index.php?topic=53070.0) -* [chinese discussion](https://www.v2ex.com/t/161887) -* Board has [dedicated pinouts](https://i.imgur.com/D0sWhyh.jpg?1) for a bluetooth module -* has pins for external power [picture](https://i.imgur.com/00VrtIp.jpg?1). -* most information comes from [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/32oonr/gh60_pcb_for_your_custom_keyboard/) +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/amj60/rules.mk b/keyboards/amj60/rules.mk index a1b4f8a618da..0df13d3062f6 100644 --- a/keyboards/amj60/rules.mk +++ b/keyboards/amj60/rules.mk @@ -64,3 +64,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/amjpad/readme.md b/keyboards/amjpad/readme.md new file mode 100644 index 000000000000..cf7c197ecd90 --- /dev/null +++ b/keyboards/amjpad/readme.md @@ -0,0 +1,14 @@ +AMJ Pad +=== + +A DIY Keypad Kit + +Keyboard Maintainer: QMK Community +Hardware Supported: AMJ Pad +Hardware Availability: https://geekhack.org/index.php?topic=83546.0 + +Make example for this keyboard (after setting up your build environment): + + make amjpad-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/atomic/atomic.h b/keyboards/atomic/atomic.h index 88e11fadff12..b7ceb68d07ba 100644 --- a/keyboards/atomic/atomic.h +++ b/keyboards/atomic/atomic.h @@ -24,4 +24,20 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ } +#define KEYMAP_GRID( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#define LAYOUT_ortho_5x15 KEYMAP_GRID + #endif \ No newline at end of file diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index c324078dd9aa..4a7cc863e2f1 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -471,7 +471,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) else { audio_on(); - PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); + PLAY_SONG(tone_audio_on); } } break; @@ -486,7 +486,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } else { - PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO); + PLAY_SONG(tone_music_on); layer_on(LAYER_MUSIC); } } @@ -496,7 +496,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { #ifdef AUDIO_ENABLE voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); + PLAY_SONG(music_scale); #endif } break; @@ -506,7 +506,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { #ifdef AUDIO_ENABLE voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); + PLAY_SONG(music_scale); #endif } break; @@ -550,32 +550,32 @@ void led_set_user(uint8_t usb_led) if ((usb_led & (1<event.pressed` (see keymap_default.c). - -```c -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes - } - break; - } - return MACRO_NONE; -}; -``` -A macro can include the following commands: - -* I() change interval of stroke in milliseconds. -* D() press key. -* U() release key. -* T() type key(press and release). -* W() wait (milliseconds). -* END end mark. - -So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. - -Note: Using macros to have your keyboard send passwords for you is a bad idea. - -### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) - -Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - - #include "keymap_.h" - -Where is "colemak" or "dvorak". After including this line, you will get access to: - - * `CM_*` for all of the Colemak-equivalent characters - * `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. - -## Additional language support - -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - -## Unicode support - -You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) -* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_` - sets the backlight to level *n* -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. +Keyboard Maintainer: QMK Community +Hardware Supported: Atreus PCB +Hardware Availability: https://atreus.technomancy.us -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. +Make example for this keyboard (after setting up your build environment): -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + make atreus-default -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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/atreus/rules.mk b/keyboards/atreus/rules.mk index 12d3ca6c56de..2362395569c7 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -78,5 +78,5 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/cu.usbmodem1411 -upload: build - $(ATREUS_UPLOAD_COMMAND) +# upload: build +# $(ATREUS_UPLOAD_COMMAND) diff --git a/keyboards/atreus62/readme.md b/keyboards/atreus62/readme.md index 0245b4f9f05d..d68d1b615b52 100644 --- a/keyboards/atreus62/readme.md +++ b/keyboards/atreus62/readme.md @@ -1,10 +1,16 @@ -atreus62 keyboard firmware -====================== +Atreus +=== -This firmware is for the atreus62 keyboard. - -This version utilizes a Pro Micro for its controller and has a 62 key layout. +A 62 key variant of the Atreus keyboard. https://github.com/profet23/atreus62 -TODO: More information \ No newline at end of file +Keyboard Maintainer: QMK Community +Hardware Supported: Atreus62 PCB +Hardware Availability: http://shop.profetkeyboards.com/product/atreus62-keyboard + +Make example for this keyboard (after setting up your build environment): + + make atreus62-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/bananasplit/Makefile b/keyboards/bananasplit/Makefile new file mode 100644 index 000000000000..57b2ef62e5f3 --- /dev/null +++ b/keyboards/bananasplit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md new file mode 100644 index 000000000000..b059a0834d5f --- /dev/null +++ b/keyboards/bananasplit/README.md @@ -0,0 +1,29 @@ +# BananaSplit60 keyboard firmware + +Ported from evangs/tmk_keyboard + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/bananasplit/bananasplit.c b/keyboards/bananasplit/bananasplit.c new file mode 100644 index 000000000000..1aa8fb1745bd --- /dev/null +++ b/keyboards/bananasplit/bananasplit.c @@ -0,0 +1,28 @@ +#include "bananasplit.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h new file mode 100644 index 000000000000..fa4c13258bfe --- /dev/null +++ b/keyboards/bananasplit/bananasplit.h @@ -0,0 +1,142 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BANANASPLIT_H +#define BANANASPLIT_H + +#include "quantum.h" + +/* +------------------------------------------------------------------------------------------- +| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | +------------------------------------------------------------------------------------------- +| K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | +------------------------------------------------------------------------------------------- +| K20 | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B | K2C | +------------------------------------------------------------------------------------------- +| K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | K3D | +------------------------------------------------------------------------------------------- +| K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | +------------------------------------------------------------------------------------------- +*/ +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} +/* Here is the above keymap filled with KC_TRNS. It's a useful starting point when defining layers. +KEYMAP( \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,\ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ +) +*/ + +#define KEYMAP_HHKBANANA( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ +} + +/* +------------------------------------------------------------------------------------------- +| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K2D | +------------------------------------------------------------------------------------------- +| K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | +------------------------------------------------------------------------------------------- +| K20 | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B | K2C | +------------------------------------------------------------------------------------------- +| K30 | K31 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | K3D | +------------------------------------------------------------------------------------------- +| K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | +------------------------------------------------------------------------------------------- +*/ +#define KEYMAP_ALL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_HHKB_ARROW( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + + +#endif diff --git a/keyboards/bananasplit/config.h b/keyboards/bananasplit/config.h new file mode 100644 index 000000000000..4bb5b85e05d1 --- /dev/null +++ b/keyboards/bananasplit/config.h @@ -0,0 +1,84 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEAE +#define PRODUCT_ID 0x8870 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT BananaSplit 60 +#define DESCRIPTION keyboard firmware for BananaSplit 60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } +#define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 1 + +/* mapping backlight LEDs to correct Pin */ +#define BACKLIGHT_PIN B7 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 +#define TAPPING_TERM 175 + +/* 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/bananasplit/keymaps/0010/Makefile b/keyboards/bananasplit/keymaps/0010/Makefile new file mode 100644 index 000000000000..7d09c322e5e3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +# AUDIO_ENABLE = no # Audio output on port C6 +# UNICODE_ENABLE = no # Unicode +# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/0010/config.h b/keyboards/bananasplit/keymaps/0010/config.h new file mode 100644 index 000000000000..060f5922f2c3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/bananasplit/keymaps/0010/keymap.c b/keyboards/bananasplit/keymaps/0010/keymap.c new file mode 100644 index 000000000000..a1795a1ef498 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2017 Balz Guenat + * + * 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 "bananasplit.h" + +#define ______ KC_TRNS + +/* + This switch layout is ANSI with the following modifications: + Split right shift + 225 125 275 spacebar + Bottom right singles +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Cpslock | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | L1(Space) | LED | Space | Home | End | Left |Rght |Down | +------------------------------------------------------------------------------------------- +*/ +[0] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,\ + KC_LCTL, KC_LGUI, KC_LALT, LT(1,KC_SPACE), BL_TOGG, KC_SPC, KC_HOME, KC_END, KC_LEFT, KC_RGHT, KC_DOWN \ +), +/* +------------------------------------------------------------------------------------------- +| ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +------------------------------------------------------------------------------------------- +| | | UP | | | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| |Left | Down |Right | | | | | | | | | | SLEEP | +------------------------------------------------------------------------------------------- +| | | | | | | | | | | | | | | +------------------------------------------------------------------------------------------- +| | | | | Reset | | | | | | +------------------------------------------------------------------------------------------- +*/ +[1] = 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_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ + ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLEP, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ + ______, ______, ______, ______, RESET, ______, ______, ______, ______, ______, KC_PGDN \ +), +}; + + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/coloneljesus/Makefile b/keyboards/bananasplit/keymaps/coloneljesus/Makefile new file mode 100644 index 000000000000..7d09c322e5e3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +# AUDIO_ENABLE = no # Audio output on port C6 +# UNICODE_ENABLE = no # Unicode +# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h new file mode 100644 index 000000000000..af6cf8ef1f1f --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define GRAVE_ESC_CTRL_OVERRIDE + +#endif diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c new file mode 100644 index 000000000000..5d67079f81cc --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2017 Balz Guenat + * + * 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 "bananasplit.h" + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift |M(0) | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[0] = KEYMAP( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, M(0),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL \ +), +/* +------------------------------------------------------------------------------------------- +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | +------------------------------------------------------------------------------------------- +| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End | | | | PrtSc | +------------------------------------------------------------------------------------------- +| TRNS |Mute |Vol- |Play |PgDn | Del |Left |Down | Up |Right| | | | +------------------------------------------------------------------------------------------- +| | | | | | |DelWL|DelWR| | | | | | +------------------------------------------------------------------------------------------- +| | | | | TRNS | | | | | Reset | +------------------------------------------------------------------------------------------- +*/ +[1] = KEYMAP( \ + ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, \ + KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, ______, ______, ______, KC_PSCR, \ + ______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, LCTL(KC_BSPC), LCTL(KC_DEL), ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: + // Sends Alt+Shift on both key down and key up. + // Fesigned to switch between two keyboard layouts on Windows using a locking switch. + // Does nothing if right shift is pressed for easier resync. + if (!(get_mods() & MOD_BIT(KC_RSFT))) + return MACRO(D(LALT), T(LSFT), U(LALT), END); + else + return MACRO_NONE; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/bananasplit/keymaps/coloneljesus/readme.md b/keyboards/bananasplit/keymaps/coloneljesus/readme.md new file mode 100644 index 000000000000..b9ce5f44a1ef --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/readme.md @@ -0,0 +1,33 @@ +# /u/Coloneljesus's keymap for the Bananasplit + +Default layer: + +``` +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | +------------------------------------------------------------------------------------------- +``` + +Fn1 layer: + +``` +------------------------------------------------------------------------------------------- +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | +------------------------------------------------------------------------------------------- +| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End | | | | PrtSc | +------------------------------------------------------------------------------------------- +| TRNS |Mute |Vol- |Play |PgDn | Del |Left |Down | Up |Right| | | | +------------------------------------------------------------------------------------------- +| | | | | | |DelWL|DelWR| | | | | +------------------------------------------------------------------------------------------- +| | | | | TRNS | | | | | Reset | +------------------------------------------------------------------------------------------- +``` \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/default/Makefile b/keyboards/bananasplit/keymaps/default/Makefile new file mode 100644 index 000000000000..7d09c322e5e3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +# AUDIO_ENABLE = no # Audio output on port C6 +# UNICODE_ENABLE = no # Unicode +# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/default/config.h b/keyboards/bananasplit/keymaps/default/config.h new file mode 100644 index 000000000000..060f5922f2c3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c new file mode 100644 index 000000000000..f07278df9b05 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [LAYER_1] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/default/readme.md b/keyboards/bananasplit/keymaps/default/readme.md new file mode 100644 index 000000000000..aaf6daa08c53 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Bananasplit diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c new file mode 100644 index 000000000000..10593de8dba4 --- /dev/null +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_PSCR, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [LAYER_1] = KEYMAP_HHKBANANA( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c new file mode 100644 index 000000000000..f9794b5b10cc --- /dev/null +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -0,0 +1,45 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define THUMB_LAYER 1 +#define NORMAN_LAYER 2 +#define MOD_LAYER 3 + +#define HYPER_TAB ALL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ + HYPER_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + MO(MOD_LAYER), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ + _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_P, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk new file mode 100644 index 000000000000..04579d4ce614 --- /dev/null +++ b/keyboards/bananasplit/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 = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +BACKLIGHT_ENABLE = yes + + +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/bantam44/readme.md b/keyboards/bantam44/readme.md index 462f67c12458..494800958ece 100644 --- a/keyboards/bantam44/readme.md +++ b/keyboards/bantam44/readme.md @@ -1,25 +1,14 @@ -Bantam44 keyboard firmware -====================== +Bantam-44 +=== -## Quantum MK Firmware +A small mechanical keyboard. -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: Bantam-44 PCB +Hardware Availability: http://www.bantamkeyboards.com -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/Bantam44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make bantam44-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file +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/chibios_test/stm32_f072_onekey/rules.mk b/keyboards/chibios_test/stm32_f072_onekey/rules.mk index eae38c4b2bcd..91c17c0244c9 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/rules.mk +++ b/keyboards/chibios_test/stm32_f072_onekey/rules.mk @@ -35,7 +35,4 @@ ARMV = 6 # Build Options # comment out to disable the options. -# -ifndef QUANTUM_DIR - include ../../../Makefile -endif +# \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/rules.mk b/keyboards/chibios_test/stm32_f103_onekey/rules.mk index 307ca5b198ef..c75738338ab4 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/rules.mk +++ b/keyboards/chibios_test/stm32_f103_onekey/rules.mk @@ -44,9 +44,4 @@ ARMV = 7 # http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf # This also requires a patch to chibios: # /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 - - -ifndef QUANTUM_DIR - include ../../../Makefile -endif +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/rules.mk b/keyboards/chibios_test/teensy_lc_onekey/rules.mk index 43ea9d82d938..4deee1f5792c 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/rules.mk +++ b/keyboards/chibios_test/teensy_lc_onekey/rules.mk @@ -42,8 +42,4 @@ MCU = cortex-m0plus # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 # I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +ARMV = 6 \ No newline at end of file diff --git a/keyboards/clueboard/keymaps/bloodlvst/Makefile b/keyboards/clueboard/keymaps/bloodlvst/Makefile new file mode 100644 index 000000000000..b1c2f32f6ae4 --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/Makefile @@ -0,0 +1,2 @@ +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/keymaps/bloodlvst/config.h b/keyboards/clueboard/keymaps/bloodlvst/config.h new file mode 100644 index 000000000000..320401dbda52 --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS +#define DISABLE_SPACE_CADET_ROLLOVER +#endif diff --git a/keyboards/clueboard/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/keymaps/bloodlvst/keymap.c new file mode 100644 index 000000000000..bedb658eaa9e --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard.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 +// entirely and just use numbers. +#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] = 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, \ + 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, \ + _______, 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, \ + _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), +}; diff --git a/keyboards/clueboard/keymaps/bloodlvst/readme.md b/keyboards/clueboard/keymaps/bloodlvst/readme.md new file mode 100644 index 000000000000..ee287ca476f1 --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![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/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c index 7fad9c1b21a0..2e54fdba8a1e 100644 --- a/keyboards/clueboard/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,7 +15,7 @@ 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_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, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/colemak/keymap.c b/keyboards/clueboard/keymaps/colemak/keymap.c index 42c85ff9d83e..2ed3541862d8 100644 --- a/keyboards/clueboard/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/keymaps/colemak/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,71 +15,27 @@ 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_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, MO(_FL), KC_LGUI,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, _______, \ + 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), + _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ [_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 7fad9c1b21a0..c4da561fe3bb 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,71 +15,27 @@ 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, \ - 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), + 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + 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( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, 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), + 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), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/jokrik/keymap.c b/keyboards/clueboard/keymaps/jokrik/keymap.c index acde4d9e165e..dda6a8b907b0 100644 --- a/keyboards/clueboard/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/keymaps/jokrik/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index e72733092f21..e39edb4d6e41 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,64 +15,27 @@ 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, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + 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( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, 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), + 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), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - if (record->event.pressed) { - /* The key is being pressed. - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - if (mods_pressed) { - register_code(KC_GRV); - } else { - register_code(KC_ESC); - } - } else { - /* The key is being released. - */ - if (mods_pressed) { - mods_pressed = false; - unregister_code(KC_GRV); - } else { - unregister_code(KC_ESC); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/magicmonty/keymap.c b/keyboards/clueboard/keymaps/magicmonty/keymap.c index 3d00332b0901..feef00e7a2f0 100644 --- a/keyboards/clueboard/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/keymaps/magicmonty/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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 #define xxxxxxx KC_NO @@ -45,16 +44,13 @@ // CTRL when held, ESC when tapped #define CTL_ESC CTL_T(KC_ESC) -// ESC/Grave mode -#define ESC_GRV F(0) - // Reset RGB mode to layer signalling -#define RGB_RST F(1) +#define RGB_RST F(0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - ESC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, \ + KC_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, \ @@ -116,44 +112,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_FUNCTION(1), // Calls action_function() }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - switch (id) { case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: if (record->event.pressed) { rgblight_mode(1); rgblight_sethsv(206, 255, 255); diff --git a/keyboards/clueboard/keymaps/maximised/keymap.c b/keyboards/clueboard/keymaps/maximised/keymap.c index ebaefa66908a..583c5209175a 100644 --- a/keyboards/clueboard/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/keymaps/maximised/keymap.c @@ -39,9 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -const uint16_t PROGMEM fn_actions[] = { -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { -}; diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c index d3108d1e2b54..259fa29b745f 100644 --- a/keyboards/clueboard/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -17,7 +16,7 @@ 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_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, \ @@ -50,47 +49,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, 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), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/serubin/keymap.c b/keyboards/clueboard/keymaps/serubin/keymap.c index 18446eb31d7f..4212e6a52935 100644 --- a/keyboards/clueboard/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/keymaps/serubin/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -51,53 +50,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: - if(record->event.pressed) { - del_key(KC_ESC); - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c index 83ae1d615490..be29a0a174d9 100644 --- a/keyboards/clueboard/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,7 +15,7 @@ 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_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, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index 47dee8e6d4d9..81e47811fa05 100644 --- a/keyboards/clueboard/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,7 +15,7 @@ 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_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, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/smt/keymap.c b/keyboards/clueboard/keymaps/smt/keymap.c index f097afaa8d29..6797faaa3f1a 100644 --- a/keyboards/clueboard/keymaps/smt/keymap.c +++ b/keyboards/clueboard/keymaps/smt/keymap.c @@ -19,7 +19,6 @@ enum planck_keycodes { // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO -#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)) // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl @@ -42,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_QWERTY] = 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_BSLS, KC_GRV, KC_PGUP, \ + 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, \ @@ -62,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_COLEMAK] = 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_BSLS, KC_GRV, KC_PGUP, \ + 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, \ @@ -82,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( - F(0), 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, \ + 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, \ @@ -107,50 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -178,4 +133,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/clueboard/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/keymaps/unix_optimized/keymap.c index 7c1359954bae..0de247ca0c72 100644 --- a/keyboards/clueboard/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/unix_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,7 +15,7 @@ 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_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, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/win_optimized/keymap.c b/keyboards/clueboard/keymaps/win_optimized/keymap.c index c5553ff1fbd4..ad02fd59f20c 100644 --- a/keyboards/clueboard/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/win_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // 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. @@ -16,7 +15,7 @@ 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_INS, \ + 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, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/xyverz/keymap.c b/keyboards/clueboard/keymaps/xyverz/keymap.c index 453911973100..540cd7983369 100644 --- a/keyboards/clueboard/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/keymaps/xyverz/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_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_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ @@ -76,36 +76,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/rev1/rules.mk b/keyboards/clueboard/rev1/rules.mk index 80a942d06f7c..f845616741c2 100644 --- a/keyboards/clueboard/rev1/rules.mk +++ b/keyboards/clueboard/rev1/rules.mk @@ -1,5 +1 @@ -BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/clueboard/rev2/rules.mk b/keyboards/clueboard/rev2/rules.mk index cea967b7955c..54a2685bf634 100644 --- a/keyboards/clueboard/rev2/rules.mk +++ b/keyboards/clueboard/rev2/rules.mk @@ -1,5 +1 @@ -BACKLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR - include ../../../Makefile -endif +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk index f852a01840d8..74bfcfe745d1 100644 --- a/keyboards/clueboard/rules.mk +++ b/keyboards/clueboard/rules.mk @@ -92,7 +92,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # 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 diff --git a/keyboards/cluecard/keymaps/default/keymap.c b/keyboards/cluecard/keymaps/default/keymap.c index 517afe867b47..cd87750a8149 100644 --- a/keyboards/cluecard/keymaps/default/keymap.c +++ b/keyboards/cluecard/keymaps/default/keymap.c @@ -36,13 +36,13 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { if (record->event.pressed) { switch (id) { case 0: - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); break; case 1: - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); break; case 2: - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); break; } } diff --git a/keyboards/ergodox/infinity/Makefile b/keyboards/converter/usb_usb/Makefile similarity index 100% rename from keyboards/ergodox/infinity/Makefile rename to keyboards/converter/usb_usb/Makefile diff --git a/keyboards/converter/usb_usb/README.md b/keyboards/converter/usb_usb/README.md new file mode 100644 index 000000000000..c1904a8122ff --- /dev/null +++ b/keyboards/converter/usb_usb/README.md @@ -0,0 +1,74 @@ +USB to USB keyboard protocol converter +====================================== +A small device to connect between your USB keyboard and your PC that makes (almost) every keyboard fully programmable. +Original code from the [TMK firmware](https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb). Ported to QMK by [Balz Guenat](https://github.com/BalzGuenat). + +Keyboard Maintainer: [Balz Guenat](https://github.com/BalzGuenat) +Hardware Supported: [Hasu's USB-USB converter](https://geekhack.org/index.php?topic=69169.0), [Pro Micro + USB Host Shield](https://geekhack.org/index.php?topic=80421.0), maybe more +Hardware Availability: [GH thread](https://geekhack.org/index.php?topic=72052.0), self-built + +Make example for this keyboard (after setting up your build environment): + + make converter-usb_usb-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. + +Troubleshooting & Known Issues +------------------------------ +The Pro Micro variant runs at 8MHz, hence the following line in `usb_usb/rules.mk`: +`F_CPU ?= 8000000` +If the firmware doesn't work, try changing that line to +`F_CPU ?= 16000000` +or override the `F_CPU` variable in the `rules.mk` of your keymap. + +Getting the Hardware +-------------------- +There are two options to get a converter: You can buy one from Hasu or build one yourself. + +### Buy a Converter +You can buy a fully assembled converter from me here: +https://geekhack.org/index.php?topic=69169.0 + +### Build one yourself using Arduino Leonardo + Circuit@Home USB Host Shield 2.0 +Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be better, you won't need even soldering iron. +http://arduino.cc/en/Main/ArduinoBoardLeonardo +https://www.circuitsathome.com/arduino_usb_host_shield_projects/ + +Other compatible boards like Arduino's Shield will also work well but I think Sparkfun's needs to be modified. +http://arduino.cc/en/Main/ArduinoUSBHostShield +https://www.sparkfun.com/products/9947 + +Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing. +[Build guide](https://geekhack.org/index.php?topic=80421.0) +https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +https://www.sparkfun.com/products/12587 +https://www.pjrc.com/teensy/td_libs_USBHostShield.html + +Limitations +---------- +Only supports 'HID Boot protocol'. +Note that the converter can host only USB "boot protocol" keyboard(6KRO), not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market. + +Resources +-------- +Hasu's main thread for the converter + https://geekhack.org/index.php?topic=69169.0 +Build guide for the Pro Micro variant + https://geekhack.org/index.php?topic=80421.0 +Original TMK version of the converter + https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb +USB Host Shield 2.0 + https://www.circuitsathome.com/arduino_usb_host_shield_projects/ +USB Host Shield 2.0 source + https://github.com/felis/USB_Host_Shield_2.0 +Arduino USB Host Shield (with bootst converter) + http://arduino.cc/en/Main/ArduinoUSBHostShield +Arduino source + https://github.com/arduino/Arduino +Initial release of TMK USB-USB converter + https://geekhack.org/index.php?topic=33057.msg653549#msg653549 + http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854 +Arduino-based hardware keyboard remapper - Colemak forum + http://forum.colemak.com/viewtopic.php?id=1561 +Teensy + Host Shield + http://www.pjrc.com/teensy/td_libs_USBHostShield.html diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h new file mode 100644 index 000000000000..591d80f32dd8 --- /dev/null +++ b/keyboards/converter/usb_usb/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2017 Balz Guenat + +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 + +// do not #include "config_common.h" because the pin names conflict with the USB HID code. +// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves. +// It's a hack, yeah... +#define CUSTOM_MATRIX 2 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x005B +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK +#define PRODUCT QMK USB-USB Converter +#define DESCRIPTION USB to USB Keyboard Converter with QMK + + +/* size of virtual matrix */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 16 + +/* matrix scanning is done in custom_matrix.cpp */ +#define DIODE_DIRECTION CUSTOM_MATRIX + +/* 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/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp new file mode 100644 index 000000000000..93d13edf0b55 --- /dev/null +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -0,0 +1,238 @@ +/* +Copyright 2016 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +// USB HID host +#include "Usb.h" +#include "usbhub.h" +#include "hid.h" +#include "hidboot.h" +#include "parser.h" + +#include "keycode.h" +#include "util.h" +#include "print.h" +#include "debug.h" +#include "timer.h" +#include "matrix.h" +#include "led.h" +#include "host.h" +#include "keyboard.h" + + +/* KEY CODE to Matrix + * + * HID keycode(1 byte): + * Higher 5 bits indicates ROW and lower 3 bits COL. + * + * 7 6 5 4 3 2 1 0 + * +---------------+ + * | ROW | COL | + * +---------------+ + * + * Matrix space(16 * 16): + * r\c0123456789ABCDEF + * 0 +----------------+ + * : | | + * : | | + * 16 +----------------+ + */ +#define ROW_MASK 0xF0 +#define COL_MASK 0x0F +#define CODE(row, col) (((row) << 4) | (col)) +#define ROW(code) (((code) & ROW_MASK) >> 4) +#define COL(code) ((code) & COL_MASK) +#define ROW_BITS(code) (1 << COL(code)) + + +// Integrated key state of all keyboards +static report_keyboard_t keyboard_report; + +static bool matrix_is_mod = false; + +/* + * USB Host Shield HID keyboards + * This supports two cascaded hubs and four keyboards + */ +USB usb_host; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); +HIDBoot kbd1(&usb_host); +HIDBoot kbd2(&usb_host); +HIDBoot kbd3(&usb_host); +HIDBoot kbd4(&usb_host); +KBDReportParser kbd_parser1; +KBDReportParser kbd_parser2; +KBDReportParser kbd_parser3; +KBDReportParser kbd_parser4; + + +extern "C" +{ + uint8_t matrix_rows(void) { return MATRIX_ROWS; } + uint8_t matrix_cols(void) { return MATRIX_COLS; } + bool matrix_has_ghost(void) { return false; } + void matrix_init(void) { + // USB Host Shield setup + usb_host.Init(); + kbd1.SetReportParser(0, (HIDReportParser*)&kbd_parser1); + kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); + kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); + kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + } + + static void or_report(report_keyboard_t report) { + // integrate reports into keyboard_report + keyboard_report.mods |= report.mods; + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(report.keys[i])) { + for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) { + if (! keyboard_report.keys[j]) { + keyboard_report.keys[j] = report.keys[i]; + break; + } + } + } + } + } + + uint8_t matrix_scan(void) { + static uint16_t last_time_stamp1 = 0; + static uint16_t last_time_stamp2 = 0; + static uint16_t last_time_stamp3 = 0; + static uint16_t last_time_stamp4 = 0; + + // check report came from keyboards + if (kbd_parser1.time_stamp != last_time_stamp1 || + kbd_parser2.time_stamp != last_time_stamp2 || + kbd_parser3.time_stamp != last_time_stamp3 || + kbd_parser4.time_stamp != last_time_stamp4) { + + last_time_stamp1 = kbd_parser1.time_stamp; + last_time_stamp2 = kbd_parser2.time_stamp; + last_time_stamp3 = kbd_parser3.time_stamp; + last_time_stamp4 = kbd_parser4.time_stamp; + + // clear and integrate all reports + keyboard_report = {}; + or_report(kbd_parser1.report); + or_report(kbd_parser2.report); + or_report(kbd_parser3.report); + or_report(kbd_parser4.report); + + matrix_is_mod = true; + + dprintf("state: %02X %02X", keyboard_report.mods, keyboard_report.reserved); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + dprintf(" %02X", keyboard_report.keys[i]); + } + dprint("\r\n"); + } else { + matrix_is_mod = false; + } + + uint16_t timer; + timer = timer_read(); + usb_host.Task(); + timer = timer_elapsed(timer); + if (timer > 100) { + dprintf("host.Task: %d\n", timer); + } + + static uint8_t usb_state = 0; + if (usb_state != usb_host.getUsbTaskState()) { + usb_state = usb_host.getUsbTaskState(); + dprintf("usb_state: %02X\n", usb_state); + + // restore LED state when keyboard comes up + if (usb_state == USB_STATE_RUNNING) { + dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low"); + keyboard_set_leds(host_keyboard_leds()); + } + } + return 1; + } + + bool matrix_is_modified(void) { + return matrix_is_mod; + } + + bool matrix_is_on(uint8_t row, uint8_t col) { + uint8_t code = CODE(row, col); + + if (IS_MOD(code)) { + if (keyboard_report.mods & ROW_BITS(code)) { + return true; + } + } + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (keyboard_report.keys[i] == code) { + return true; + } + } + return false; + } + + matrix_row_t matrix_get_row(uint8_t row) { + uint16_t row_bits = 0; + + if (IS_MOD(CODE(row, 0)) && keyboard_report.mods) { + row_bits |= keyboard_report.mods; + } + + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(keyboard_report.keys[i])) { + if (row == ROW(keyboard_report.keys[i])) { + row_bits |= ROW_BITS(keyboard_report.keys[i]); + } + } + } + return row_bits; + } + + uint8_t matrix_key_count(void) { + uint8_t count = 0; + + count += bitpop(keyboard_report.mods); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(keyboard_report.keys[i])) { + count++; + } + } + return count; + } + + void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < matrix_rows(); row++) { + xprintf("%02d: ", row); + print_bin_reverse16(matrix_get_row(row)); + print("\n"); + } + } + + void led_set(uint8_t usb_led) + { + kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); + } + +}; diff --git a/keyboards/converter/usb_usb/keymap.c b/keyboards/converter/usb_usb/keymap.c new file mode 100644 index 000000000000..16f2a28092b6 --- /dev/null +++ b/keyboards/converter/usb_usb/keymap.c @@ -0,0 +1,288 @@ +/* +Copyright 2017 Balz Guenat + +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 "keymap_common.h" + + +const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + // KEYMAP_ALL( + // F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + // ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + // GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + // TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + // CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + // LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + // LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + // ), + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,MPRV,VOLU,MNXT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,MUTE,VOLD,MPLY,TRNS,TRNS,LEFT,DOWN,UP, RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +// const action_t fn_actions[] PROGMEM = {}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), +}; + + + +/* + * Keymap samples + */ +#if 0 + /* ANSI layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT + ), + + /* ISO layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft|\ | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |HNK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_ISO( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* JIS layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_JIS( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JPY, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* Colemak http://colemak.com + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| + * |-----------------------------------------------------------| + * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| + * |-----------------------------------------------------------| + * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return | + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, O, E, U, I, D, H, T, N, S, MINS, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,SCLN,Q, J, K, X, B, M, W, V, Z, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/ + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| + * |-----------------------------------------------------------| + * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, S, H, T, G, Y, N, E, O, I, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + +/* + * SpaceFN layout + * http://geekhack.org/index.php?topic=51069.0 + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: plain Qwerty + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |LCtrl | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* 1: SpaceFN + * ,-----------------------------------------------------------. + * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * |Caps | | |Esc| | | |Hom|Up |End|Psc|Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | | | | | | |PgU|Lef|Dow|Rig| | | | + * |-----------------------------------------------------------| + * | | | | | |Spc|PgD|` |~ | |Men| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [1] = KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde +}; + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile b/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile new file mode 100644 index 000000000000..f5c054505987 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/config.h b/keyboards/converter/usb_usb/keymaps/coloneljesus/config.h new file mode 100644 index 000000000000..7fa3bf328ec9 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c new file mode 100644 index 000000000000..0cc66fd53dca --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c @@ -0,0 +1,307 @@ +/* +Copyright 2017 Balz Guenat + +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 "usb_usb.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + // KEYMAP_ALL( + // F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + // ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + // GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + // TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + // CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + // LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + // LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + // ), + KEYMAP_ALL( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + 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_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + KEYMAP_ALL( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + KC_GRV, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, KC_MUTE, KC_VOLD, KC_MPLY, ______, ______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, ______,______,______, ______, ______,______, ______,______ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + default: + 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) { + +} + +/* + * Keymap samples + */ +#if 0 + /* ANSI layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT + ), + + /* ISO layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft|\ | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |HNK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_ISO( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* JIS layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_JIS( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JPY, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* Colemak http://colemak.com + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| + * |-----------------------------------------------------------| + * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| + * |-----------------------------------------------------------| + * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return | + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, O, E, U, I, D, H, T, N, S, MINS, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,SCLN,Q, J, K, X, B, M, W, V, Z, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/ + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| + * |-----------------------------------------------------------| + * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, S, H, T, G, Y, N, E, O, I, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + +/* + * SpaceFN layout + * http://geekhack.org/index.php?topic=51069.0 + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: plain Qwerty + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |LCtrl | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* 1: SpaceFN + * ,-----------------------------------------------------------. + * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * |Caps | | |Esc| | | |Hom|Up |End|Psc|Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | | | | | | |PgU|Lef|Dow|Rig| | | | + * |-----------------------------------------------------------| + * | | | | | |Spc|PgD|` |~ | |Men| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [1] = KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde +}; + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/default/Makefile b/keyboards/converter/usb_usb/keymaps/default/Makefile new file mode 100644 index 000000000000..f5c054505987 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/keyboards/converter/usb_usb/keymaps/default/config.h b/keyboards/converter/usb_usb/keymaps/default/config.h new file mode 100644 index 000000000000..7fa3bf328ec9 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/default/keymap.c b/keyboards/converter/usb_usb/keymaps/default/keymap.c new file mode 100644 index 000000000000..9817a607d38b --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* +Copyright 2017 Balz Guenat + +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 "usb_usb.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + 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_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + 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_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [1] = KEYMAP_ALL( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + default: + return MACRO_NONE; + } +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/usb_usb/main.c b/keyboards/converter/usb_usb/main.c new file mode 100644 index 000000000000..76e88922cb41 --- /dev/null +++ b/keyboards/converter/usb_usb/main.c @@ -0,0 +1,102 @@ +#include +#include +#include +#include + +// LUFA +#include "lufa.h" + +#include "sendchar.h" +#include "debug.h" +#include "keyboard.h" +#include "led.h" + + +/* LED ping configuration */ +#define TMK_LED +//#define LEONARDO_LED +#if defined(TMK_LED) +// For TMK converter and Teensy +#define LED_TX_INIT (DDRD |= (1<<6)) +#define LED_TX_ON (PORTD |= (1<<6)) +#define LED_TX_OFF (PORTD &= ~(1<<6)) +#define LED_TX_TOGGLE (PORTD ^= (1<<6)) +#elif defined(LEONARDO_LED) +// For Leonardo(TX LED) +#define LED_TX_INIT (DDRD |= (1<<5)) +#define LED_TX_ON (PORTD &= ~(1<<5)) +#define LED_TX_OFF (PORTD |= (1<<5)) +#define LED_TX_TOGGLE (PORTD ^= (1<<5)) +#else +#define LED_TX_INIT +#define LED_TX_ON +#define LED_TX_OFF +#define LED_TX_TOGGLE +#endif + + +static void LUFA_setup(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ +#if (F_CPU == 8000000) + clock_prescale_set(clock_div_2); // 16MHz crystal divided by 2 +#else + clock_prescale_set(clock_div_1); +#endif + + // Leonardo needs. Without this USB device is not recognized. + USB_Disable(); + + USB_Init(); + + // for Console_Task + USB_Device_EnableSOFEvents(); + print_set_sendchar(sendchar); +} + + + +int main(void) +{ + // LED for debug + LED_TX_INIT; + LED_TX_ON; + + debug_enable = true; + debug_keyboard = true; + + host_set_driver(&lufa_driver); + keyboard_init(); + + LUFA_setup(); + + /* NOTE: Don't insert time consuming job here. + * It'll cause unclear initialization failure when DFU reset(worm start). + */ + sei(); + +/* Some keyboards bootup quickly and cannot be initialized with this startup wait. + // wait for startup of sendchar routine + while (USB_DeviceState != DEVICE_STATE_Configured) ; + if (debug_enable) { + _delay_ms(1000); + } +*/ + + debug("init: done\n"); + + for (;;) { + keyboard_task(); + +#if !defined(INTERRUPT_CONTROL_ENDPOINT) + // LUFA Task for control request + USB_USBTask(); +#endif + } + + return 0; +} diff --git a/keyboards/converter/usb_usb/matrix.c b/keyboards/converter/usb_usb/matrix.c new file mode 100644 index 000000000000..b077febd74dc --- /dev/null +++ b/keyboards/converter/usb_usb/matrix.c @@ -0,0 +1 @@ +// Intentionally left empty. This file must exist for this board to build. diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk new file mode 100644 index 000000000000..4ee6cdb1ce63 --- /dev/null +++ b/keyboards/converter/usb_usb/rules.mk @@ -0,0 +1,66 @@ +# 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 ?= 8000000 + + +# +# 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 +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 ?= yes # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE ?= yes + + +CUSTOM_MATRIX = yes +SRC = custom_matrix.cpp +include $(TMK_DIR)/protocol/usb_hid.mk diff --git a/keyboards/converter/usb_usb/usb_usb.c b/keyboards/converter/usb_usb/usb_usb.c new file mode 100644 index 000000000000..e7657938d2e2 --- /dev/null +++ b/keyboards/converter/usb_usb/usb_usb.c @@ -0,0 +1 @@ +#include "usb_usb.h" \ No newline at end of file diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h new file mode 100644 index 000000000000..c31fae1d0fa3 --- /dev/null +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -0,0 +1,203 @@ +/* +Copyright 2017 Balz Guenat + +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 USB_USB_H +#define USB_USB_H + +#include "quantum.h" + +#define ______ KC_TRNS + +/* ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + * + * + * App: Windows Menu key + * Gui: Windows key, Mac ⌘ key or Meta key + * + * Pwr: Power for Unix and Mac + * VDn,Vup,Mut: Volume control for Unix and Mac + * Stp,Agn..: for Unix + * + * KP,: Brazilian Keypad Comma + * KP=: Keypad = for Mac + * <,#: ISO keys(UK legend) + * JPY: Japanese Yen(¥) + * RO: Japanese ろ or Brazilian / + * MHEN: Japanese 無変換 Non Conversion + * HENK: Japanese 変換 Conversion + * KANA: Japanese かな Hiragana/Katakana + * https://en.wikipedia.org/wiki/Keyboard_layout#Japanese + * H/E: Korean 한/영 Hangul/English + * HNJ: Korean 한자 Hanja + * https://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29 + * + * TODO: use same keycode to pass through instead of KC_NO? + */ +#define KEYMAP_ALL( \ + K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ + KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, K66, K67, /* 60-67 */ \ + K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ + { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ + K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ + { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { K90, K91, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| +| + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP( \ + K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E, K5F,K60,K61, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \ + KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \ + KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO, K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, KC_NO, K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP_ISO( \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \ + KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO, K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K32, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP_JIS( \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ + KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \ + KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K32, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,K8B,KC_NO, K2C, KC_NO, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) +#endif diff --git a/keyboards/ergodox/Makefile b/keyboards/deltasplit75/Makefile similarity index 62% rename from keyboards/ergodox/Makefile rename to keyboards/deltasplit75/Makefile index 7165350050a6..d1dec533021f 100644 --- a/keyboards/ergodox/Makefile +++ b/keyboards/deltasplit75/Makefile @@ -1,5 +1,5 @@ -SUBPROJECT_DEFAULT = ez +SUBPROJECT_DEFAULT = v2 ifndef MAKEFILE_INCLUDED include ../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/deltasplit75/config.h b/keyboards/deltasplit75/config.h new file mode 100644 index 000000000000..89d328be6431 --- /dev/null +++ b/keyboards/deltasplit75/config.h @@ -0,0 +1,29 @@ +/* +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" + +#ifdef SUBPROJECT_protosplit + #include "protosplit/config.h" +#endif +#ifdef SUBPROJECT_v2 + #include "v2/config.h" +#endif +#endif diff --git a/keyboards/deltasplit75/deltasplit75.c b/keyboards/deltasplit75/deltasplit75.c new file mode 100644 index 000000000000..6a73db4cd6fd --- /dev/null +++ b/keyboards/deltasplit75/deltasplit75.c @@ -0,0 +1 @@ +#include "deltasplit75.h" \ No newline at end of file diff --git a/keyboards/deltasplit75/deltasplit75.h b/keyboards/deltasplit75/deltasplit75.h new file mode 100644 index 000000000000..9db16c78c298 --- /dev/null +++ b/keyboards/deltasplit75/deltasplit75.h @@ -0,0 +1,13 @@ +#ifndef DELTASPLIT75_H +#define DELTASPLIT75_H + +#ifdef SUBPROJECT_v2 + #include "v2.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "protosplit.h" +#endif + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/deltasplit75/eeprom-lefthand.eep b/keyboards/deltasplit75/eeprom-lefthand.eep new file mode 100644 index 000000000000..b9666a74c01f --- /dev/null +++ b/keyboards/deltasplit75/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000001F4 +:00000001FF diff --git a/keyboards/deltasplit75/eeprom-righthand.eep b/keyboards/deltasplit75/eeprom-righthand.eep new file mode 100644 index 000000000000..94cc5be7fc68 --- /dev/null +++ b/keyboards/deltasplit75/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000000F5 +:00000001FF diff --git a/keyboards/deltasplit75/i2c.c b/keyboards/deltasplit75/i2c.c new file mode 100644 index 000000000000..084c890c405f --- /dev/null +++ b/keyboards/deltasplit75/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + +#endif diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h new file mode 100644 index 000000000000..4fb2554e0dce --- /dev/null +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c new file mode 100644 index 000000000000..e2657bfa2a3f --- /dev/null +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP_V2( + 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_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, + 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_SLCK, + 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_TRNS, KC_ENT, KC_PAUS, //modify KC_TRNS to enable ISO Support + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_V2( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLU, 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, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/Makefile b/keyboards/deltasplit75/keymaps/itsaferbie/Makefile new file mode 100644 index 000000000000..bab3b4c56471 --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/Makefile @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +AUDIO_ENABLE = no # Audio disabled while using RGB underlight. +EXTRAKEY_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/config.h b/keyboards/deltasplit75/keymaps/itsaferbie/config.h new file mode 100644 index 000000000000..4fb2554e0dce --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/config.h @@ -0,0 +1,31 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c new file mode 100644 index 000000000000..82c292f499ef --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c @@ -0,0 +1,46 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + *,-----------------------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| + * |----------------------------------------------------------------------| + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home| + * |----------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp| + * |----------------------------------------------------------------------| + * |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown| + * |----------------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End| + * |----------------------------------------------------------------------| + * |CapsLo|Gui |Alt |Sp |Mod | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig| + * `----------------------------------------------------------------------' + */ + KEYMAP_V2( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is unneeded ISO enter key. + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is uneeded ISO layout key. + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_V2( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_STOP, KC_MNXT), + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/keymaps/protosplit/config.h b/keyboards/deltasplit75/keymaps/protosplit/config.h new file mode 100644 index 000000000000..4fb2554e0dce --- /dev/null +++ b/keyboards/deltasplit75/keymaps/protosplit/config.h @@ -0,0 +1,31 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c new file mode 100644 index 000000000000..d8db2b88e1aa --- /dev/null +++ b/keyboards/deltasplit75/keymaps/protosplit/keymap.c @@ -0,0 +1,32 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP_PROTOSPLIT( + 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_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, + 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_SLCK, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PAUS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_PROTOSPLIT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLU, 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, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c new file mode 100644 index 000000000000..13896900421f --- /dev/null +++ b/keyboards/deltasplit75/matrix.c @@ -0,0 +1,318 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_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) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + + matrix_scan_quantum(); + + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/deltasplit75/readme.md b/keyboards/deltasplit75/readme.md new file mode 100644 index 000000000000..04ed35c29e5d --- /dev/null +++ b/keyboards/deltasplit75/readme.md @@ -0,0 +1,137 @@ +DeltaSplit75 +====== + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ and https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split + +Credit to ahtn and wootpatoot for work on the split keyboard firmware + +Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 +based boards. + +## Case Files +Files are available here: https://github.com/xyxjj/DeltaSplit75-Case-files + +## Build Guide +The build guide should be found at https://qmk.fm/deltasplit75 + + +## First Time Setup + +Download or clone the whole firmware and navigate to the keyboards/deltasplit75 directory. Once your dev env is setup, you'll be able to generate the .hex using: + +``` +make v2 + +or + +make v2-YOUR_KEYMAP_NAME (if you make a folder for your keymap) + +or + +make protosplit (if you have one of the prototype PCBs) +``` + +You will see a lot of output and if everything worked correctly you will see the built hex files: + +``` +deltasplit75_v2_protosplit.hex + +or + +deltasplit74_v2_YOUR_KEYMAP_NAME.hex + +or + +deltasplit75_v2_default.hex + +``` + + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + +### DeltaSplit75 V2 +The PCBs available in groupbuy are all v2, if you've bought one of my prototype PCBs (it says DeltaSplit65 on the silkscreen instead of 75), use the code make protosplit instead + +Features +-------- + +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* 75% formfactor +* Support for multiple Bottom Rows +* RGB underglow support +* Split Backspace and ISO support + + +Flashing +------- +I personally use xLoader to upload my hex files to the keyboard, though any other working software is fine too + + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk new file mode 100644 index 000000000000..1aee5313c1ee --- /dev/null +++ b/keyboards/deltasplit75/rules.mk @@ -0,0 +1,75 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# 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 to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 ?= yes +USE_I2C ?= yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c new file mode 100644 index 000000000000..6faed09ce077 --- /dev/null +++ b/keyboards/deltasplit75/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/deltasplit75/serial.h b/keyboards/deltasplit75/serial.h new file mode 100644 index 000000000000..6ef52019a856 --- /dev/null +++ b/keyboards/deltasplit75/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2) +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/deltasplit75/split_util.c b/keyboards/deltasplit75/split_util.c new file mode 100644 index 000000000000..226dc1881631 --- /dev/null +++ b/keyboards/deltasplit75/split_util.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< + +#ifdef EE_HANDS + #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 + #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END +#endif + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +#endif diff --git a/keyboards/deltasplit75/v2/Makefile b/keyboards/deltasplit75/v2/Makefile new file mode 100644 index 000000000000..4e2a6f00fd8e --- /dev/null +++ b/keyboards/deltasplit75/v2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h new file mode 100644 index 000000000000..0f4b806e2db1 --- /dev/null +++ b/keyboards/deltasplit75/v2/config.h @@ -0,0 +1,90 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER xyxjj +#define PRODUCT DeltaSplit75 +#define DESCRIPTION 75% split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 14 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1} + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif \ No newline at end of file diff --git a/keyboards/deltasplit75/v2/rules.mk b/keyboards/deltasplit75/v2/rules.mk new file mode 100644 index 000000000000..80a942d06f7c --- /dev/null +++ b/keyboards/deltasplit75/v2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/deltasplit75/v2/v2.c b/keyboards/deltasplit75/v2/v2.c new file mode 100644 index 000000000000..a7ee1fa8a51e --- /dev/null +++ b/keyboards/deltasplit75/v2/v2.c @@ -0,0 +1,14 @@ +#include "deltasplit75.h" + +void matrix_init_kb(void) { + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h new file mode 100644 index 000000000000..985a8b267f40 --- /dev/null +++ b/keyboards/deltasplit75/v2/v2.h @@ -0,0 +1,62 @@ +#ifndef V2_H +#define V2_H + +#include "deltasplit75.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); +//matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps +//the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO +#define KEYMAP_V2( \ + K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ + K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ + K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ + K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K106, K107, K135, \ + K40, K53, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \ + K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + { K50, K51, K52, K53, K54, K55, KC_NO, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K70 , K71, K72, K73, K74, K75, K76, K77}, \ + { K80, K81, K82, K83, K84, K85, K86, K87}, \ + { K90, K91, K92, K93, K94, K95, K96, K97}, \ + { K100, K101, K102, K103, K104, K105, K106, K107}, \ + { K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \ + { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ + } + +#define KEYMAP_PROTOSPLIT( \ + K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ + K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ + K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ + K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K107, K135, \ + K40, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \ + K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + { K50, K51, K52, KC_NO, K54, K55, KC_NO, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K70 , K71, K72, K73, K74, K75, K76, K77}, \ + { K80, K81, K82, K83, K84, K85, K86, K87}, \ + { K90, K91, K92, K93, K94, K95, K96, K97}, \ + { K100, K101, K102, K103, K104, K105, KC_NO, K107}, \ + { K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \ + { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/Makefile b/keyboards/eco/Makefile index 30b43c4eaa84..b9bada8f8d73 100644 --- a/keyboards/eco/Makefile +++ b/keyboards/eco/Makefile @@ -1,4 +1,4 @@ -SUBPROJECT_DEFAULT = rev1 +SUBPROJECT_DEFAULT = rev2 ifndef MAKEFILE_INCLUDED include ../../Makefile diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index af7e1822c8da..99b057496fcb 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -73,5 +73,8 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif #endif diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 9da33b9b8d41..2cfb8df26bdc 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h @@ -4,6 +4,10 @@ #ifdef SUBPROJECT_rev1 #include "rev1.h" #endif +#ifdef SUBPROJECT_rev2 + #include "rev2.h" +#endif + #include "quantum.h" diff --git a/keyboards/eco/keymaps/default/Makefile b/keyboards/eco/keymaps/default/Makefile new file mode 100644 index 000000000000..7dab979426d5 --- /dev/null +++ b/keyboards/eco/keymaps/default/Makefile @@ -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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c new file mode 100644 index 000000000000..fc8339caa5d3 --- /dev/null +++ b/keyboards/eco/keymaps/default/keymap.c @@ -0,0 +1,107 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +// Default ECO Layout +// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 + +#include "eco.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _FN1 2 +#define _FN2 3 + +enum eco_keycodes { + QWERTY = SAFE_RANGE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | Enter| \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| Up | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Del | FN1 | FN1 | Space| Space| FN2 | FN2 | Ctrl | Left | Down | Right| + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI,KC_LALT, KC_DEL, MO(_FN1), MO(_FN1), KC_SPC, KC_SPC, MO(_FN2), MO(_FN2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* FN1 + * ,-------------------------------------------------------------------------------------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |caltde| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | RESET| + * `-------------------------------------------------------------------------------------------------' + */ +[_FN1] = KEYMAP( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, _______, + CALTDEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Taskmg| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_FN2] = KEYMAP( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, + TSKMGR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/eco/keymaps/default/readme.md b/keyboards/eco/keymaps/default/readme.md new file mode 100644 index 000000000000..cf168377d5de --- /dev/null +++ b/keyboards/eco/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# ECO Default Layout by u/That-Canadian + +KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 \ No newline at end of file diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c index 87f859e8e0d3..5e3d9bdf58ac 100644 --- a/keyboards/eco/keymaps/that_canadian/keymap.c +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -153,7 +153,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -194,12 +194,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -211,7 +211,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 8fef3a1ce5ef..d29aa8ece703 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -10,6 +10,6 @@ Hardware Supported: ECO PCB rev1 Pro Micro Make example for this keyboard (after setting up your build environment): - make eco-rev1-that_canadian + make eco-rev2-that_canadian See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/eco/rev1/rules.mk b/keyboards/eco/rev1/rules.mk index a0825b4ef640..f845616741c2 100644 --- a/keyboards/eco/rev1/rules.mk +++ b/keyboards/eco/rev1/rules.mk @@ -1,5 +1 @@ -BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/eco/rev2/Makefile b/keyboards/eco/rev2/Makefile new file mode 100644 index 000000000000..4e2a6f00fd8e --- /dev/null +++ b/keyboards/eco/rev2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h new file mode 100644 index 000000000000..83f2defc9e48 --- /dev/null +++ b/keyboards/eco/rev2/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 REV2_CONFIG_H +#define REV2_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0002 + +/* ECO V2.1 pin-out */ +#define MATRIX_ROW_PINS { D7, B5, B4, E6 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } +#define UNUSED_PINS + +#endif diff --git a/keyboards/eco/rev2/rev2.c b/keyboards/eco/rev2/rev2.c new file mode 100644 index 000000000000..84097652d81f --- /dev/null +++ b/keyboards/eco/rev2/rev2.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h new file mode 100644 index 000000000000..5b377f29087e --- /dev/null +++ b/keyboards/eco/rev2/rev2.h @@ -0,0 +1,24 @@ +#ifndef REV2_H +#define REV2_H + +#include "../eco.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/rev2/rules.mk b/keyboards/eco/rev2/rules.mk new file mode 100644 index 000000000000..f845616741c2 --- /dev/null +++ b/keyboards/eco/rev2/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/ergodone/Makefile b/keyboards/ergodone/Makefile new file mode 100644 index 000000000000..bd09e5885d0d --- /dev/null +++ b/keyboards/ergodone/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/ergodone/config.h b/keyboards/ergodone/config.h new file mode 100644 index 000000000000..d3e0f80360ef --- /dev/null +++ b/keyboards/ergodone/config.h @@ -0,0 +1,78 @@ +#ifndef ERGODOX_ERGODONE_CONFIG_H +#define ERGODOX_ERGODONE_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDone +#define PRODUCT ErgoDone +#define DESCRIPTION QMK keyboard firmware for ErgoDone + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define PREVENT_STUCK_MODIFIERS + +#define USB_MAX_POWER_CONSUMPTION 500 + +/* + * 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 +//#define DEBUG_MATRIX_SCAN_RATE + +#endif diff --git a/keyboards/ergodone/ergodone.c b/keyboards/ergodone/ergodone.c new file mode 100644 index 000000000000..6b8d8a0632b5 --- /dev/null +++ b/keyboards/ergodone/ergodone.c @@ -0,0 +1,5 @@ +#include "ergodone.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} diff --git a/keyboards/ergodone/ergodone.h b/keyboards/ergodone/ergodone.h new file mode 100644 index 000000000000..9f6c8f841b66 --- /dev/null +++ b/keyboards/ergodone/ergodone.h @@ -0,0 +1,65 @@ +#ifndef ERGODOX_ERGODONE_H +#define ERGODOX_ERGODONE_H + +#include "quantum.h" +#include +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +void init_ergodox(void); + +inline void ergodox_right_led_1_off(void) {} +inline void ergodox_right_led_1_on(void) {} +inline void ergodox_right_led_2_off(void) {} +inline void ergodox_right_led_2_on(void) {} +inline void ergodox_right_led_3_off(void) {} +inline void ergodox_right_led_3_on(void) {} +inline void ergodox_right_led_on(uint8_t l) {} +inline void ergodox_right_led_off(uint8_t l) {} +inline void ergodox_board_led_off(void) {} +inline void ergodox_board_led_on(void) {} +inline void ergodox_led_all_on(void) {} +inline void ergodox_led_all_off(void) {} +inline void ergodox_right_led_1_set(uint8_t n) {} +inline void ergodox_right_led_2_set(uint8_t n) {} +inline void ergodox_right_led_3_set(uint8_t n) {} +inline void ergodox_right_led_set(uint8_t l, uint8_t n) {} +inline void ergodox_led_all_set(uint8_t n) {} + +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ + } + +#define LAYOUT_ergodox KEYMAP + +#endif diff --git a/keyboards/ergodone/expander.c b/keyboards/ergodone/expander.c new file mode 100644 index 000000000000..0c8a2289c523 --- /dev/null +++ b/keyboards/ergodone/expander.c @@ -0,0 +1,120 @@ +#include +#include "action.h" +#include "i2cmaster.h" +#include "expander.h" +#include "debug.h" + +static uint8_t expander_status = 0; +static uint8_t expander_input = 0; + +void expander_config(void); +uint8_t expander_write(uint8_t reg, uint8_t data); +uint8_t expander_read(uint8_t reg, uint8_t *data); + +void expander_init(void) +{ + i2c_init(); + expander_scan(); +} + +void expander_scan(void) +{ + dprintf("expander status: %d ... ", expander_status); + uint8_t ret = i2c_start(EXPANDER_ADDR | I2C_WRITE); + if (ret == 0) { + i2c_stop(); + if (expander_status == 0) { + dprintf("attached\n"); + expander_status = 1; + expander_config(); + clear_keyboard(); + } + } + else { + if (expander_status == 1) { + dprintf("detached\n"); + expander_status = 0; + clear_keyboard(); + } + } + dprintf("%d\n", expander_status); +} + +void expander_read_cols(void) +{ + expander_read(EXPANDER_REG_GPIOA, &expander_input); +} + +uint8_t expander_get_col(uint8_t col) +{ + if (col > 4) { + col++; + } + return expander_input & (1< +#include "matrix.h" + +#define MCP23017 +#define MCP23017_A0 0 +#define MCP23017_A1 0 +#define MCP23017_A2 0 + +#ifdef MCP23017 +#define EXPANDER_ADDR ((0x20|(MCP23017_A0<<0)|(MCP23017_A1<<1)|(MCP23017_A2<<2)) << 1) +enum EXPANDER_REG_BANK0 { + EXPANDER_REG_IODIRA = 0, + EXPANDER_REG_IODIRB, + EXPANDER_REG_IPOLA, + EXPANDER_REG_IPOLB, + EXPANDER_REG_GPINTENA, + EXPANDER_REG_GPINTENB, + EXPANDER_REG_DEFVALA, + EXPANDER_REG_DEFVALB, + EXPANDER_REG_INTCONA, + EXPANDER_REG_INTCONB, + EXPANDER_REG_IOCONA, + EXPANDER_REG_IOCONB, + EXPANDER_REG_GPPUA, + EXPANDER_REG_GPPUB, + EXPANDER_REG_INTFA, + EXPANDER_REG_INTFB, + EXPANDER_REG_INTCAPA, + EXPANDER_REG_INTCAPB, + EXPANDER_REG_GPIOA, + EXPANDER_REG_GPIOB, + EXPANDER_REG_OLATA, + EXPANDER_REG_OLATB +}; +#endif + +void expander_init(void); +void expander_scan(void); +void expander_read_cols(void); +uint8_t expander_get_col(uint8_t col); +matrix_row_t expander_read_row(void); +void expander_unselect_rows(void); +void expander_select_row(uint8_t row); + +#endif diff --git a/keyboards/ergodox/ez/i2cmaster.h b/keyboards/ergodone/i2cmaster.h similarity index 100% rename from keyboards/ergodox/ez/i2cmaster.h rename to keyboards/ergodone/i2cmaster.h diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/default/keymap.c rename to keyboards/ergodone/keymaps/default/keymap.c index 4477cab3105c..cbc180d6a07f 100644 --- a/keyboards/ergodox/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/default/readme.md b/keyboards/ergodone/keymaps/default/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/default/readme.md rename to keyboards/ergodone/keymaps/default/readme.md diff --git a/keyboards/ergodone/matrix.c b/keyboards/ergodone/matrix.c new file mode 100644 index 000000000000..2eb8f24ba8bf --- /dev/null +++ b/keyboards/ergodone/matrix.c @@ -0,0 +1,295 @@ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "ergodone.h" +#include "expander.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // disable JTAG + MCUCR = (1<1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + matrix_print(); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t mask = debounce_mask(i); + matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask); + debounce_report(cols ^ matrix[i], i); + matrix[i] = cols; + + unselect_rows(); + } + + matrix_scan_quantum(); + + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. -*/ - -#include "simple_visualizer.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - uint8_t saturation = 60; - if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - saturation = 255; - } - if (state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); - state->layer_text = "Media & Mouse"; - } - else if (state->status.layer & 0x2) { - state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); - state->layer_text = "Symbol"; - } - else { - state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); - state->layer_text = "Default"; - } -} diff --git a/keyboards/ergodox/keymaps/kristian/keymap.c b/keyboards/ergodox/keymaps/kristian/keymap.c deleted file mode 100644 index e7e42432555d..000000000000 --- a/keyboards/ergodox/keymaps/kristian/keymap.c +++ /dev/null @@ -1,79 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" -#include "keymap_fr_ch.h" -#include "keymap_french.h" -#include "keymap_german.h" -#include "keymap_german_ch.h" -#include "keymap_nordic.h" -#include "keymap_norwegian.h" -#include "keymap_spanish.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - -[0] = KEYMAP(NO_LESS,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_APOS),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_AM,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSLH),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_APOS),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_APOS,KC_LALT,KC_LGUI,KC_ENTER), - -[1] = KEYMAP(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_TRANSPARENT,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_7,KC_8,KC_9,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_4,KC_5,KC_6,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_0,KC_1,KC_2,KC_3,NO_LBRC,NO_RBRC,KC_LSHIFT,KC_COMMA,KC_DOT,LSFT(NO_LBRC),LSFT(NO_RBRC),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LALT,KC_LGUI,KC_ENTER), - -[2] = KEYMAP(KC_ESCAPE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LALT,KC_LGUI,KC_MS_BTN1,KC_MS_BTN2,KC_ESCAPE,KC_TRANSPARENT,KC_TRANSPARENT,KC_SPACE,KC_LGUI,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_ESCAPE,KC_MS_WH_UP,KC_MS_WH_DOWN,KC_MS_ACCEL0,KC_MS_ACCEL1), - -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - case 3: - ergodox_right_led_3_on(); - break; - case 4: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case 5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - case 6: - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - case 7: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - default: - break; - } - -}; diff --git a/keyboards/ergodox/keymaps/yoruian/Makefile b/keyboards/ergodox/keymaps/yoruian/Makefile deleted file mode 100644 index b43a24c611a5..000000000000 --- a/keyboards/ergodox/keymaps/yoruian/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -install-xorg-configuration: - install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \ - /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf - install -m 0644 $(KEYBOARD)_$(KEYMAP) \ - /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) - -uninstall-xorg-configuration: - -rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf - -rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md deleted file mode 100644 index 7327087ffef8..000000000000 --- a/keyboards/ergodox/readme.md +++ /dev/null @@ -1,176 +0,0 @@ -# The Easy Way - -If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood. - -If you can find firmware someone else has made that does what you want, that -is the easiest way to customize your ErgoDox. It requires no programming -experience or the setup of a build environment. - -Quickstart: - - - Find and download an existing firmware - [from Other Firmware Options](#other-firmware-options) - - - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) - or [ErgoDox Infinity](#ergodox-infinity) - -# Customizing Keymaps - -There are many existing keymaps in the "keymaps" directory. If you just want -to use one of them, you don't need to modify keymaps and can just build and -flash the firmware as described below. These directories each have a -"readme.md" file which describe them. - -If none of the existing keymaps suit you, you can create your own custom -keymap. This will require some experience with coding. Follow these steps -to customize a keymap: - - - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :) - - - Clone the qmk_firmware repository - - - Set up your build environment (see below). - - - Make a new directory under "keymaps" to hold your customizations. - - - Copy an existing keymap that is close to what you want, such as - "keymaps/default/keymap.c". - - - Use an editor to modify the new "keymap.c". See "Finding the keycodes you - need" below). Try to edit the comments as well, so the "text graphics" - represent your layout correctly. - - - Compile your new firmware (see below) - - - Flash your firmware (see below) - - - Test the changes. - - - Submit your keymap as a pull request to the qmk_firmware repository so - others can use it. You will want to add a "readme.md" that describes the - keymap. - -# Build Dependencies - -Before you can build, you will need the build dependencies. There is a script -to try to do this for Linux: - - - Run the `util/install_dependencies.sh` script as root. - -For the Infinity, you need the chibios submodules to be checked out or you -will receive errors about the build process being unable to find the chibios -files. Check them out with: - - - Go to the top level repo directory and run: `git submodule update --init --recursive` - -# Flashing Firmware - -## ErgoDox EZ - -The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). - -Linux users need to modify udev rules as described on the [Teensy -Linux page]. Some distributions provide a binary, maybe called -`teensy-loader-cli`. - -[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html - -To flash the firmware: - - - Build the firmware with `make keymapname`, for example `make default` - - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. - `ergodox_ez_default.hex` - - - Start the teensy loader. - - - Load the .hex file into it. - - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. - - - Click the button in the Teensy app to download the firmware. - -To flash with ´teensy-loader-cli´: - - - Build the firmware with `make keymapname`, for example `make default` - - - Run ´teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_.hex´ - - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. - -## ErgoDox Infinity - -The Infinity is two completely independent keyboards, and needs to be flashed -for the left and right halves seperately. To flash them: - - - Build the firmware with `make infinity-keymapname` - - - Plug in the left hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util` - - - Build right hand firmware with `make infinity-keymapname MASTER=right` - - - Plug in the right hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` - -More information on the Infinity firmware is available in the [TMK/chibios for -Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) - -### Infinity Master/Two Halves - -The Infinity is two completely independent keyboards, that can connect together. -You have a few options in how you flash the firmware: - -- Flash the left half, rebuild the firmware with "MASTER=right" and then flash - the right half. This allows you to plug in either half directly to the - computer and is what the above instructions do. - -- Flash the left half, then flash the same firmware on the right. This only - works when the left half is plugged directly to the computer and the keymap - is mirrored. It saves the small extra step of rebuilding with - "MASTER=right". - -- The same as the previous one but with "MASTER=right" when you build the - firmware, then flash the same firmware to both halves. You just have to - directly connect the right half to the computer. - -- For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half. - It is safest to program both halves though. - -# Contributing your keymap - -The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. - -1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). -2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. -3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) -4. Any graphics you wish to add must be hosted elsewhere (please don't include images in your PR). This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link (`![alt-text](url)`), just like I did with the default layout. - -# Finding the keycodes you need - -Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. - -That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). - -If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. - -# Other Firmware Options - -There are external tools for customizing the layout, but those do not use -the featurs of this qmk firmware. These sites include: - - - The official [ErgoDox EZ configurator](http://configure.ergodox-ez.com) - - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for EZ, works but not officially supported - - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files - -You can also find an existing firmware that you like, for example from: - - - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk deleted file mode 100644 index 5939d634c19f..000000000000 --- a/keyboards/ergodox/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- -# 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 = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ -SLEEP_LED_ENABLE = yes # 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 -UNICODE_ENABLE = yes # Unicode -ONEHAND_ENABLE = yes # Allow swapping hands of keyboard diff --git a/keyboards/ergodox/ez/190hotfix.sh b/keyboards/ergodox_ez/190hotfix.sh old mode 100755 new mode 100644 similarity index 100% rename from keyboards/ergodox/ez/190hotfix.sh rename to keyboards/ergodox_ez/190hotfix.sh diff --git a/keyboards/ergodox/ez/Makefile b/keyboards/ergodox_ez/Makefile similarity index 87% rename from keyboards/ergodox/ez/Makefile rename to keyboards/ergodox_ez/Makefile index 663e09b7b4e9..e24600d884be 100644 --- a/keyboards/ergodox/ez/Makefile +++ b/keyboards/ergodox_ez/Makefile @@ -4,5 +4,5 @@ RGBLIGHT_ENABLE = yes MIDI_ENABLE = no ifndef MAKEFILE_INCLUDED - include ../../../Makefile + include ../../Makefile endif diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox_ez/config.h similarity index 69% rename from keyboards/ergodox/ez/config.h rename to keyboards/ergodox_ez/config.h index cc8aa3d40eef..b258a5b2e60f 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -19,8 +19,6 @@ along with this program. If not, see . #ifndef ERGODOX_EZ_CONFIG_H #define ERGODOX_EZ_CONFIG_H -#include "../config.h" - #include "config_common.h" /* USB Device descriptor parameter */ @@ -35,6 +33,31 @@ along with this program. If not, see . #define MATRIX_ROWS 14 #define MATRIX_COLS 6 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox_ez/ergodox_ez.c similarity index 99% rename from keyboards/ergodox/ez/ez.c rename to keyboards/ergodox_ez/ergodox_ez.c index d50224954383..3609f6f81042 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -1,4 +1,4 @@ -#include "ez.h" +#include QMK_KEYBOARD_H #include "i2cmaster.h" diff --git a/keyboards/ergodox/ez/ez.h b/keyboards/ergodox_ez/ergodox_ez.h similarity index 99% rename from keyboards/ergodox/ez/ez.h rename to keyboards/ergodox_ez/ergodox_ez.h index 124bf850e787..1f8d59751948 100644 --- a/keyboards/ergodox/ez/ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -160,4 +160,6 @@ inline void ergodox_led_all_set(uint8_t n) { k0D, k1D, k2D, k3D, k4D, KC_NO } \ } +#define LAYOUT_ergodox KEYMAP + #endif diff --git a/keyboards/ergodox_ez/i2cmaster.h b/keyboards/ergodox_ez/i2cmaster.h new file mode 100644 index 000000000000..3917b9e6c006 --- /dev/null +++ b/keyboards/ergodox_ez/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device +* Usage: see Doxygen manual +**************************************************************************/ + +#ifdef DOXYGEN +/** + @defgroup pfleury_ic2master I2C Master library + @code #include @endcode + + @brief I2C (TWI) Master Software Library + + Basic routines for communicating with I2C slave devices. This single master + implementation is limited to one bus master on the I2C bus. + + This I2c library is implemented as a compact assembler software implementation of the I2C protocol + which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). + Since the API for these two implementations is exactly the same, an application can be linked either against the + software I2C implementation or the hardware I2C implementation. + + Use 4.7k pull-up resistor on the SDA and SCL pin. + + Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module + i2cmaster.S to your target when using the software I2C implementation ! + + Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. + + @note + The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted + to GNU assembler and AVR-GCC C call interface. + Replaced the incorrect quarter period delays found in AVR300 with + half period delays. + + @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury + + @par API Usage Example + The following code shows typical usage of this library, see example test_i2cmaster.c + + @code + + #include + + + #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet + + int main(void) + { + unsigned char ret; + + i2c_init(); // initialize I2C library + + // write 0x75 to EEPROM address 5 (Byte Write) + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + i2c_write(0x05); // write address = 5 + i2c_write(0x75); // write value 0x75 to EEPROM + i2c_stop(); // set stop conditon = release bus + + + // read previously written value back from EEPROM address 5 + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + + i2c_write(0x05); // write address = 5 + i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode + + ret = i2c_readNak(); // read one byte from EEPROM + i2c_stop(); + + for(;;); + } + @endcode + +*/ +#endif /* DOXYGEN */ + +/**@{*/ + +#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 +#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" +#endif + +#include + +/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_READ 1 + +/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_WRITE 0 + + +/** + @brief initialize the I2C master interace. Need to be called only once + @param void + @return none + */ +extern void i2c_init(void); + + +/** + @brief Terminates the data transfer and releases the I2C bus + @param void + @return none + */ +extern void i2c_stop(void); + + +/** + @brief Issues a start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_start(unsigned char addr); + + +/** + @brief Issues a repeated start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_rep_start(unsigned char addr); + + +/** + @brief Issues a start condition and sends address and transfer direction + + If device is busy, use ack polling to wait until device ready + @param addr address and transfer direction of I2C device + @return none + */ +extern void i2c_start_wait(unsigned char addr); + + +/** + @brief Send one byte to I2C device + @param data byte to be transfered + @retval 0 write successful + @retval 1 write failed + */ +extern unsigned char i2c_write(unsigned char data); + + +/** + @brief read one byte from the I2C device, request more data from device + @return byte read from I2C device + */ +extern unsigned char i2c_readAck(void); + +/** + @brief read one byte from the I2C device, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_readNak(void); + +/** + @brief read one byte from the I2C device + + Implemented as a macro, which calls either i2c_readAck or i2c_readNak + + @param ack 1 send ack, request more data from device
+ 0 send nak, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_read(unsigned char ack); +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + + +/**@}*/ +#endif diff --git a/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c similarity index 99% rename from keyboards/ergodox/ez/keymaps/blakedietz/keymap.c rename to keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index a88e6795ab02..a35f86d665a6 100644 --- a/keyboards/ergodox/ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" diff --git a/keyboards/ergodox/keymaps/default/default.png.md b/keyboards/ergodox_ez/keymaps/default/default.png.md similarity index 100% rename from keyboards/ergodox/keymaps/default/default.png.md rename to keyboards/ergodox_ez/keymaps/default/default.png.md diff --git a/keyboards/ergodox/keymaps/default/default_highres.png.md b/keyboards/ergodox_ez/keymaps/default/default_highres.png.md similarity index 100% rename from keyboards/ergodox/keymaps/default/default_highres.png.md rename to keyboards/ergodox_ez/keymaps/default/default_highres.png.md diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c new file mode 100644 index 000000000000..cbc180d6a07f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -0,0 +1,223 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox_ez/keymaps/default/readme.md b/keyboards/ergodox_ez/keymaps/default/readme.md new file mode 100644 index 000000000000..1150a4f70983 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/default/readme.md @@ -0,0 +1,15 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* Dec 2016: + * Added LED keys + * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now. +* Sep 22, 2016: + * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM. +* Feb 2, 2016 (V1.1): + * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). + +This is what we ship with out of the factory. :) The image says it all: + +![Default](https://i.imgur.com/Be53jH7.png) \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/default_osx/keymap.c rename to keyboards/ergodox_ez/keymaps/default_osx/keymap.c index e9a242e07d26..947c8a007fdd 100644 --- a/keyboards/ergodox/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -1,7 +1,7 @@ // Netable differences vs. the default firmware for the ErgoDox EZ: // 1. The Cmd key is now on the right side, making Cmd+Space easier. // 2. The media keys work on OSX (But not on Windows). -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/default_osx/readme.md b/keyboards/ergodox_ez/keymaps/default_osx/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/default_osx/readme.md rename to keyboards/ergodox_ez/keymaps/default_osx/readme.md diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/Makefile b/keyboards/ergodox_ez/keymaps/drashna-custom/Makefile new file mode 100644 index 000000000000..21da248f0c16 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/Makefile @@ -0,0 +1,10 @@ +TAP_DANCE_ENABLE = yes +LAYER_UNDERGLOW_LIGHTING = yes +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +COMMAND_ENABLE = no # Commands for debug and configuration +RGBLIGHT_ENABLE = yes +MIDI_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/config.h b/keyboards/ergodox_ez/keymaps/drashna-custom/config.h new file mode 100644 index 000000000000..fe33552e15d8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/config.h @@ -0,0 +1,8 @@ + +#include "../../config.h" + + +#define TAPPING_TERM 200 + + +#define LAYER_UNDERGLOW_LIGHTING diff --git a/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c b/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c new file mode 100644 index 000000000000..ed7aede1f9f8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna-custom/keymap.c @@ -0,0 +1,867 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + + +#include "keymap_german.h" + +#include "keymap_nordic.h" + +// Define layer names +#define BASE 0 +#define COLEMAK 1 +#define DVORAK 2 +#define SYMB 3 +#define OVERWATCH 4 +#define DIABLO 5 +#define MOUS 6 + +//define modifiers +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) + +//define macro keycodes +#define M_VERSION M(0) +#define M_SYMM M(1) +#define M_SALT M(2) +#define M_HARD M(3) +#define M_MAKE M(4) +#define M_COVECUBE M(5) +#define M_MORESALT M(6) +#define M_DOOMFIST M(7) + + +//define layer change stuff for underglow indicator +bool skip_leds = false; +bool has_layer_changed = false; +static uint8_t current_layer; + +static uint16_t key_timer; +//define diablo macro timer variables +static uint16_t diablo_timer[4]; +static uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30}; +static uint8_t diablo_key_time[4]; + +bool check_dtimer(uint8_t dtimer) { + // has the correct number of seconds elapsed (as defined by diablo_times) + return (timer_elapsed(diablo_timer[dtimer]) < ( diablo_key_time[dtimer] * 1000 ) ) ? false : true; +}; + +bool checktime(void){ + return (timer_elapsed(key_timer) < 150) ? true : false; +}; + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, + RGB_0000FF, + RGB_008000, + RGB_FF0000, + RGB_800080, + RGB_00FF90, + KC_DIABLO_CLEAR +}; + +#ifdef TAP_DANCE_ENABLE +enum { + SFT_CAP = 0, + TD_DIABLO_J, + TD_CLN, + TD_EGG, + TD_FLSH, + TD_DIABLO_1, + TD_DIABLO_2, + TD_DIABLO_3, + TD_DIABLO_4 +}; + + + +void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_RSFT); + register_code (KC_SCLN); + } else { + register_code (KC_SCLN); + } +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_RSFT); + unregister_code (KC_SCLN); + } else { + unregister_code (KC_SCLN); + } +} + +void dance_egg (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 10) { + SEND_STRING ("Safety dance!"); + reset_tap_dance (state); + } +} + +// on each tap, light up one led, from right to left +// on the forth tap, turn them off from right to left +void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + skip_leds = true; + } + switch (state->count) { + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_1_on(); + break; + case 4: + ergodox_right_led_3_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_1_off(); + + } +} + +// on the fourth tap, set the keyboard on flash state +void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 4) { +#ifdef LAYER_UNDERGLOW_LIGHTING + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); +#endif + reset_keyboard(); + reset_tap_dance(state); + } +} + +void diablo_tapdance_master (qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { + if (state->count >= 7) { + diablo_key_time[diablo_key] = diablo_times[0]; + reset_tap_dance(state); + } else { + diablo_key_time[diablo_key] = diablo_times[state->count - 1]; + } +} + +void diablo_tapdance1 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 0); +} + +void diablo_tapdance2 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 1); +} + +void diablo_tapdance3 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 2); +} + +void diablo_tapdance4 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 3); +} + + +// if the flash state didnt happen, then turn off leds, left to right +void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { + _delay_ms(200); + ergodox_right_led_1_off(); + _delay_ms(200); + ergodox_right_led_2_off(); + _delay_ms(200); + ergodox_right_led_3_off(); + _delay_ms(500); + skip_leds = false; +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap one for Space, and twice for Enter + [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSHIFT, KC_CAPS), + // Special Z + [TD_DIABLO_J] = ACTION_TAP_DANCE_DOUBLE(KC_J, S(KC_J)), + // Once for colin, twice for semi-colin + [TD_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset), + // Tap until you get a surprise + [TD_EGG] = ACTION_TAP_DANCE_FN (dance_egg), + //Once for Blue, Twice for Green, Thrice for Red, and four to flash + [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset), + + [TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), + [TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), + [TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), + [TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), + +}; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | + * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM| ' " | LGUI | [ { | ] } | | SYMB | ? / | LEFT | DOWN |RIGHT | + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * | Space| Bksp |-------| |------| DEL |Enter | + * | | | End | | PgDn | | | + * `---------------------' `---------------------' + */ + [BASE] = KEYMAP( + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO), + KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, CTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET, + + ALT_T(KC_APPLICATION), KC_LGUI, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + TG(DVORAK), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE), + TG(COLEMAK), KC_N, KC_M, KC_COMMA, KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESCAPE), + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), +/* Keymap 1: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | + * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[COLEMAK] = KEYMAP( + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO), + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, LT(MOUS, KC_O), KC_QUOTE, + KC_TRANSPARENT,KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 2: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[DVORAK] = KEYMAP( + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO), + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TRANSPARENT, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, LT(MOUS, KC_S), KC_MINS, + KC_NO,KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), + + /* Keymap 3: Symbol Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc | +* |--------+------+------+------+------+------| COVE | | |------+------+------+------+------+--------| +* | RESET | % | ^ | [ | ] | ~ | CUBE | | | NUM | 1 | 2 | 3 | = | PAUSE | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | LT0 | & | * | : | ; | | 0 | 0 | NUM. | ENT | ENT | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | RGBM | RED | | OFF | SOLID| +* ,------|------|------| |------+------+------. +* | | | GREEN| | | | | +* | RGB | RGB |------| |------| NUM. | NUM0 | +* | DARK |BRITE | BLUE | | | | | +* `--------------------' `--------------------' +*/ + [SYMB] = KEYMAP( + KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRANSPARENT, + M_VERSION, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRANSPARENT, + M_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, + TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, M_COVECUBE, + KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, + RGB_MOD, RGB_0000FF, + RGB_008000, + RGB_VAD, RGB_VAI, RGB_FF0000, + + KC_TRANSPARENT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRANSPARENT, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12, + KC_KP_MINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH,KC_PSCREEN, + KC_TRANSPARENT, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE, + KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_ENTER, + RGB_TOG, RGB_SLD, + RGB_HUI, + RGB_HUD, KC_KP_DOT, KC_KP_0 + ), + +/* Keymap 4: Customized Overwatch Layout + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | SALT | SYMM | MORE | DOOM | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F1 | K | Q | W | E | R | T | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | G | A | S | D | F |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTR | LSHFT| Z | X | C | M | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | J | U | I | Y | T | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | O | P | | | | + * ,------|------|------| |------+------+------. + * | | | LGUI | | | | | + * | V | SPACE|------ |------| | Enter| + * | | | H | | | | | + * `--------------------' `--------------------' + */ + [OVERWATCH] = KEYMAP( + KC_ESCAPE, M_SALT, M_SYMM, M_MORESALT, M_DOOMFIST, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, + KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRANSPARENT, + KC_G, KC_U, KC_I, KC_Y, KC_T, + KC_O, KC_P, + KC_LGUI, + KC_V, KC_SPACE, KC_H, + + KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_ENTER + ), + +/* Keymap 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | V | D | ALT | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | S | I | F | M | T | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L | J | | | | + * ,------|------|------| |------+------+------. + * | | | G | | | | | + * | SPACE| Q |------ |------| | | + * | SHIFT| ALT | 0MAC | | | | | + * `--------------------' `--------------------' + */ + [DIABLO] = KEYMAP( + KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRANSPARENT, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, + KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_Z, KC_NO, + KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), + KC_L, KC_J, + KC_F, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, + + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO + ), + +/* Keymap 4: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | MsUp | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Acc0 | Acc1 | Acc2 | | | | | | Play | Stop | Mute |VolDn |VolUp | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | MWUp | | | | | + * | Lclk | Rclk |------| |------| MBn4 | MBn4 | + * | | | MWDn | | Mclk | | | + * `--------------------' `--------------------' + */ + [MOUS] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,KC_NO, KC_NO, + KC_NO, KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO,KC_NO, + KC_MS_WH_UP, + KC_MS_BTN1,KC_MS_BTN2,KC_MS_WH_DOWN, + + KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO,KC_NO, + KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_STOP,KC_AUDIO_MUTE,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_NO, + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO, + KC_NO, + KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5 + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), + // FN1 - Momentary Layer 1 (Symbols) + [2] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_UP), + [3] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_LEFT), + [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_DOWN), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RIGHT), +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + // Output Keyboard Firmware info + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + } + case 1: + if (record->event.pressed) { + // Symmentra "Left Click to win" salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(L), U(LSFT), T(E), T(F), T(T), T(SPACE), T(C), T(L), T(I), T(C), T(K), T(SPACE), T(T), T(O), T(SPACE), T(W), T(I), T(N), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 2: + if (record->event.pressed) { + //salt salt salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(S), U(LSFT), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(DOT), T(DOT), T(DOT), T(ENTER), END ); + } + case 3: + if (record->event.pressed) { + // your saltiness makes me hard + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(Y), U(LSFT), T(O), T(U), T(R), T(SPACE), T(S), T(A), T(L), T(T), T(SPACE), T(O), T(N), T(L), T(Y), T(SPACE), T(M), T(A), T(K), T(E), T(S), T(SPACE), T(M), T(Y), T(SPACE), T(P), T(E), T(N), T(I), T(S), T(SPACE), T(T), T(H), T(A), T(T), T(SPACE), T(M), T(U), T(C), T(H), T(SPACE), T(H), T(A), T(R), T(D), T(E), T(R), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), T(E), T(V), T(E), T(N), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(A), T(G), T(G), T(R), T(E), T(S), T(S), T(I), T(V), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 4: + if (record->event.pressed) { + // make ergodox-ez-drashna-custom-teensy + return MACRO( I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), T(MINUS), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END ); + } + case 5: + if (record->event.pressed) { + //super secret hash + SEND_STRING("supersecrethash"); + return MACRO_NONE; + } + case 6: + if (record->event.pressed) { + // Please sir, can I have some more salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(P), U(LSFT), T(L), T(E), T(A), T(S), T(E), T(SPACE), T(S), T(I), T(R), T(COMMA), T(SPACE), T(C), T(A), T(N), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(H), T(A), T(V), T(E), T(SPACE), T(S), T(O), T(M), T(E), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(S), T(A), T(L), T(T), D(LSFT), T(SLASH), U(LSFT), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + break; + case 7: + if (record->event.pressed) { + // DoomFisted + // Hey, look at me. I'm Doomfist, and I'm overpowered! + // All I do is spam punches all day! I'm DPS, tank and + // defense, rolled into one! All I need is team healing to be complete! + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(H), U(LSFT), T(E), T(Y), T(COMMA), T(SPACE), T(L), T(O), T(O), T(K), T(SPACE), T(A), T(T), T(SPACE), T(M), T(E), T(DOT), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), T(O), T(O), T(M), T(F), T(I), T(S), T(T), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), T(O), T(V), T(E), T(R), T(P), T(O), T(W), T(E), T(R), T(E), T(D), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(D), T(O), T(SPACE), T(I), T(S), T(SPACE), T(S), T(P), T(A), T(M), T(SPACE), T(P), T(U), T(N), T(C), T(H), T(E), T(S), T(SPACE), T(A), T(L), T(L), T(SPACE), T(D), T(A), T(Y), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), D(LSFT), T(P), U(LSFT), D(LSFT), T(S), U(LSFT), T(COMMA), T(SPACE), T(T), T(A), T(N), T(K), T(SPACE), T(A), T(N), T(D), T(SPACE), T(D), T(E), T(F), T(E), T(N), T(S), T(E), T(COMMA), T(SPACE), T(R), T(O), T(L), T(L), T(E), T(D), T(SPACE), T(I), T(N), T(T), T(O), T(SPACE), T(O), T(N), T(E), D(LSFT), T(1), U(LSFT), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(N), T(E), T(E), T(D), T(SPACE), T(I), T(S), T(SPACE), T(T), T(E), T(A), T(M), T(SPACE), T(H), T(E), T(A), T(L), T(I), T(N), T(G), T(SPACE), T(T), T(O), T(SPACE), T(B), T(E), T(SPACE), T(C), T(O), T(M), T(P), T(L), T(E), T(T), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 8: //MAC1 - Hold for rshift and } on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LSFT), END ); + } else { + return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); + }; break; + case 9: //MAC1 - Hold for rshift and } on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RSFT), END ); + } else { + return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); + }; break; + case 10: //MAC2 - Hold for lctrl and [ on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LCTL), END ); + } else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); + }; break; + case 11: //MAC3 - Hold for rctrl and ] on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RCTL), END ); + } else { + return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); + }; break; + } + return MACRO_NONE; +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + case RGB_0000FF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x00,0xff); + #endif + } + return false; + break; + + case RGB_008000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x80,0x00); + #endif + } + return false; + break; + + case RGB_FF0000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); + #endif + } + return false; + break; + + case RGB_800080: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x80,0x00,0x80); + #endif + } + return false; + break; + + case RGB_00FF90: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0xff,0x90); + #endif + } + return false; + break; + case KC_DIABLO_CLEAR: + if (record->event.pressed) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + diablo_key_time[dtime] = diablo_times[0]; + } + } + return false; + break; + + } + return true; +} + +void send_diablo_keystroke (uint8_t diablo_key) { + if (current_layer == DIABLO) { + switch (diablo_key) { + case 0: + SEND_STRING("1"); + break; + case 1: + SEND_STRING("2"); + break; + case 2: + SEND_STRING("3"); + break; + case 3: + SEND_STRING("4"); + break; + } + } +} + +void run_diablo_macro_check(void) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + if (check_dtimer(dtime) && diablo_key_time[dtime]) { + diablo_timer[dtime] = timer_read(); + send_diablo_keystroke(dtime); + } + } + +} + +void matrix_init_user(void) { // Runs boot tasks for keyboard + wait_ms(500); + ergodox_board_led_on(); + wait_ms(200); + ergodox_right_led_1_on(); + wait_ms(200); + ergodox_right_led_2_on(); + wait_ms(200); + ergodox_right_led_3_on(); + wait_ms(200); + ergodox_board_led_off(); + wait_ms(200); + ergodox_right_led_1_off(); + wait_ms(200); + ergodox_right_led_2_off(); + wait_ms(200); + ergodox_right_led_3_off(); + + +#ifdef LAYER_UNDERGLOW_LIGHTING + rgblight_enable(); + rgblight_sethsv(195,255,255); +#endif + has_layer_changed = false; + + + +}; + + + +void matrix_scan_user(void) { // runs frequently to update info + uint8_t modifiders = get_mods(); + uint8_t layer = biton32(layer_state); + + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + if ( modifiders & MODS_SHIFT_MASK) { + ergodox_right_led_1_on(); + } + if ( modifiders & MODS_CTRL_MASK) { + ergodox_right_led_2_on(); + } + if ( modifiders & MODS_ALT_MASK) { + ergodox_right_led_3_on(); + } + + } + + switch (layer) { + case SYMB: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (240,255,255); + } + #else + ergodox_right_led_3_on(); + #endif + break; + case OVERWATCH: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (30,255,255); + } + #else + ergodox_right_led_2_on(); + #endif + break; + case DIABLO: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (0,255,255); + } + #else + ergodox_right_led_1_on(); + #endif + break; + case MOUS: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (60,255,255); + } + #else + ergodox_right_led_3_on(); + ergodox_right_led_2_on(); + #endif + break; + case COLEMAK: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (300,255,255); + } + #else + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #endif + break; + case DVORAK: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (120,255,255); + } + #else + ergodox_right_led_2_on(); + ergodox_right_led_1_on(); + #endif + break; + case 7: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (255,255,255); + } + #else + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #endif + break; + default: + // Do not add anything here, as this will be ran EVERY check, and can cause a significant slowdown + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (195,255,255); + } + #endif + break; + } + + if (current_layer == layer) { + has_layer_changed = false; + } else { + has_layer_changed = true; + current_layer = layer; + } + run_diablo_macro_check(); +}; + + diff --git a/keyboards/ergodox/keymaps/belak/Makefile b/keyboards/ergodox_ez/keymaps/drashna/Makefile similarity index 54% rename from keyboards/ergodox/keymaps/belak/Makefile rename to keyboards/ergodox_ez/keymaps/drashna/Makefile index 8a6beea59174..9dfddf01ecab 100644 --- a/keyboards/ergodox/keymaps/belak/Makefile +++ b/keyboards/ergodox_ez/keymaps/drashna/Makefile @@ -1,5 +1,5 @@ -TAP_DANCE_ENABLE=yes -UNICODE_ENABLE=yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATION = no ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/ergodox_ez/keymaps/drashna/config.h b/keyboards/ergodox_ez/keymaps/drashna/config.h new file mode 100644 index 000000000000..258dc391fe44 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna/config.h @@ -0,0 +1,11 @@ + +#include "../../config.h" + + + +// make this easy to toggle behavior, so that it can be more easily toggled +#define LAYER_UNDERGLOW_LIGHTING + +#ifdef LAYER_UNDERGLOW_LIGHTING +#undef RGBLIGHT_ANIMATIONS +#endif \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/drashna/keymap.c b/keyboards/ergodox_ez/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..cef0e9c39f6f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna/keymap.c @@ -0,0 +1,195 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + + +#include "keymap_german.h" + +#include "keymap_nordic.h" + +#define VERSION M(0) + + +// Define layer names +#define BASE 0 +#define SYMB 1 +#define MOUS 2 + +#ifdef LAYER_UNDERGLOW_LIGHTING +bool has_layer_changed = true; + +#define rgblight_set_teal rgblight_setrgb(0x00, 0xFF, 0xFF) +#define rgblight_set_red rgblight_setrgb(0xFF, 0x00, 0x00) +#define rgblight_set_blue rgblight_setrgb(0x00, 0xFF, 0x00); +#define rgblight_set_green rgblight_setrgb(0x00, 0x00, 0xFF); +#define rgblight_set_yellow rgblight_setrgb(0xFF, 0xFF, 0x00); + + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#endif + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, +#ifndef LAYER_UNDERGLOW_LIGHTING + RGB_SLD, +#endif +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,KC_LEFT,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSHIFT,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_BSPACE,KC_END,KC_RIGHT,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,KC_J,KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSHIFT,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,MO(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,KC_TAB,KC_ENTER), + +#ifdef LAYER_UNDERGLOW_LIGHTING + [1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT), +#else + [1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_MOD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,RGB_TOG,RGB_SLD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD,RGB_HUI), +#endif + + [2] = KEYMAP(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_BTN1,KC_MS_BTN2,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_WWW_BACK), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +// leaving this in place for compatibilty with old keymaps cloned and re-compiled. +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; +#ifndef LAYER_UNDERGLOW_LIGHTING + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; +#endif + + } + return true; +} + + + + +void matrix_scan_user(void) { + + uint8_t new_layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + +#ifdef LAYER_UNDERGLOW_LIGHTING + static uint8_t old_layer = 0; + uint8_t modifiders = get_mods(); + + if ( modifiders & MODS_SHIFT_MASK) { + ergodox_right_led_1_on(); + } + if ( modifiders & MODS_CTRL_MASK) { + ergodox_right_led_2_on(); + } + if ( modifiders & MODS_ALT_MASK) { + ergodox_right_led_3_on(); + } + + if (old_layer != new_layer) { + has_layer_changed = true; + old_layer = new_layer; + } + if (has_layer_changed) { + switch (new_layer) { + case 1: + rgblight_set_red; + break; + case 2: + rgblight_set_blue; + break; + case 3: + rgblight_set_green; + break; + case 4: + rgblight_set_yellow; + break; + case 5: + rgblight_setrgb(0xFF, 0xFF, 0x00); + break; + case 6: + rgblight_setrgb(0xFF, 0xFF, 0x00); + break; + case 7: + rgblight_setrgb(0xFF, 0xFF, 0xFF); + break; + default: + rgblight_set_teal; + break; + } + has_layer_changed = false; + } + +#else + switch (new_layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } +#endif +}; diff --git a/keyboards/ergodox_ez/keymaps/drashna/readme.md b/keyboards/ergodox_ez/keymaps/drashna/readme.md new file mode 100644 index 000000000000..90fe44861a85 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/drashna/readme.md @@ -0,0 +1,9 @@ +# Drashna's ErgoDox EZ Underglow Mod + +This is based on the default Ergodox EZ keymap. + +This modifieds the keymay so that it uses the underglow to indicate which layer you're on, rather than the top LEDs. + +Default colors are "teal" for base layer, "red" for Symbols, and "green" for mouse/media. Blue would be the next layer, if you had more. + +Additionally, the top LEDs are Shift/Control/Alt indicators instead (in that order). \ No newline at end of file diff --git a/keyboards/ergodox/ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c similarity index 99% rename from keyboards/ergodox/ez/keymaps/profet_80/keymap.c rename to keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 505ff2972223..06c4f77d6c93 100644 --- a/keyboards/ergodox/ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" diff --git a/keyboards/ergodox/ez/keymaps/profet_80/readme.md b/keyboards/ergodox_ez/keymaps/profet_80/readme.md similarity index 100% rename from keyboards/ergodox/ez/keymaps/profet_80/readme.md rename to keyboards/ergodox_ez/keymaps/profet_80/readme.md diff --git a/keyboards/ergodox/ez/keymaps/steno/Makefile b/keyboards/ergodox_ez/keymaps/steno/Makefile similarity index 100% rename from keyboards/ergodox/ez/keymaps/steno/Makefile rename to keyboards/ergodox_ez/keymaps/steno/Makefile diff --git a/keyboards/ergodox/ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c similarity index 99% rename from keyboards/ergodox/ez/keymaps/steno/keymap.c rename to keyboards/ergodox_ez/keymaps/steno/keymap.c index 3e9830905ca1..86b16f16182a 100644 --- a/keyboards/ergodox/ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "sendchar.h" diff --git a/keyboards/ergodox/ez/keymaps/steno/readme.md b/keyboards/ergodox_ez/keymaps/steno/readme.md similarity index 100% rename from keyboards/ergodox/ez/keymaps/steno/readme.md rename to keyboards/ergodox_ez/keymaps/steno/readme.md diff --git a/keyboards/ergodox/ez/matrix.c b/keyboards/ergodox_ez/matrix.c similarity index 99% rename from keyboards/ergodox/ez/matrix.c rename to keyboards/ergodox_ez/matrix.c index 21b60a542e3c..b743cf0d6bd8 100644 --- a/keyboards/ergodox/ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -33,7 +33,7 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" -#include "ez.h" +#include QMK_KEYBOARD_H #include "i2cmaster.h" #ifdef DEBUG_MATRIX_SCAN_RATE #include "timer.h" diff --git a/keyboards/ergodox_ez/readme.md b/keyboards/ergodox_ez/readme.md new file mode 100644 index 000000000000..f025c5991d64 --- /dev/null +++ b/keyboards/ergodox_ez/readme.md @@ -0,0 +1,33 @@ +# ErgoDox EZ + +The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). + +Linux users need to modify udev rules as described on the [Teensy +Linux page]. Some distributions provide a binary, maybe called +`teensy-loader-cli`. + +[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html + +To flash the firmware: + + - Build the firmware with `make keymapname`, for example `make default` + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. + `ergodox_ez_default.hex` + + - Start the teensy loader. + + - Load the .hex file into it. + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + + - Click the button in the Teensy app to download the firmware. + +To flash with ´teensy-loader-cli´: + + - Build the firmware with `make keymapname`, for example `make default` + + - Run ´teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_.hex´ + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox_ez/rules.mk similarity index 81% rename from keyboards/ergodox/ez/rules.mk rename to keyboards/ergodox_ez/rules.mk index e9bfb13995df..e0111272a50d 100644 --- a/keyboards/ergodox/ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -70,7 +70,17 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # 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 = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +UNICODE_ENABLE = yes # Unicode +ONEHAND_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = yes + +LAYOUTS = ergodox \ No newline at end of file diff --git a/keyboards/ergodox_ez/twimaster.c b/keyboards/ergodox_ez/twimaster.c new file mode 100644 index 000000000000..f91c08e6e4e8 --- /dev/null +++ b/keyboards/ergodox_ez/twimaster.c @@ -0,0 +1,208 @@ +/************************************************************************* +* Title: I2C master library using hardware TWI interface +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device with hardware TWI +* Usage: API compatible with I2C Software Library i2cmaster.h +**************************************************************************/ +#include +#include + +#include + + +/* define CPU frequency in Mhz here if not defined in Makefile */ +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 400000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock + * minimal values in Bit Rate Register (TWBR) and minimal Prescaler + * bits in the TWI Status Register should give us maximal possible + * I2C bus speed - about 444 kHz + * + * for more details, see 20.5.2 in ATmega16/32 secification + */ + + TWSR = 0; /* no prescaler */ + TWBR = 10; /* must be >= 10 for stable operation */ + +}/* i2c_init */ + + +/************************************************************************* + Issues a start condition and sends address and transfer direction. + return 0 = device accessible, 1= failed to access device +*************************************************************************/ +unsigned char i2c_start(unsigned char address) +{ + uint8_t twst; + + // send START condition + TWCR = (1<. #ifndef INFINITY_ERGODOX_CONFIG_H #define INFINITY_ERGODOX_CONFIG_H -#include "../config.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xDEAD @@ -32,6 +30,31 @@ along with this program. If not, see . #define PRODUCT "Infinity keyboard/TMK" #define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'T', '\x00', 'M', '\x00', 'K', '\x00' +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + /* key matrix size */ #define MATRIX_ROWS 18 #define MATRIX_COLS 5 diff --git a/keyboards/ergodox/infinity/infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c similarity index 99% rename from keyboards/ergodox/infinity/infinity.c rename to keyboards/ergodox_infinity/ergodox_infinity.c index 62259ed3f68a..05b2d7ce31b3 100644 --- a/keyboards/ergodox/infinity/infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -1,4 +1,4 @@ -#include "infinity.h" +#include QMK_KEYBOARD_H #include "ch.h" #include "hal.h" #include "serial_link/system/serial_link.h" diff --git a/keyboards/ergodox/infinity/infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h similarity index 99% rename from keyboards/ergodox/infinity/infinity.h rename to keyboards/ergodox_infinity/ergodox_infinity.h index 73a0f4bf704c..25249c714a02 100644 --- a/keyboards/ergodox/infinity/infinity.h +++ b/keyboards/ergodox_infinity/ergodox_infinity.h @@ -118,4 +118,6 @@ inline void ergodox_led_all_set(uint8_t n) { { B80, B81, B82, B83, B84 } \ } +#define LAYOUT_ergodox KEYMAP + #endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */ diff --git a/keyboards/ergodox/infinity/gfxconf.h b/keyboards/ergodox_infinity/gfxconf.h similarity index 100% rename from keyboards/ergodox/infinity/gfxconf.h rename to keyboards/ergodox_infinity/gfxconf.h diff --git a/keyboards/ergodox/infinity/halconf.h b/keyboards/ergodox_infinity/halconf.h similarity index 100% rename from keyboards/ergodox/infinity/halconf.h rename to keyboards/ergodox_infinity/halconf.h diff --git a/keyboards/ergodox/infinity/led.c b/keyboards/ergodox_infinity/led.c similarity index 100% rename from keyboards/ergodox/infinity/led.c rename to keyboards/ergodox_infinity/led.c diff --git a/keyboards/ergodox/infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c similarity index 100% rename from keyboards/ergodox/infinity/matrix.c rename to keyboards/ergodox_infinity/matrix.c diff --git a/keyboards/ergodox/infinity/mcuconf.h b/keyboards/ergodox_infinity/mcuconf.h similarity index 100% rename from keyboards/ergodox/infinity/mcuconf.h rename to keyboards/ergodox_infinity/mcuconf.h diff --git a/keyboards/ergodox_infinity/readme.md b/keyboards/ergodox_infinity/readme.md new file mode 100644 index 000000000000..2d037d1c906f --- /dev/null +++ b/keyboards/ergodox_infinity/readme.md @@ -0,0 +1,45 @@ +# ErgoDox Infinity + +The Infinity is two completely independent keyboards, and needs to be flashed +for the left and right halves seperately. To flash them: + + - Build the firmware with `make infinity-keymapname` + + - Plug in the left hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util` + + - Build right hand firmware with `make infinity-keymapname MASTER=right` + + - Plug in the right hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` + +More information on the Infinity firmware is available in the [TMK/chibios for +Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) + +## Infinity Master/Two Halves + +The Infinity is two completely independent keyboards, that can connect together. +You have a few options in how you flash the firmware: + +- Flash the left half, rebuild the firmware with "MASTER=right" and then flash + the right half. This allows you to plug in either half directly to the + computer and is what the above instructions do. + +- Flash the left half, then flash the same firmware on the right. This only + works when the left half is plugged directly to the computer and the keymap + is mirrored. It saves the small extra step of rebuilding with + "MASTER=right". + +- The same as the previous one but with "MASTER=right" when you build the + firmware, then flash the same firmware to both halves. You just have to + directly connect the right half to the computer. + +- For minor changes such as changing only the keymap without having updated + any part of the firmware code itself, you can program only the MASTER half. + It is safest to program both halves though. \ No newline at end of file diff --git a/keyboards/ergodox/infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk similarity index 75% rename from keyboards/ergodox/infinity/rules.mk rename to keyboards/ergodox_infinity/rules.mk index a341bbfce813..cb11152556eb 100644 --- a/keyboards/ergodox/infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -57,6 +57,18 @@ OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 # 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 = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ +SLEEP_LED_ENABLE = yes # 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 +UNICODE_ENABLE = yes # Unicode +ONEHAND_ENABLE = yes # Allow swapping hands of keyboard + CUSTOM_MATRIX = yes # Custom matrix file SERIAL_LINK_ENABLE = yes VISUALIZER_ENABLE = yes @@ -72,4 +84,6 @@ LCD_HEIGHT = 32 LED_DRIVER = is31fl3731c LED_WIDTH = 7 -LED_HEIGHT = 7 \ No newline at end of file +LED_HEIGHT = 7 + +LAYOUTS = ergodox ergodox_80 \ No newline at end of file diff --git a/keyboards/ergodox/infinity/simple_visualizer.h b/keyboards/ergodox_infinity/simple_visualizer.h similarity index 100% rename from keyboards/ergodox/infinity/simple_visualizer.h rename to keyboards/ergodox_infinity/simple_visualizer.h diff --git a/keyboards/ergodox/infinity/visualizer.c b/keyboards/ergodox_infinity/visualizer.c similarity index 100% rename from keyboards/ergodox/infinity/visualizer.c rename to keyboards/ergodox_infinity/visualizer.c diff --git a/keyboards/four_banger/Makefile b/keyboards/four_banger/Makefile new file mode 100644 index 000000000000..0011010fdbf2 --- /dev/null +++ b/keyboards/four_banger/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h new file mode 100644 index 000000000000..96011cbdfa80 --- /dev/null +++ b/keyboards/four_banger/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 0x2004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 1up Keyboards +#define PRODUCT Four Banger +#define DESCRIPTION 2x2 grid + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B2, B6 } +#define MATRIX_COL_PINS { B5, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/four_banger/four_banger.c b/keyboards/four_banger/four_banger.c new file mode 100644 index 000000000000..20aefb61d96a --- /dev/null +++ b/keyboards/four_banger/four_banger.c @@ -0,0 +1 @@ +#include "four_banger.h" \ No newline at end of file diff --git a/keyboards/four_banger/four_banger.h b/keyboards/four_banger/four_banger.h new file mode 100644 index 000000000000..b0de731b9199 --- /dev/null +++ b/keyboards/four_banger/four_banger.h @@ -0,0 +1,14 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT_ortho_2x2( \ + K00, K01, \ + K10, K11 \ +) { \ + { K00, K01 }, \ + { K10, K11 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/four_banger/keymaps/default/keymap.c b/keyboards/four_banger/keymaps/default/keymap.c new file mode 100644 index 000000000000..245155381647 --- /dev/null +++ b/keyboards/four_banger/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +#include "four_banger.h" + +enum custom_keycodes { + UP_URL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_2x2( + KC_1, KC_U, + KC_P, UP_URL + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case UP_URL: + if (record->event.pressed) { + SEND_STRING("http://1upkeyboads.com"); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/four_banger/readme.md b/keyboards/four_banger/readme.md new file mode 100644 index 000000000000..f2ab0ad87084 --- /dev/null +++ b/keyboards/four_banger/readme.md @@ -0,0 +1,14 @@ +Four Banger +=== + +A 2x2 macro pad sold by 1up Keyboards - designed by Bishop Keyboards + +Keyboard Maintainer: QMK Community +Hardware Supported: Four Banger Keyboard PCB +Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make four_banger-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk new file mode 100644 index 000000000000..212e74059e4b --- /dev/null +++ b/keyboards/four_banger/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/frosty_flake/readme.md b/keyboards/frosty_flake/readme.md index ff440e33b60e..762eeab3a203 100644 --- a/keyboards/frosty_flake/readme.md +++ b/keyboards/frosty_flake/readme.md @@ -1,32 +1,16 @@ -frosty_flake keyboard firmware -====================== +Frosty Flake Controller +=== This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Cooler Master Quick Fire Rapid](http://www.coolermaster.com/peripheral/keyboards/quickfirerapid/). The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers), but has been cleaned up to match the [schematic](https://deskthority.net/wiki/File:Frosty_Flake_Schematics.pdf) and gone through some minor refactoring for QMK. -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: Frosty Flake +Hardware Availability: https://1upkeyboards.com/qfr-frosty-flake-controller.html -For the full Quantum feature list, see [the parent readme](/). +Make example for this keyboard (after setting up your build environment): -## Building + make frosty_flake-default -Download or clone the whole firmware and navigate to the keyboards/frosty_flake folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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/gh60/gh60.h b/keyboards/gh60/gh60.h index 99ccf175748d..be823676dfef 100644 --- a/keyboards/gh60/gh60.h +++ b/keyboards/gh60/gh60.h @@ -72,4 +72,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_ansi KEYMAP_ANSI +#define LAYOUT_60_iso KEYMAP + #endif \ No newline at end of file diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c index 6d1d8ab27461..19fc37a6d088 100644 --- a/keyboards/gh60/keymaps/xyverz/keymap.c +++ b/keyboards/gh60/keymaps/xyverz/keymap.c @@ -1,4 +1,4 @@ -#include "gh60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index bbb0b6e19cf5..e477b279ce72 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -1,7 +1,23 @@ -## gh60 Rev C keyboard firmware +GH60 +=== ![gh60 Rev C PCB](https://i.imgur.com/FejpoNF.jpg) +A common 60% PCB. + +Keyboard Maintainer: QMK Community +Hardware Supported: GH60 PCB +Hardware Availability: http://blog.komar.be/projects/gh60-programmable-keyboard/ + +Make example for this keyboard (after setting up your build environment): + + make gh60-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. + + +## GH60 Hardware Information + /* Column pin configuration * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) @@ -34,29 +50,3 @@ Functions to controls LED clusters gh60_fn_led_off() gh60_esc_led_off() gh60_wasd_leds_off() - -====================== - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/gh60/rules.mk b/keyboards/gh60/rules.mk index 00f4b660a040..2c9d91ecdf91 100644 --- a/keyboards/gh60/rules.mk +++ b/keyboards/gh60/rules.mk @@ -64,3 +64,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: # MIDI_ENABLE = YES # MIDI controls # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_iso \ No newline at end of file diff --git a/keyboards/gherkin/README.md b/keyboards/gherkin/README.md index 0a3d6fabe0aa..74093bbbee6e 100644 --- a/keyboards/gherkin/README.md +++ b/keyboards/gherkin/README.md @@ -1,12 +1,18 @@ +Gherkin +=== -About ------- +A 30 key keyboard. -First pass at adding support for the gherkin keyboard. Compiles but completely -untested. Intended to kick-start development. - -* [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) * [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) -Credit to JadedC for the initial work. +Keyboard Maintainer: QMK Community +Hardware Supported: Gherkin PCB +Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) + +Make example for this keyboard (after setting up your build environment): + make gherkin-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. +First pass at adding support for the gherkin keyboard. Compiles but completely +untested. Intended to kick-start development. diff --git a/keyboards/gherkin/keymaps/steno/Makefile b/keyboards/gherkin/keymaps/steno/Makefile new file mode 100644 index 000000000000..fa813f2099f9 --- /dev/null +++ b/keyboards/gherkin/keymaps/steno/Makefile @@ -0,0 +1,16 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER + +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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/steno/config.h b/keyboards/gherkin/keymaps/steno/config.h new file mode 100644 index 000000000000..abacefa01d21 --- /dev/null +++ b/keyboards/gherkin/keymaps/steno/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#endif \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/steno/keymap.c b/keyboards/gherkin/keymaps/steno/keymap.c new file mode 100644 index 000000000000..473af85dd238 --- /dev/null +++ b/keyboards/gherkin/keymaps/steno/keymap.c @@ -0,0 +1,13 @@ +#include "gherkin.h" +#include "keymap_steno.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + STN_NUM, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, STN_NUM), +}; + +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +} \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/steno/readme.md b/keyboards/gherkin/keymaps/steno/readme.md new file mode 100644 index 000000000000..6536ed7aba4c --- /dev/null +++ b/keyboards/gherkin/keymaps/steno/readme.md @@ -0,0 +1,9 @@ +# Gherkin Steno + +This is a stenography-only keymap. It boots by default into GeminiPR mode. All the excess stuff is stripped away (I'd remove normal keyboard support if I could). + +> Note: The number bar has been moved to the bottom row in all the left-over spaces. + + | S | T | P | H | * | F | P | L | T | D | + | S | K | W | R | * | R | B | G | S | Z | + | # | # | A | O | # | E | U | # | # | # | diff --git a/keyboards/gherkin/keymaps/talljoe/Makefile b/keyboards/gherkin/keymaps/talljoe/Makefile new file mode 100644 index 000000000000..02216ecb36e2 --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe/Makefile @@ -0,0 +1,6 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/gherkin/keymaps/talljoe/config.h b/keyboards/gherkin/keymaps/talljoe/config.h new file mode 100644 index 000000000000..3e9e692d3cac --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/talljoe/keymap.c b/keyboards/gherkin/keymaps/talljoe/keymap.c new file mode 100644 index 000000000000..7574c0476fea --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe/keymap.c @@ -0,0 +1,53 @@ +#include "gherkin.h" +#include "action_layer.h" +#include "keymap_steno.h" + +#define ST_BOLT QK_STENO_BOLT +#define ST_GEM QK_STENO_GEMINI + +#define XXXXXXX KC_NO + +enum keyboard_layers { + _QWERTY, + _RAISE, + _LOWER, + _PLOVER, + _ADJUST +}; + +#define ADJ_Z LT(_ADJUST, KC_Z) +#define RS_BSPC LT(_RAISE, KC_BSPC) +#define LW_SPC LT(_LOWER, KC_SPC) +#define MO_ADJ MO(_ADJUST) +#define TG_PLV TG(_PLOVER) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_LGUI OSM(MOD_LGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KEYMAP( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, + ADJ_Z, KC_X, KC_C, KC_V, RS_BSPC, LW_SPC, KC_B, KC_N, KC_M, KC_ENT ), + + [_RAISE] = KEYMAP( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_ESC , KC_MINS, KC_EQL , _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, + OS_LCTL, OS_LGUI, OS_LALT, KC_GRV , _______, KC_TAB , KC_BSLS, KC_COMM, KC_DOT , KC_SLSH), + + [_LOWER] = KEYMAP( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_PGUP, KC_HOME, KC_UP , KC_END , XXXXXXX, + KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, + KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , _______, OS_LALT, OS_LGUI, OS_LCTL, KC_CAPS), + + [_PLOVER] = KEYMAP( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + MO_ADJ, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, XXXXXXX), + + [_ADJUST] = KEYMAP( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ST_BOLT, ST_GEM , TG_PLV , + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET ), +}; \ No newline at end of file diff --git a/keyboards/gonnerd/keymaps/tkl/Makefile b/keyboards/gonnerd/keymaps/tkl/Makefile new file mode 100644 index 000000000000..5854366f9dde --- /dev/null +++ b/keyboards/gonnerd/keymaps/tkl/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c new file mode 100644 index 000000000000..b0ba335c59ad --- /dev/null +++ b/keyboards/gonnerd/keymaps/tkl/keymap.c @@ -0,0 +1,31 @@ +#include "gonnerd.h" + +#define _x_ KC_NO +#define TRN KC_TRNS + +// Keymap layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP_TKL( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _x_, KC_ENT, \ + KC_LSFT, _x_, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _x_, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + + [1] = KEYMAP_TKL( \ + RESET, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, TRN, _x_, _x_, _x_, _x_ \ + ) + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md index 807df308a52e..388816abb00f 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gonnerd/readme.md @@ -1,5 +1,17 @@ -GON NerD keyboard firmware -====================== +GON NerD +======== + +A Korean Custom TKL. + +Keyboard Maintainer: QMK Community +Hardware Supported: GON NerD TKL PCB +Hardware Availability: http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html + +Make example for this keyboard (after setting up your build environment): + + make gonnerd-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. ## Changing Bootloader @@ -14,25 +26,3 @@ not work anymore. You will lose your warranty and official support from GON!_ ## Reset button To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/hadron/keymaps/default/keymap.c b/keyboards/hadron/keymaps/default/keymap.c index 01cc8abab7a8..5582a4652622 100644 --- a/keyboards/hadron/keymaps/default/keymap.c +++ b/keyboards/hadron/keymaps/default/keymap.c @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | * `--------------------------------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( +[_QWERTY] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L,LT_MC(KC_SCLN), KC_QUOT, \ @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | * `--------------------------------------------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( +[_COLEMAK] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_P7, KC_P8, KC_P9, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_LCTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_P4, KC_P5, KC_P6, KC_H, KC_N, KC_E, KC_I, LT_MC(KC_O), KC_QUOT, \ @@ -121,14 +121,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | * `--------------------------------------------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( +[_DVORAK] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_P7, KC_P8, KC_P9, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_P4, KC_P5, KC_P6, KC_D, KC_H, KC_T, KC_N, LT_MC(KC_S), KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_P1, KC_P2, KC_P3, KC_B, KC_M, KC_W, KC_V, KC_Z, CTL_ENT, \ KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - + /* Lower * ,------+------+------+------+------+------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | @@ -142,14 +142,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | * `--------------------------------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( +[_LOWER] = KEYMAP( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - + /* Raise * ,------+------+------+------+------+------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | @@ -163,14 +163,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | * `--------------------------------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( +[_RAISE] = KEYMAP( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - + /* Mouse Layer (semi-col) * ,------+------+------+------+------+------------------------------------------------. * | ACCL0| ACCL1| ACCL2| | | | | | | | | | @@ -184,15 +184,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | BTN1 | | | | BTN1 | | | | | | * `--------------------------------------------------------------------------------------------------------' */ - -[_MOUSECURSOR] = KEYMAP( + +[_MOUSECURSOR] = KEYMAP( KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R,DEMOMACRO,_______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, \ _______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______ \ ), - + /* Adjust (Lower + Raise) * ,------+------+------+------+------+------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | @@ -206,14 +206,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | | * `--------------------------------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( +[_ADJUST] = KEYMAP( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ) - + }; @@ -255,7 +255,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -264,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -366,12 +366,12 @@ void matrix_scan_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() {cc - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -383,7 +383,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif @@ -397,11 +397,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) eeconfig_init(); } - switch (id) { + switch (id) { case KC_DEMOMACRO: if (record->event.pressed){ return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } + } } return MACRO_NONE; @@ -483,7 +483,7 @@ void iota_gfx_task_user(void) { default: matrix_write(&matrix, buf); } - + // Host Keyboard LED Status char led[40]; snprintf(led, sizeof(led), "\n%s %s %s", diff --git a/keyboards/hadron/keymaps/side_numpad/keymap.c b/keyboards/hadron/keymaps/side_numpad/keymap.c index a5ccfd0222d1..6b00a0b664c5 100644 --- a/keyboards/hadron/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/keymaps/side_numpad/keymap.c @@ -81,14 +81,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ~ | Ctrl | Alt | GUI |Lower |Space |Space |Raise | RAlt | Ins | Del |NumLay| 0 | . | ENT | * `--------------------------------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( +[_QWERTY] = KEYMAP( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_MC(KC_SCLN), CTL_ENT, KC_P4, KC_P5, KC_P6, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL, KC_P1, KC_P2, KC_P3, \ KC_GRV, KC_RCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_INS, KC_DEL, TG_NUMLAY, KC_P0, KC_PDOT, KC_PENT \ ), - + /* Lower * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -102,14 +102,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Next | Vol- | Vol+ | Play | | | | * `--------------------------------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( +[_LOWER] = KEYMAP( KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_BSLS, _______, _______, _______, \ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, _______, _______, _______, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_LCBR, KC_RCBR, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______\ ), - + /* Raise * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -123,14 +123,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | |Space | 0 | | Left | Down | Right| | | | | * `--------------------------------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( +[_RAISE] = KEYMAP( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PLUS, KC_BSLS, _______, _______, _______, \ _______, KC_A, KC_UP, KC_D, KC_PSCR, _______, KC_4, KC_5, KC_6, KC_PAST, KC_COLN, KC_QUOT, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC__MUTE, _______, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______ \ ), - + /* FN layer on Esc key * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -144,14 +144,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Next | Vol- | Vol+ | Play | | | | * `--------------------------------------------------------------------------------------------------------' */ -[_FNLAYER] = KEYMAP( +[_FNLAYER] = KEYMAP( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, _______, _______, _______, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, _______, _______, _______, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS), S(KC_NUBS), KC_LCBR, KC_RCBR, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______ \ ), - + /* Num Layer * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -165,14 +165,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | Exit | Left | Down | Rght | * `--------------------------------------------------------------------------------------------------------' */ -[_NUMLAY] = KEYMAP( +[_NUMLAY] = KEYMAP( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_UP, KC_PPLS, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ ), - + /* Mouse Layer (semi-col) * ,-----------------------------------------------------------------------------------. * | |ACCL0| ACCL1| ACCL2 | | | | | | | | | @@ -186,17 +186,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | BTN1 | | | | BTN1 | | | | | | * `--------------------------------------------------------------------------------------------------------' */ - -[_MOUSECURSOR] = KEYMAP( + +[_MOUSECURSOR] = KEYMAP( _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, DEMOMACRO, _______, _______, _______, _______, \ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, \ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - + /* Adjust (Lower + Raise) - + * ,-----------------------------------------------------------------------------------. * | Reset| | | | | | | | | VolD | VolU | Mute | * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. @@ -209,14 +209,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | | * `--------------------------------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( +[_ADJUST] = KEYMAP( RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, \ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_DEL, _______, _______, _______, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) - + }; @@ -257,7 +257,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -332,7 +332,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { rgblight_mode(4); layer_on(_NUMLAY); } else { - rgblight_mode(RGB_current_mode); + rgblight_mode(RGB_current_mode); layer_off(_NUMLAY); } } return false; @@ -376,12 +376,12 @@ void matrix_scan_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() {cc - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -393,7 +393,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif @@ -407,11 +407,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) eeconfig_init(); } - switch (id) { + switch (id) { case KC_DEMOMACRO: if (record->event.pressed){ return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } + } } return MACRO_NONE; @@ -493,7 +493,7 @@ void iota_gfx_task_user(void) { default: matrix_write(&matrix, buf); } - + // Host Keyboard LED Status char led[40]; snprintf(led, sizeof(led), "\n%s %s %s", diff --git a/keyboards/hadron/ver0/rules.mk b/keyboards/hadron/ver0/rules.mk index 0f9667a8ae72..a3952a5d338e 100644 --- a/keyboards/hadron/ver0/rules.mk +++ b/keyboards/hadron/ver0/rules.mk @@ -1,5 +1 @@ -#AUDIO_ENABLE ?= yes # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +#AUDIO_ENABLE ?= yes # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index 0f9667a8ae72..a3952a5d338e 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -1,5 +1 @@ -#AUDIO_ENABLE ?= yes # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +#AUDIO_ENABLE ?= yes # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/handwired/CMD60/rules.mk b/keyboards/handwired/CMD60/rules.mk index f50987cde950..d980716eaefd 100644 --- a/keyboards/handwired/CMD60/rules.mk +++ b/keyboards/handwired/CMD60/rules.mk @@ -66,8 +66,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../../Makefile -endif - diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c index c9a8ccdb69c0..c9b16e75e5fc 100644 --- a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c @@ -19,7 +19,7 @@ QWR, CDH, SYM, MOV, -NUM, +NUM, TRAN }; @@ -52,11 +52,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | | * -------------------------------------------------------------------------------' * |Bak/Mov| a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp| -* -------------------------------------------------------------------------------- +* -------------------------------------------------------------------------------- * |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- * |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- */ [_QWR] = KEYMAP( \ @@ -88,11 +88,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ESC: | ^ | { | } | @ | % | | [ | ( | ) | _ | [ | ] | \ | | * -------------------------------------------------------------------------------' * |Bak/Mov| ! | # | 0 | = | { | } | - | 1 | + | ] | ` | enter |PgUp| -* -------------------------------------------------------------------------------- +* -------------------------------------------------------------------------------- * |Lsft | ; | ~ | : | ~ | "|"| $ | * | | . | / | Rsft| Up| PgDn| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- * |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- */ [_SYM] = KEYMAP (\ @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, KC_SCLN, KC_TILDE, KC_COLN, KC_TILDE, KC_PIPE, KC_DLR, KC_ASTR, ____, KC_DOT , KC_SLSH, ____, ____, ____,\ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), -/* +/* * |ESC | MAC| Win|RdLn| VI | | | | | | | | | | | | * -------------------------------------------------------------------------------' * | | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bakspace| Del| @@ -111,11 +111,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | tab | | |Find| |pTab |DSOL|DelW| Up |DelW|DEOL| [ | ] | \ | | * -------------------------------------------------------------------------------' * |Bak/Mov| | | | |nTab |GSOL| <- | Dwn | -> | EOL | ' | enter |PgUp| -* -------------------------------------------------------------------------------- +* -------------------------------------------------------------------------------- * |Lsft |Undo| Cut|Copy|Pste| | | | | | / | Rsft| Up| PgDn| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- * |Lctl |Lgui |Lalt | Space/Sym | GUI | Sym | Rctl |Left|Down|Rght| -* --------------------------------------------------------------------------------- +* --------------------------------------------------------------------------------- */ [_MOV] = KEYMAP (\ @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ -) +) }; const uint16_t PROGMEM fn_actions[] = { @@ -155,23 +155,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWR: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif layer_off(_CDH); } return false; break; - + case CDH: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif layer_on(_CDH); } return false; break; - + case SYM: if (record->event.pressed) { layer_on(_SYM); @@ -180,12 +180,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + } return true; } - + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -195,7 +195,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if( id >= BABL_START_NUM && id < (BABL_START_NUM + BABL_NUM_MACROS ) ) { if (record->event.pressed) { // is there a case where this isn't desired? - + babblePaste ( record, id ); return MACRO_NONE; } @@ -215,7 +215,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) /* Colemak mod-dh moves the D key to the qwerty V position This hack makes apple-V_position do what I mean */ - case DHPASTE: + case DHPASTE: if(keyboard_report->mods & MOD_BIT(KC_LGUI) ) { if (record->event.pressed) { clear_keyboard_but_mods(); @@ -228,15 +228,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code(KC_D); } else { unregister_code(KC_D); - } + } } break; - + case VIBRK: // vi esc: if (record->event.pressed) { return MACRO( T(ESC),D(LSFT),T(SCLN),U(LSFT), END ); } - break; + break; diff --git a/keyboards/handwired/MS_sculpt_mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk index 5b8902031560..53769f81f40d 100644 --- a/keyboards/handwired/MS_sculpt_mobile/rules.mk +++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk @@ -44,5 +44,5 @@ USB = /dev/cu.usbmodem14141 -upload: build - $(SCULPT_UPLOAD_COMMAND) +# upload: build +# $(SCULPT_UPLOAD_COMMAND) diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c index 739fb2685029..21d91a8797e3 100644 --- a/keyboards/handwired/atreus50/keymaps/default/keymap.c +++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -166,7 +166,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -175,7 +175,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -227,12 +227,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -244,7 +244,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index 5e808dfa7f7e..2e2d48f6ab58 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -67,15 +67,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk index f50987cde950..c8dd19ef7b3d 100644 --- a/keyboards/handwired/fivethirteen/rules.mk +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -66,8 +66,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../../Makefile -endif - - diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk index e8b0c6048d4c..d980716eaefd 100644 --- a/keyboards/handwired/gamenum/rules.mk +++ b/keyboards/handwired/gamenum/rules.mk @@ -66,8 +66,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../Makefile -endif - diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index 913bcb93e2fc..91147ab4fb57 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/rules.mk @@ -65,19 +65,3 @@ 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 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 0e07bde403ab..fe01b544c803 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -65,19 +65,3 @@ 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 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index 0e07bde403ab..361b2e93af1b 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -64,20 +64,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d 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 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude +AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index e5a9533624d5..cfa693a73b90 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -58,8 +58,4 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA \ No newline at end of file diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c index 9710997472ca..afed1892a245 100644 --- a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c +++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -214,7 +214,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -266,12 +266,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -283,7 +283,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif \ No newline at end of file diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index 0e07bde403ab..fe01b544c803 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -65,19 +65,3 @@ 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 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index efb9ebdd74f1..ea5f2b76e8c9 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -161,7 +161,7 @@ along with this program. If not, see . #define ___ KC_NO -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 763fa5a27a81..e229b67e5410 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -686,7 +686,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( +[_QWERTY] = KEYMAP_CUSTOM( 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_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, @@ -706,7 +706,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ #ifdef LAYOUT_DVORAK -[_DVORAK] = KEYMAP( +[_DVORAK] = KEYMAP_CUSTOM( _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, @@ -728,7 +728,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_COLEMAK -[_COLEMAK] = KEYMAP( +[_COLEMAK] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -750,7 +750,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_NORMAN -[_NORMAN] = KEYMAP( +[_NORMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -772,7 +772,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_WORKMAN -[_WORKMAN] = KEYMAP( +[_WORKMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -792,7 +792,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | : | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = KEYMAP( +[_PUNC] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, @@ -811,7 +811,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | x | | | | | 0 | , | . | : | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = KEYMAP( +[_NUM] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______, @@ -830,7 +830,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUN] = KEYMAP( +[_FUN] = KEYMAP_CUSTOM( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, @@ -849,7 +849,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = KEYMAP( +[_GREEKU] = KEYMAP_CUSTOM( _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -868,7 +868,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = KEYMAP( +[_GREEKL] = KEYMAP_CUSTOM( _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -887,7 +887,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMPTY] = KEYMAP( +[_EMPTY] = KEYMAP_CUSTOM( 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, @@ -906,7 +906,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = KEYMAP( +[_EMOJI] = KEYMAP_CUSTOM( X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), @@ -925,7 +925,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = KEYMAP( +[_GUI] = KEYMAP_CUSTOM( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, @@ -944,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_SYS] = KEYMAP( +[_SYS] = KEYMAP_CUSTOM( DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk index b00ee9e0e0c6..492996841031 100755 --- a/keyboards/handwired/reddot/rules.mk +++ b/keyboards/handwired/reddot/rules.mk @@ -79,10 +79,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../../Makefile -endif - -upload: build - $(ATREUS_UPLOAD_COMMAND) +# upload: build +# $(ATREUS_UPLOAD_COMMAND) diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index aaf630f103a7..47dace8a22f5 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -20,6 +20,3 @@ AUDIO_ENABLE = no # Audio output on port C6 PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes -ifndef QUANTUM_DIR - include ../../Makefile -endif diff --git a/keyboards/hhkb/keymaps/jp_mac/Makefile b/keyboards/hhkb/keymaps/jp_mac/Makefile new file mode 100644 index 000000000000..a7f700f019c2 --- /dev/null +++ b/keyboards/hhkb/keymaps/jp_mac/Makefile @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/keymaps/jp_mac/keymap.c new file mode 100644 index 000000000000..e08bf33df114 --- /dev/null +++ b/keyboards/hhkb/keymaps/jp_mac/keymap.c @@ -0,0 +1,58 @@ +#include "hhkb.h" + +#define _______ KC_TRNS + + +/* Layer 0: HHKB JP + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * |Fn|`|Ctl|Cmd|Opt|Hnk| Spc |Mhk|Cmd|Opt| Fn||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +/* Layer 1: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | | + * |-----------------------------------------------------------| + * | || | | | | | | | | ||Del| | | + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP_JP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = KEYMAP_JP( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, KC_DEL, _______, _______ + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) { + return MACRO_NONE; +} + +const uint16_t PROGMEM fn_actions[] = { + +}; diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index ee7d11121cdc..ee64e037a6d6 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -1,182 +1,14 @@ -hhkb_qmk keyboard firmware -====================== +HHKB Alternate Controller +=== -## Quantum MK Firmware +An alternative controler for the HHKB designed by hasu. -You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. +Keyboard Maintainer: QMK Community +Hardware Supported: HHKB Alternate Controller +Hardware Availability: https://geekhack.org/index.php?topic=12047.0 - BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - MIDI_ENABLE = yes # MIDI controls - # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not // - BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +Make example for this keyboard (after setting up your build environment): -## Quick aliases to common actions + make hhkb-default -Your keymap can include shortcuts to common operations (called "function actions" in tmk). - -### Switching and toggling layers - -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -### Fun with modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`. - - KC_TILD ~ - KC_EXLM ! - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_LCBR { - KC_RCBR } - KC_PIPE | - KC_COLN : - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - -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: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - -### Temporarily setting the default layer - -`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. - -### Remember: These are just aliases - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -## Macro shortcuts: Send a whole string when pressing just one key - -Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). - -```c -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes - } - break; - } - return MACRO_NONE; -}; -``` -A macro can include the following commands: - -* I() change interval of stroke in milliseconds. -* D() press key. -* U() release key. -* T() type key(press and release). -* W() wait (milliseconds). -* END end mark. - -So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. - -Note: Using macros to have your keyboard send passwords for you is a bad idea. - -### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) - -Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - - #include "keymap_.h" - -Where is "colemak" or "dvorak". After including this line, you will get access to: - - * `CM_*` for all of the Colemak-equivalent characters - * `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. - -## Additional language support - -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - -## Unicode support - -You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) -* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_` - sets the backlight to level *n* -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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/hhkb/rules.mk b/keyboards/hhkb/rules.mk index d31e755ef90a..b8bfd73d2a13 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -72,9 +72,9 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # UNICODE_ENABLE = yes # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -debug-on: all +# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +# debug-on: all -debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -debug-off: all +# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +# debug-off: all diff --git a/keyboards/infinity60/keymaps/jpetermans/readme.md b/keyboards/infinity60/keymaps/jpetermans/readme.md index b83057ea7b0a..00421015bd9e 100644 --- a/keyboards/infinity60/keymaps/jpetermans/readme.md +++ b/keyboards/infinity60/keymaps/jpetermans/readme.md @@ -18,7 +18,7 @@ digits mean "row" and "col", i.e. 45 means pin 4, column 5 in the IS31 datasheet The IS31 includes 8 led pages (or frames) 0-7 than can be displayed, and each page consists of 144 bytes. - **bytes 0 - 17** - LED control (on/off). - * 18 pins which alternate between A and B matrices (A1, B1, A2, B2, ..). + * 18 bytes which alternate between A and B matrices (A1, B1, A2, B2, ..). * Each byte controls the 8 leds on that pin with bits (8 to 1). - **bytes 8 - 35** - Blink control. * Same as LED control above, but sets blink on/off. @@ -47,7 +47,7 @@ write_led_page(5, led_numpad, 16); Remaining led control is done through the led mailbox using these message types: - **SET_FULL_ROW** (3 bytes) - message type, 8-bit mask, and row#. Sets all leds on one pin per the bit mask. - **OFF_LED, ON_LED, TOGGLE_LED** (3 bytes) - message type, led address, and page#. Off/on/toggle specific led. -- **BLINK_OFF_LED, BLINK_ON_LED, BLINK_OFF_LED** (3 bytes) - message type, led address, and page#. Set blink Off/on/toggle for specific led. +- **BLINK_OFF_LED, BLINK_ON_LED, BLINK_TOGGLE_LED** (3 bytes) - message type, led address, and page#. Set blink Off/on/toggle for specific led. - **TOGGLE_ALL** (1 byte) - Turn on/off full backlight. - **TOGGLE_BACKLIGHT** (2 bytes) - message type, on/off. Sets backlight completely off, no leds will display. - **DISPLAY_PAGE** (2 bytes) - message type, page to display. Switch to specific pre-set page. @@ -67,7 +67,7 @@ chMBPost(&led_mailbox, message, timeout); An example: ```c -//set the message to be sent. First byte (LSB) is the led address, and second is the message type +//set the message to be sent. First byte (LSB) is the message type, and second is the led address msg=(42 << 8) | ON_LED; //send msg to the led mailbox diff --git a/keyboards/infinity60/led.c b/keyboards/infinity60/led.c index 53147a78a53a..bef1f8623e4e 100644 --- a/keyboards/infinity60/led.c +++ b/keyboards/infinity60/led.c @@ -1,5 +1,6 @@ /* Copyright 2015 Jun Wako +Copyright 2017 jpetermans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c index 21f95a9c129c..f319f8c68830 100644 --- a/keyboards/infinity60/led_controller.c +++ b/keyboards/infinity60/led_controller.c @@ -1,5 +1,6 @@ /* Copyright 2016 flabbergast +Copyright 2017 jpetermans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/infinity60/led_controller.h b/keyboards/infinity60/led_controller.h index eb6060f26000..e4b47176464e 100644 --- a/keyboards/infinity60/led_controller.h +++ b/keyboards/infinity60/led_controller.h @@ -1,5 +1,6 @@ /* Copyright 2016 flabbergast +Copyright 2017 jpetermans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/infinity60/readme.md b/keyboards/infinity60/readme.md index 97457b40778e..bca26c69f930 100644 --- a/keyboards/infinity60/readme.md +++ b/keyboards/infinity60/readme.md @@ -1,29 +1,14 @@ -Infinity 60% keyboard firmware -====================== +Infinity 60% +============ -## Quantum MK Firmware +A compact community driven keyboard. -For the full Quantum feature list, see [the parent readme](/). +Keyboard Maintainer: QMK Community +Hardware Supported: Infinity 60% PCB +Hardware Availability: https://input.club/devices/infinity-keyboard/ -## Keymaps +Make example for this keyboard (after setting up your build environment): -Several versions of keymaps are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` - - -## Compiling - -Download or clone the whole firmware and navigate to the keyboards/infinity60 folder. Once your dev env is setup, you'll be able to use the `make` command to both compile your keymap and flash it to your keyboard. - -To just compile, which generates the output files in the `.build` folder at the root of the repository, run `make keymap`, where keymap is the name of the keymap that you want to compile. - -## Flashing - -To flash the firmware to the keyboard - -1. First press the flash button on the bottom of the keyboard. If you already have a flah button mapped in a keyboard layout running on the keyboard, you can also use that. -2. Then run `make keymap-dfu-util`, where keymap is the name of the keymap you want to flash. On Linux based operating systems you might need to run the comamnd as root, for example `sudo make keymap-dfu-util` on Ubuntu. - -**Tip** `make keymap-dfu-util` will also compile the keymap if needed, so you can skip the compilation step if you want to. + make infinity60-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/jc65/Makefile b/keyboards/jc65/Makefile new file mode 100644 index 000000000000..57b2ef62e5f3 --- /dev/null +++ b/keyboards/jc65/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/jc65/config.h b/keyboards/jc65/config.h new file mode 100644 index 000000000000..6e1306b27630 --- /dev/null +++ b/keyboards/jc65/config.h @@ -0,0 +1,63 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER dou +#define PRODUCT KEYCLACK65-V1 +#define DESCRIPTION JC65 PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* QMK JC65 PCB default pin-out */ +#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, F5 } +#define UNUSED_PINS + +#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 + +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + ) + + + +#endif diff --git a/keyboards/jc65/jc65.c b/keyboards/jc65/jc65.c new file mode 100644 index 000000000000..82b1d5741605 --- /dev/null +++ b/keyboards/jc65/jc65.c @@ -0,0 +1,28 @@ +#include "jc65.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/jc65/jc65.h b/keyboards/jc65/jc65.h new file mode 100644 index 000000000000..41ec3cf64e48 --- /dev/null +++ b/keyboards/jc65/jc65.h @@ -0,0 +1,21 @@ +#ifndef JC65_H +#define JC65_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ + {K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F}, \ + {K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F}, \ + {K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F}, \ +} + +#endif diff --git a/keyboards/jc65/keymaps/default/Makefile b/keyboards/jc65/keymaps/default/Makefile new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/jc65/keymaps/default/config.h b/keyboards/jc65/keymaps/default/config.h new file mode 100644 index 000000000000..a5568e400def --- /dev/null +++ b/keyboards/jc65/keymaps/default/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/default/keymap.c b/keyboards/jc65/keymaps/default/keymap.c new file mode 100644 index 000000000000..de787f3892a7 --- /dev/null +++ b/keyboards/jc65/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/jc65/keymaps/default/readme.md b/keyboards/jc65/keymaps/default/readme.md new file mode 100644 index 000000000000..13430a630b80 --- /dev/null +++ b/keyboards/jc65/keymaps/default/readme.md @@ -0,0 +1,10 @@ +Default Keymap +=== + +Super simple default keymap with only a base layer. + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: This is (as close as I can tell) the same as the layout that ships on the boards other than default underglow color. + +Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/Makefile b/keyboards/jc65/keymaps/jetpacktuxedo/Makefile new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/config.h b/keyboards/jc65/keymaps/jetpacktuxedo/config.h new file mode 100644 index 000000000000..a5568e400def --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c new file mode 100644 index 000000000000..af02b6f104f6 --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,25 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = 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, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/readme.md b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md new file mode 100644 index 000000000000..4083d8f470ff --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md @@ -0,0 +1,10 @@ +Jetpacktuxedo's Keymap +=== + +Split backspace, 6.25u space, caps is fn, my standard fn layer, reset + rgb controls on layer(2) + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: The base layer is the same, except caps is fn, and there are additional tools on layers + +Intended usage: This is my daily driver keymap diff --git a/keyboards/jc65/readme.md b/keyboards/jc65/readme.md new file mode 100644 index 000000000000..55ed72229c07 --- /dev/null +++ b/keyboards/jc65/readme.md @@ -0,0 +1,22 @@ +JC65 +=== + +![JC65](https://imgur.com/a/C2oa5) + +The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy. In the near future both PCB versions should be available from keyclack.com when the storefront part opens. + +These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: JC65 rev.qmk +Hardware Availability: [keyclack.com](https://keyclack.com/) + +Make example for this keyboard (after setting up your build environment): + + make jc65-default + +Or to make and flash: + + make jc65-default-dfu + +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/jc65/rules.mk b/keyboards/jc65/rules.mk new file mode 100644 index 000000000000..c2c02b6147a2 --- /dev/null +++ b/keyboards/jc65/rules.mk @@ -0,0 +1,68 @@ +# 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 +# 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 +RGBLIGHT_ENABLE = yes +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 diff --git a/keyboards/jd40/keymaps/vanagon/Makefile b/keyboards/jd40/keymaps/vanagon/Makefile new file mode 100644 index 000000000000..63aac4e597d4 --- /dev/null +++ b/keyboards/jd40/keymaps/vanagon/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/jd40/keymaps/vanagon/README.md b/keyboards/jd40/keymaps/vanagon/README.md new file mode 100644 index 000000000000..09a4e23a6ee4 --- /dev/null +++ b/keyboards/jd40/keymaps/vanagon/README.md @@ -0,0 +1,17 @@ +Vanagon +=== +Port of [evangs'](https://thevankeyboards.com) [MiniVan layout](https://www.massdrop.com/talk/115/where-did-all-my-keys-go-a-look-into-the-function-layers-of-the-mini-van) to the JD40. Includes colon/semicolon support, which is missing from the MiniVan layout. + +This layout uses a 44 key configuration similar to the following: + +``` +,------+------+------+------+------+------+------+------+------+------+------+------. +| | | | | | | | | | | | | +|------`------`------`------`------`------`------`------`------`------`------`------| +| | | | | | | | | | | | +|-------`------`------`------`------`------`------`------`------`------`------------| +| | | | | | | | | | | | +|---------`------`------`------`------`------'-------`------`------`------`---------| +| | | | | | | | | | | +`------+------+------+-------+----^^^-----+----^^^-----+-------+------+------+------' +``` diff --git a/keyboards/jd40/keymaps/vanagon/config.h b/keyboards/jd40/keymaps/vanagon/config.h new file mode 100644 index 000000000000..65d2fe6f9874 --- /dev/null +++ b/keyboards/jd40/keymaps/vanagon/config.h @@ -0,0 +1,13 @@ +#include "../../config.h" + +#define KEYMAP_VANAGON(\ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ + K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \ + K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \ + K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23 }, \ + { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34 }, \ + { K35, K36, K37, K38, K39, KC_NO, K40, K41, K42, K43, K44 } \ +} diff --git a/keyboards/jd40/keymaps/vanagon/keymap.c b/keyboards/jd40/keymaps/vanagon/keymap.c new file mode 100644 index 000000000000..34314614c647 --- /dev/null +++ b/keyboards/jd40/keymaps/vanagon/keymap.c @@ -0,0 +1,29 @@ +#include "jd40.h" +#include "action_layer.h" + +enum { + _BL = 0, + _AL1, + _AL2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = KEYMAP_VANAGON( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_AL1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MO(_AL1), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2) + ), + [_AL1] = KEYMAP_VANAGON( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_COLN, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, KC_ESC, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_AL2] = KEYMAP_VANAGON( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_SCLN, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/jd40/readme.md b/keyboards/jd40/readme.md index 7daa0980ebce..1684a562e0cc 100644 --- a/keyboards/jd40/readme.md +++ b/keyboards/jd40/readme.md @@ -1,17 +1,14 @@ -## jd40 mkii keyboard firmware +JD40 +=== - Pins: - MATRIX_ROW_PINS { F0, F1, F5, B4 } - MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } - RGB_DI_PIN D3 - -====================== +A compact 40% keyboard. -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: JD40 PCB +Hardware Availability: [1up](https://1upkeyboards.com/jd40-mkii-1up-keyboards-logo-pcb.html) [mechanicalkeyboards.com](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=2452) [originative](https://originative.co/products/jd40-pcb) -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Make example for this keyboard (after setting up your build environment): -## Building + make atreus-default -Download or clone the whole firmware and navigate to the keyboards/jd40 folder. -Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file. +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/jd45/readme.md b/keyboards/jd45/readme.md index 2822666e8918..4bed1be41651 100644 --- a/keyboards/jd45/readme.md +++ b/keyboards/jd45/readme.md @@ -1,4 +1,14 @@ -JD45 keyboard firmware -====================== +JD45 +=== -TODO: to be updated. +A compact 45% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: JD45 PCB +Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_list&c=346 + +Make example for this keyboard (after setting up your build environment): + + make jd45-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/kbd75/readme.md b/keyboards/kbd75/readme.md new file mode 100644 index 000000000000..42fdc0d38622 --- /dev/null +++ b/keyboards/kbd75/readme.md @@ -0,0 +1,12 @@ +KBD75 +=== + +Keyboard Maintainer: QMK Community +Hardware Supported: KBD75 PCB +Hardware Availability: https://kbdfans.myshopify.com/products/kbd75-keyboard-set?variant=35638534029 + +Make example for this keyboard (after setting up your build environment): + + make kbd75-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/kc60/kc60.h b/keyboards/kc60/kc60.h index c3a0165c092c..0fdd3701a9f7 100644 --- a/keyboards/kc60/kc60.h +++ b/keyboards/kc60/kc60.h @@ -35,8 +35,6 @@ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ } -#endif - /* Default layout * ,-----------------------------------------------------------------------------------------. * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | @@ -51,6 +49,20 @@ * `-----------------------------------------------------------------------------------------' */ +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ +} + /* Mini Lshift * ,-----------------------------------------------------------------------------------------. * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | @@ -91,4 +103,6 @@ * |-----------------------------------------------------------------------------------------+ * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | * `-----------------------------------------------------------------------------------------' - */ \ No newline at end of file + */ + +#endif \ No newline at end of file diff --git a/keyboards/kc60/keymaps/mechmerlin/keymap.c b/keyboards/kc60/keymaps/mechmerlin/keymap.c new file mode 100644 index 000000000000..97d458dec4f7 --- /dev/null +++ b/keyboards/kc60/keymaps/mechmerlin/keymap.c @@ -0,0 +1,61 @@ +// This is the 60% layout preferred by u/merlin36 the host of the MechMerlin YouTube channel. +// The layout is highly influenced by the WKL B.Face and KBP V60 standard layouts. +// Layout designed for use on KC60 with no inswitch or underglow lighting. + +#include "kc60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( /* Basic QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(2), KC_RALT, KC_RGUI, KC_RCTL \ + ), + [1] = KEYMAP( /* HHKB-ish Base Layout */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(3), KC_RALT, KC_RGUI, KC_RCTL \ + ), + [2] = KEYMAP( /* FN Layer 1 - Basic QWERTY */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_NO, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, TG(4), KC_NO, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + ), + [3] = KEYMAP( /* FN Layer 2 - HHKB-ish Base Layout */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = KEYMAP( /* Arrow Layers - Basic QWERTY ONLY */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + [5] = KEYMAP( /* Blank Layer for later usage */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + return MACRO_NONE; +}; diff --git a/keyboards/kc60/keymaps/mechmerlin/readme.md b/keyboards/kc60/keymaps/mechmerlin/readme.md new file mode 100644 index 000000000000..3a67ab17f9dd --- /dev/null +++ b/keyboards/kc60/keymaps/mechmerlin/readme.md @@ -0,0 +1,20 @@ +MechMerlin's KC60 Layout +====================== + +This is the 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. +It has 5 layers, base QWERTY, base HHKB, FN 1, FN 2(HHKB), and an arrows only layer. + +Merlin's KC60 was acquired from Massdrop: https://www.massdrop.com/buy/kc60-mechanical-keyboard and is the Co-Star stabilizer version + +If you would like to program your KC60 using the manufacturer recommended approach, please follow the guide on keychatter: https://www.keychatter.com/2015/07/05/programming-the-kc60/. + +## Keymap Notes +- Highly influenced by the KBP V60 and WKL B.Face standard layouts +- Does not support any form of inswitch or underglow lighting as Merlin hates them. +- Arrow toggle switch is FN + Space +- Reset is FN + R +- HHKB keymap is approximate as keyboard is not built like HHKB + + +### Build +To build this keymap, simply run `make KEYMAP=mechmerlin`. diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index 9e3b9bb656a8..36e1c6506de2 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -6,9 +6,6 @@ #define _FUN 3 #define _MS 4 -#define _______ KC_NO -#define XXXXXXX KC_TRNS - #define _DK_ACT 0 #define _DK_REL 1 #define _KC_COMS 2 diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index d5b94fb83d13..e4f590b1b15c 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -66,3 +66,5 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/kinesis/alvicstep/rules.mk b/keyboards/kinesis/alvicstep/rules.mk index fb421a34fc1f..76e69d027850 100644 --- a/keyboards/kinesis/alvicstep/rules.mk +++ b/keyboards/kinesis/alvicstep/rules.mk @@ -1,9 +1,5 @@ -ifndef QUANTUM_DIR - include ../../../Makefile -endif - # just silently stop, since we need to upload with teensy uploader -upload: build +# upload: build diff --git a/keyboards/kitten_paw/readme.md b/keyboards/kitten_paw/readme.md index a6ef2a067252..55fac2ba5bec 100644 --- a/keyboards/kitten_paw/readme.md +++ b/keyboards/kitten_paw/readme.md @@ -1,32 +1,16 @@ -kitten_paw keyboard firmware -====================== -This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies. -Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies). +kitten_paw +========== -NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me. - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/kitten_paw folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. +This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies. Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies). -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps +NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me. -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. +Keyboard Maintainer: QMK Community +Hardware Supported: Kitten Paw PCB +Hardware Availability: https://geekhack.org/index.php?topic=46700.0 -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: +Make example for this keyboard (after setting up your build environment): -``` -$ make keymap=[default|jack|] -``` + make kitten_paw-default -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +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/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 9553309f89af..2768eb56e3e7 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -206,7 +206,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -215,7 +215,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -224,7 +224,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -296,14 +296,14 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE startup_user(); #endif - RGB_current_mode = rgblight_config.mode; + RGB_current_mode = rgblight_config.mode; } //SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h #ifdef SSD1306OLED void matrix_master_OLED_init (void) { TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display + iota_gfx_init(); // turns on the display } void matrix_scan_user(void) { @@ -316,12 +316,12 @@ void matrix_scan_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -333,7 +333,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif @@ -352,7 +352,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed){ return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); } - + } return MACRO_NONE; @@ -435,7 +435,7 @@ void iota_gfx_task_user(void) { default: matrix_write(&matrix, buf); } - + // Host Keyboard LED Status char led[40]; snprintf(led, sizeof(led), "\n%s %s %s", diff --git a/keyboards/ergodox/keymaps/sethbc/Makefile b/keyboards/lets_split/keymaps/dale/Makefile similarity index 100% rename from keyboards/ergodox/keymaps/sethbc/Makefile rename to keyboards/lets_split/keymaps/dale/Makefile diff --git a/keyboards/lets_split/keymaps/ergodoxish/config.h b/keyboards/lets_split/keymaps/dale/config.h similarity index 100% rename from keyboards/lets_split/keymaps/ergodoxish/config.h rename to keyboards/lets_split/keymaps/dale/config.h diff --git a/keyboards/lets_split/keymaps/ergodoxish/keymap.c b/keyboards/lets_split/keymaps/dale/defaultkeymap.c similarity index 98% rename from keyboards/lets_split/keymaps/ergodoxish/keymap.c rename to keyboards/lets_split/keymaps/dale/defaultkeymap.c index 936312b2e032..42f81a0eb894 100644 --- a/keyboards/lets_split/keymaps/ergodoxish/keymap.c +++ b/keyboards/lets_split/keymaps/dale/defaultkeymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -166,7 +166,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -175,7 +175,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/dale/keymap.c b/keyboards/lets_split/keymaps/dale/keymap.c new file mode 100644 index 000000000000..9eb220d43db9 --- /dev/null +++ b/keyboards/lets_split/keymaps/dale/keymap.c @@ -0,0 +1,250 @@ +// Can't Remember Sh*t Keymap for Let's Split +// Trying to fit as many characters as possible on the default layer +// as its easier for me to remember logical functions than characters +// Also, I like me some numpad + + +#include "lets_split.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _GAME 1 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, + BACKLIT, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | \ | Alt | Lower|SpcRse| Space|Raise | [ | - | = | ] | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, LT(4, KC_SPC), KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC) \ +), + +/* Game + * ,-----------------------------------------------------------------------------------. + * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = KEYMAP( \ + KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ , \ + KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + + +/* Lower (switched to # because KP# were weird in terminal emulators) + * ,-----------------------------------------------------------------------------------. + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | | | | | 0 | | | | KP_+ | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______, \ + KC_ESC, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, KC_PLUS, _______ \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | App | | | | | Ins | | Home | PGDN | PGUP | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV, \ + _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BSLASH, _______, \ + _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), \ + _______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP \ +) + + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. +{ + switch(id) { + case 0: // this would trigger when you hit a key mapped as M(0) + if (record->event.pressed) { + return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes + } + break; + } + return MACRO_NONE; +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case GAME: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(music_scale); + #endif + persistant_default_layer_set(1UL<<_GAME); + } + return false; + break; + + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); +} + +void shutdown_user() +{ + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c index 936312b2e032..42f81a0eb894 100644 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ b/keyboards/lets_split/keymaps/default/keymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -166,7 +166,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -175,7 +175,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/fabian/Makefile b/keyboards/lets_split/keymaps/fabian/Makefile new file mode 100644 index 000000000000..b8c82cb99d34 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/Makefile @@ -0,0 +1,9 @@ +# 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 +# +# UNICODE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/fabian/config.h b/keyboards/lets_split/keymaps/fabian/config.h new file mode 100644 index 000000000000..ba271d1ac6c4 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/config.h @@ -0,0 +1,34 @@ +/* +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c new file mode 100644 index 000000000000..14e5dcf1a891 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -0,0 +1,221 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | |Reset | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c index 1ef65c52b644..9da9e76f2e69 100644 --- a/keyboards/lets_split/keymaps/hexwire/keymap.c +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , , P0 ,PDOT, , + , , , , , , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| , , , , , , , , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -148,7 +148,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -166,7 +166,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 2aaab5e86a9e..66673e889c58 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -178,7 +178,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md new file mode 100644 index 000000000000..f2a051da14ec --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h new file mode 100644 index 000000000000..7f33a43630aa --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c new file mode 100644 index 000000000000..558370fa864e --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -0,0 +1,121 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DVORAK 0 +#define _ARROW 1 //F(1) +#define _SYMBOL 2 // F(2) +#define _NUMBER 3 // F(3) +#define _FUNCTION 4 // F(4) +#define _EMACS 5 // F(5) +#define _MACROS 6 // F(6) +#define _MOUSE 7 // F(7) + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + ARROW, + SYMBOL, + NUMBER, + FUNCTION, + EMACS, + MACROS, + MOUSE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = KEYMAP( \ + KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ + KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ + KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ + F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_ARROW] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_SYMBOL] = KEYMAP( \ + KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_NUMBER] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_FUNCTION] = KEYMAP( \ + KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_EMACS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MACROS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MOUSE] = KEYMAP( \ + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ +) +}; + +enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, +}; + +int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index 18d409f089c8..63cc0b99a41e 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -162,7 +162,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -171,7 +171,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/xk/Makefile b/keyboards/lets_split/keymaps/xk/Makefile new file mode 100644 index 000000000000..84bf8e1f595a --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/Makefile @@ -0,0 +1,19 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +USE_I2C = yes +TAP_DANCE_ENABLE = yes + +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/xk/config.h b/keyboards/lets_split/keymaps/xk/config.h new file mode 100644 index 000000000000..1def212119ae --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/config.h @@ -0,0 +1,44 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 300 +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_LAYER_TOGGLE 2 +#define ONESHOT_TIMEOUT 800 + +#define USE_I2C + +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#define MOUSEKEY_WHEEL_DELAY 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +// #define MASTER_LEFT +// #define _MASTER_RIGHT +#define EE_HANDS + + +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c new file mode 100755 index 000000000000..77db0abb74dd --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -0,0 +1,371 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _COLEMAK 0 +#define _KAMELOC 1 +#define _IKAPILA 2 +#define _IKASHFT 3 +#define _ARROWKY 4 +#define _FNCTION 5 +#define _NINEKEY 6 +#define _NAVIGAT 7 +#define _QWERTY 8 +#define _MLAYER 9 +#define _GRVTABL 15 + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + KAMELOC, + IKAPILA, + IKASHFT, + ARROWKY, + FNCTION, + NINEKEY, + NAVIGAT, + QWERTY, + MLAYER, + GRVTABL, +}; + +//TD Declarations +enum { +VOM = 0, +PRN, +EGT, +HRD, +XRD, +DSH, +ESC, +EQE, +PGN, +HND, +COD, +UND, +F11, +F12, +F13, +F14, +F15, +F16, +F17, +F18, +F19, +F20, +//unicode_inputctl +LINUX, +WIN, +WINSH, +OSX, +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// action-TAP for key/mod behavior LT(layer, KC) +#define XK_TAB LT(_FNCTION, KC_TAB) +#define XK_BSP LT(_KAMELOC, KC_BSPC) +#define XK_APO LT(_KAMELOC, KC_QUOT) + +#define XK_SPC LT(_IKAPILA, KC_SPC) +#define XK_ENT LT(_IKAPILA, KC_ENT) +#define XK_PGDN LT(_IKASHFT, KC_PGDN) +#define XK_PGUP LT(_IKASHFT, KC_PGUP) +#define PIPBOY LT(_FNCTION, KC_BSLS) +#define XK_DEL LT(_IKASHFT, KC_DEL) +#define XK_GRV LT(_GRVTABL, KC_GRV) + +// mod-TAP for mod/key behavior MT(modkey, KC) +#define ALT_IT MT(MOD_RALT, KC_SCLN) +#define CTL_IT MT(MOD_RCTL, KC_DOT) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) + +//sticky modifiers +#define KYCTL OSM(MOD_LCTL) +#define KYSFT OSM(MOD_LSFT) +#define CAKY OSM(MOD_LCTL | MOD_LALT) + +//shortcuts +#define CADEL LALT(LCTL(KC_DEL)) +#define CAINS LALT(LCTL(KC_INS)) +#define TGNKRO MAGIC_TOGGLE_NKRO + +#define NAVCH LCTL(KC_HOME) +#define NAVCPD LCTL(KC_PGDN) +#define NAVCPU LCTL(KC_PGUP) +#define NAVCE LCTL(KC_END) +#define NAVCU LCTL(KC_UP) +#define NAVCD LCTL(KC_DOWN) +#define NAVCL LCTL(KC_LEFT) +#define NAVCR LCTL(KC_RGHT) +#define NAVGU LGUI(KC_UP) +#define NAVGD LGUI(KC_DOWN) +#define NAVGL LGUI(KC_LEFT) +#define NAVGR LGUI(KC_RGHT) + +#define KC_NDSH LCTL(KC_PMNS) +#define KC_MDSH LALT(LCTL(KC_PMNS)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + TAP + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │TAB │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │DEL │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │BKSP│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSFT│ X │ C │ D │ V │ Z │ │ K │ H │ , │ │ . │ / │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OCTL│GUI │ESC │ALT │PGUP│SPC │ │ENT │PGDN│ () │ {} │ \ │ ` │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + HOLD + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │L FN│ │ │ │ │ │ │ │ │ │ │ALT │L!@#│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │L OH│ │ │ │ │ │ │ │ │ │ │ │L OH│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SFT │ │ │ │ │ │ │ │ │ │ │CTL │SFT │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │CTL │GUI │ESC │ALT │L!@#│L123│ │L123│L!@#│L M│ │L FN│LGRV│ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + DOUBLETAP + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│OSML│!F4 │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + Switch type + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │Br │mxC │Z │Z │Z │Z │ │Z │Z │Z │Z │Br │G │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │G │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │Z │Z │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Z │Z │Z │Z │Z │ │Z │Z │Z │B │B │Y │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Y │mxC │Z │BLK │BLK │ │BLK │BLK │Z │Z │B │G │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + with DCS keycaps + Top Row R1 (reversed?) + M Row1 R3 (with reversed pointer finger) + M Row2 R4 + B Row R2 (reversed) +*/ + +// Colemak PB&J (Mod-DH) +[_COLEMAK] = KEYMAP( \ + XK_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, XK_DEL, \ + XK_BSP, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, XK_APO, \ + KYSFT, KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, TD(COD), KC_DOT, CTL_IT, SFT_T(KC_SLSH), \ + KYCTL, KC_LGUI, TD(ESC), KC_LALT, XK_PGUP, XK_SPC, XK_ENT, XK_PGDN, MO(_MLAYER), TT(_NAVIGAT), PIPBOY, XK_GRV \ +), + +// useful for one-handed typing +[_KAMELOC] = KEYMAP( \ + XK_DEL, KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, XK_TAB, \ + _______, KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, _______, \ + KYSFT, KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, TD(UND), KC_V, KC_D, KC_C, KC_X, KYSFT, \ + XK_GRV, PIPBOY, M(1), KC_BTN1, KC_HOME, KC_ENT, KC_ENT, KC_END, KC_LGUI, TD(ESC), KC_LALT, KYCTL \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│INS │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ - │ = │TGL │ │ │ │HOME│END │HOME│ │ \ │ ~ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ +[_IKAPILA] = KEYMAP( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), KC_INS, \ + _______, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, LCTL(KC_Z), KC_HOME, TD(HND), KC_HOME, XXXXXXX, KC_BSLS, KC_TILD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │BSPC│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │DEL │ │ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│PSCR│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ _ │ + │END │HOME│END │ │ │ │ │ [ │ ] │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ + +[_IKASHFT] = KEYMAP( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, TD(PGN), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MNXT, KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, KC_PSCR, \ + _______, KC_UNDS, KC_PLUS, KC_END, KC_HOME, KC_END, M(1), M(0), M(2), KC_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ + │ │ → │ ↑ │ ← │ ↓ │ → │ │ → │ ↓ │ ← │ ↑ │ ↑ │ │ just in case someone hacks my IP with a 10MeG pipe, you know? + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ ← │ ↓ │ → │ ↑ │ ← │ │ ↑ │ ← │ ↓ │ → │ ← │ │ hacker_evasion layer + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ >>init network SEQUENCE + │ │ ↑ │ ← │ ↓ │ → │ ↑ │ │ ↓ │ ← │ ↑ │ → │ ← │ │ sleep 11; echo "DONE\n" + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ throttle INPUT 11001001 OUTPUT 010011001 ? FULL )); \ + │ │ │ │ → │ ← │ ↓ │ │ → │ ↑ │ ← │ ↓ │ ↑ │ │ <event.pressed) { + switch(id) { + case 0: + return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); + case 1: + return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); + case 2: + return MACRO( T(LBRC), T(RBRC), T(LEFT), END); + case 3: + clear_keyboard(); + case 4: + return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); + case WINSH: + set_unicode_input_mode(UC_WIN); + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + return false; + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index f7dc24a44718..476e7fd2aa02 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -1,12 +1,9 @@ #ifndef LETS_SPLIT_H #define LETS_SPLIT_H -#ifdef SUBPROJECT_rev1 - #include "rev1.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "rev2.h" -#endif +#include "quantum.h" + +#include QMK_SUBPROJECT_H // Used to create a keymap using only KC_ prefixed keys #define KC_KEYMAP( \ @@ -22,6 +19,7 @@ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) -#include "quantum.h" +#define LAYOUT_ortho_4x12 KEYMAP +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP #endif \ No newline at end of file diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index 81dfb14455ae..4def27239c5d 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #define ERROR_DISCONNECT_COUNT 5 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } +#endif - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } + debouncing = false; } - } +# endif return 1; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } - return result; + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } static void unselect_rows(void) { - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static void select_row(uint8_t row) +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } } + +#endif diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 610b776ee14d..0ef7ff59d7ed 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -106,7 +106,7 @@ Notes on Software Configuration ------------------------------- Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATIX_ROWS` in `config.h` is the total number of rows between +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between the two halves, i.e. if your split keyboard has 4 rows in each half, then `MATRIX_ROWS=8`. @@ -115,7 +115,7 @@ not be very difficult to adapt it to support more if required. Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `lets_split` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` diff --git a/keyboards/lets_split/rev1/rev1.c b/keyboards/lets_split/rev1/rev1.c index c505d3a6e317..74eed277b23c 100644 --- a/keyboards/lets_split/rev1/rev1.c +++ b/keyboards/lets_split/rev1/rev1.c @@ -9,7 +9,7 @@ void matrix_init_kb(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif // // green led on @@ -25,7 +25,7 @@ void matrix_init_kb(void) { void shutdown_user(void) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); #endif diff --git a/keyboards/lets_split/rev1/rules.mk b/keyboards/lets_split/rev1/rules.mk index a0825b4ef640..f845616741c2 100644 --- a/keyboards/lets_split/rev1/rules.mk +++ b/keyboards/lets_split/rev1/rules.mk @@ -1,5 +1 @@ -BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c index 20a4c6be1ef3..88903f7f4fcf 100644 --- a/keyboards/lets_split/rev2/rev2.c +++ b/keyboards/lets_split/rev2/rev2.c @@ -16,7 +16,7 @@ void matrix_init_kb(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif // // green led on @@ -32,7 +32,7 @@ void matrix_init_kb(void) { void shutdown_user(void) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); #endif diff --git a/keyboards/lets_split/rev2/rules.mk b/keyboards/lets_split/rev2/rules.mk index 80a942d06f7c..7b30c0beff2a 100644 --- a/keyboards/lets_split/rev2/rules.mk +++ b/keyboards/lets_split/rev2/rules.mk @@ -1,5 +1 @@ BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index cc87ee31c602..7b7224fd4d47 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -75,14 +75,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [ -z $$USB ]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude +LAYOUTS = ortho_4x12 \ No newline at end of file diff --git a/keyboards/lets_split/serial.c b/keyboards/lets_split/serial.c index 6faed09ce077..74bcbb6bf6e2 100644 --- a/keyboards/lets_split/serial.c +++ b/keyboards/lets_split/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 39639c3b4bd8..346cbc908949 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else diff --git a/keyboards/mechmini/README.md b/keyboards/mechmini/README.md index 72743319fa5b..ed590f3f1bae 100644 --- a/keyboards/mechmini/README.md +++ b/keyboards/mechmini/README.md @@ -1,16 +1,24 @@ -mechmini keyboard firmware -========================== +mechmini +======== -This is a port of the QMK firmware for boards that are based on the -ps2avrGB firmware, like the [ps2avrGB -keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold -by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). +A compact ortholinear/staggered keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: mechmini PCB +Hardware Availability: https://mechkeys.ca/collections/keyboards/products/mechmini-2-0-pcb + +Make example for this keyboard (after setting up your build environment): + + make mechmini-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. + +## Mechmini Notes Note that this is a complete replacement for the firmware, so you won't be using Bootmapper Client to change any keyboard settings, since not all the USB report options are supported. - ## Installing First, install the requirements. These commands are for OSX, but all you diff --git a/keyboards/minidox/eeprom-lefthand.eep b/keyboards/minidox/eeprom-lefthand.eep new file mode 100644 index 000000000000..e5a7bc1e5726 --- /dev/null +++ b/keyboards/minidox/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0F000000000000000000000000000000000001F0 +:00000001FF diff --git a/keyboards/minidox/eeprom-righthand.eep b/keyboards/minidox/eeprom-righthand.eep new file mode 100644 index 000000000000..7ea44f52ef74 --- /dev/null +++ b/keyboards/minidox/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0F000000000000000000000000000000000000F1 +:00000001FF diff --git a/keyboards/minidox/i2c.h b/keyboards/minidox/i2c.h index 08ce4b0093a0..c15b6bc5065e 100644 --- a/keyboards/minidox/i2c.h +++ b/keyboards/minidox/i2c.h @@ -16,7 +16,7 @@ #define SLAVE_BUFFER_SIZE 0x10 // i2c SCL clock frequency -#define SCL_CLOCK 100000L +#define SCL_CLOCK 400000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; @@ -28,4 +28,22 @@ uint8_t i2c_master_read(int); void i2c_reset_state(void); void i2c_slave_init(uint8_t address); + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + #endif diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 3fa20e1ebe04..06f663c2aec4 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -129,7 +129,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } diff --git a/keyboards/minidox/keymaps/that_canadian/config.h b/keyboards/minidox/keymaps/that_canadian/config.h index 7a8193e08197..5832d1866ed7 100644 --- a/keyboards/minidox/keymaps/that_canadian/config.h +++ b/keyboards/minidox/keymaps/that_canadian/config.h @@ -25,10 +25,12 @@ along with this program. If not, see . #define USE_SERIAL +#define EE_HANDS + /* ws2812 RGB LED */ #define RGB_DI_PIN D7 #define RGBLIGHT_TIMER -#define RGBLED_NUM 4 // Number of LEDs +#define RGBLED_NUM 8 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/minidox/keymaps/that_canadian/keymap.c b/keyboards/minidox/keymaps/that_canadian/keymap.c index da9905346ea2..b1ca139b7bb4 100644 --- a/keyboards/minidox/keymaps/that_canadian/keymap.c +++ b/keyboards/minidox/keymaps/that_canadian/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Z | X | C | V | B | | N | M | , | . | / | * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. - * | Ctrl | LOWER| | | | RAISE| Shift| + * | Shift| LOWER| | | | RAISE| Ctrl | * `-------------| Space| |BckSpc|------+------. * | | | | * `------' `------' @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ - KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) \ + OSM(MOD_LSFT), LOWER, KC_SPC, KC_BSPC, RAISE, KC_LCTL \ ), /* Raise @@ -101,9 +101,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,----------------------------------. ,----------------------------------. * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | Up | F9 | F10 | * |------+------+------+------+------| |------+------+------+------+------| - * | F11 | F12 | | | | | | Left | Down |Right |caltde| + * | F11 | F12 | |RGBSAI|RGBSAD| | | Left | Down |Right |caltde| * |------+------+------+------+------| |------+------+------+------+------| - * | Reset| | | | | | | | F8 |Taskmg| | + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| |RGBVAI|RGBVAD| F8 |Taskmg| | * `----------------------------------' `----------------------------------' * ,--------------------. ,------,-------------. * | | LOWER| | | | RAISE| | @@ -119,10 +119,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -132,9 +128,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif persistant_default_layer_set(1UL<<_QWERTY); } return false; diff --git a/keyboards/minidox/matrix.c b/keyboards/minidox/matrix.c index 13896900421f..81dfb14455ae 100644 --- a/keyboards/minidox/matrix.c +++ b/keyboards/minidox/matrix.c @@ -226,9 +226,7 @@ uint8_t matrix_scan(void) TXLED0; error_count = 0; } - matrix_scan_quantum(); - return ret; } diff --git a/keyboards/minidox/readme.md b/keyboards/minidox/readme.md index f6227386dea2..c15fd244a4e2 100644 --- a/keyboards/minidox/readme.md +++ b/keyboards/minidox/readme.md @@ -1,7 +1,7 @@ -ECO -=== +MiniDox +===== -![MimiDox](http://i.imgur.com/iWb3yO0.jpg) +![MiniDox](http://i.imgur.com/iWb3yO0.jpg) A compact version of the ErgoDox @@ -13,3 +13,63 @@ Make example for this keyboard (after setting up your build environment): make minidox-rev1-default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Build Guide + +A build guide for putting together the MiniDox v1 can be found here: [MiniDox Build Log / Guide](http://imgur.com/a/vImo6) + +Flashing +------- +Note: Most of this is copied from the Let's Split readme, because it is awesome + +From the `minidox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +Example: `make rev1-default-avrdude` + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. diff --git a/keyboards/minidox/rev1/config.h b/keyboards/minidox/rev1/config.h index a858a5b902f1..9799c41994a0 100644 --- a/keyboards/minidox/rev1/config.h +++ b/keyboards/minidox/rev1/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . #define USE_SERIAL -// #define EE_HANDS +//#define EE_HANDS #define I2C_MASTER_LEFT //#define I2C_MASTER_RIGHT diff --git a/keyboards/minidox/split_util.c b/keyboards/minidox/split_util.c index 461921798f91..39639c3b4bd8 100644 --- a/keyboards/minidox/split_util.c +++ b/keyboards/minidox/split_util.c @@ -21,7 +21,8 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - #ifdef I2C_MASTER_RIGHT + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); @@ -32,6 +33,9 @@ static void setup_handedness(void) { static void keyboard_master_setup(void) { #ifdef USE_I2C i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif #else serial_master_init(); #endif diff --git a/keyboards/minidox/split_util.h b/keyboards/minidox/split_util.h index 6b896679cac4..595a0659e1dd 100644 --- a/keyboards/minidox/split_util.h +++ b/keyboards/minidox/split_util.h @@ -2,11 +2,7 @@ #define SPLIT_KEYBOARD_UTIL_H #include - -#ifdef EE_HANDS - #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 - #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END -#endif +#include "eeconfig.h" #define SLAVE_I2C_ADDRESS 0x32 @@ -19,4 +15,6 @@ void split_keyboard_setup(void); bool has_usb(void); void keyboard_slave_loop(void); +void matrix_master_OLED_init (void); + #endif diff --git a/keyboards/mitosis/readme.md b/keyboards/mitosis/readme.md index 70755e32ac18..ef1eb0d83230 100644 --- a/keyboards/mitosis/readme.md +++ b/keyboards/mitosis/readme.md @@ -1,33 +1,24 @@ -Mitosis Keyboard Firmware -====================== +Mitosis +======= -These configuration files were based off the Atreus keyboard. It assumes a Pro Micro is being used, however retains the 'make upload' feature from the Atreus branch. This keyboard uses a completely different 'matrix scan' system to other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the keyboard halves. The matrix.c file contains the code to poll the external microcontroller for the key matrix. As long as this file is not changed, all other QMK features are supported. - -Build log of the keyboard can be found [here](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/) +A wireless split compact keyboard. -Hardware design files can be found [here](https://github.com/reversebias/mitosis-hardware) - -Firmware for the nordic MCUs can be found [here](https://github.com/reversebias/mitosis) +Keyboard Maintainer: [@reversebias](https://github.com/reversebias] +Hardware Supported: Mitosis PCB +Hardware Availability: https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/ -## Quantum MK Firmware +Make example for this keyboard (after setting up your build environment): -For the full Quantum feature list, see [the parent readme](/). + make mitosis-default -## Building +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. -Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. +## Mitosis Notes -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. +These configuration files were based off the Atreus keyboard. It assumes a Pro Micro is being used, however retains the 'make upload' feature from the Atreus branch. This keyboard uses a completely different 'matrix scan' system to other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the keyboard halves. The matrix.c file contains the code to poll the external microcontroller for the key matrix. As long as this file is not changed, all other QMK features are supported. -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. +Build log of the keyboard can be found [here](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/) -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: +Hardware design files can be found [here](https://github.com/reversebias/mitosis-hardware) -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +Firmware for the nordic MCUs can be found [here](https://github.com/reversebias/mitosis) diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk index 04fa552f80a4..903edb10929e 100644 --- a/keyboards/mitosis/rules.mk +++ b/keyboards/mitosis/rules.mk @@ -77,5 +77,5 @@ UNICODE_ENABLE = YES # Unicode USB = /dev/ttyACM0 -upload: build - $(MITOSIS_UPLOAD_COMMAND) +# upload: build +# $(MITOSIS_UPLOAD_COMMAND) diff --git a/keyboards/miuni32/readme.md b/keyboards/miuni32/readme.md index 36696ddbcbdd..3f3ddc8dfb59 100644 --- a/keyboards/miuni32/readme.md +++ b/keyboards/miuni32/readme.md @@ -1,28 +1,14 @@ -miuni32 keyboard firmware -====================== +miuni32 +======= -## Quantum MK Firmware +A compact 30% keyboard. -For the full Quantum feature list, see [the parent readme](/). +Keyboard Maintainer: QMK Community +Hardware Supported: miuni32 PCB +Hardware Availability: https://zealpc.net/products/miuni32 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/miuni32 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make miuni32-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/nyquist/config.h b/keyboards/nyquist/config.h index 55500df79bb2..5e3dc9188879 100644 --- a/keyboards/nyquist/config.h +++ b/keyboards/nyquist/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . #include "config_common.h" -#ifdef SUBPROJECT_rev1 - #include "rev1/config.h" -#endif +#include QMK_SUBPROJECT_CONFIG_H #endif // CONFIG_H diff --git a/keyboards/nyquist/eeprom-lefthand.eep b/keyboards/nyquist/eeprom-lefthand.eep new file mode 100644 index 000000000000..b9666a74c01f --- /dev/null +++ b/keyboards/nyquist/eeprom-lefthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000001F4 +:00000001FF diff --git a/keyboards/nyquist/eeprom-righthand.eep b/keyboards/nyquist/eeprom-righthand.eep new file mode 100644 index 000000000000..94cc5be7fc68 --- /dev/null +++ b/keyboards/nyquist/eeprom-righthand.eep @@ -0,0 +1,2 @@ +:0B0000000000000000000000000000F5 +:00000001FF diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile new file mode 100644 index 000000000000..f8544328074c --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -0,0 +1,7 @@ +KEY_LOCK_ENABLE = yes +NKRO_ENABLE = yes +CONSOLE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md new file mode 100644 index 000000000000..4276591415db --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -0,0 +1,75 @@ +# 333fred's Nyquist Layout + +This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../../../ergodox/keymaps/333fred/README.md). It doesn't have all of my VS extensions, as I have my nyquist at home, not at work. + +## Layers + +### QWERTY +The shift modifiers on this layer all use OSM to allow for quick single capitalization. Press and hold F to go to the VIM movement layer. Layer is also a one-shot layer toggle, and can be held down to type multiple characters on the Lower layer. Game is a regular toggle layer. + +``` +Qwerty +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Lock | = | Game | Del | +`-----------------------------------------------------------------------------------' +``` + +### Lower +My symbol and numpad layer. APscr is a macro that sends ALT+PRSC, to take a screenshot of the current application. + +``` +Lower +,-----------------------------------------------------------------------------------. +| Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Pscr | | | | | | 0 | . | = | Prev | Next | Play | +`-----------------------------------------------------------------------------------' +``` + +### VIM Movement +Pressing and holding F moves to this layer, which turns hjkl into vim movement keys. a and d are macros which send WIN+Left and WIN+Right, respectively. Shift and CTRL have been remapped for ease of selecting text. +``` +Vim Movement (Hold down F) +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | LShft| | | | | | | | +`-----------------------------------------------------------------------------------' + ``` + +### Gaming +This layer is designed for playing games. All one-shot modification has been turned off, and the common game controls keys have been moved around for easier access. +``` +Gaming mode (Raise) +,-----------------------------------------------------------------------------------. +| ESC | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | | | | F | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h new file mode 100644 index 000000000000..86fe52165426 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/config.h @@ -0,0 +1,14 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL +#define MASTER_LEFT + +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c new file mode 100644 index 000000000000..2edfeefe7b5c --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -0,0 +1,135 @@ +#include "nyquist.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _VIM 2 +#define _GAME 3 + +enum custom_macros { + DLEFT, + DRIGHT, + PSCREEN_APP +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | + | Game | Del | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Pscr | | | | | | 0 | . | = | Prev | Next | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ + M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ + KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ +), + +/* Vim Movement (Hold down F) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | LShft| | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Gaming mode (Raise) + * All one-shot mods are disabled on this layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | | | | F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = KEYMAP( \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case DLEFT: + if (record->event.pressed) { // Windows move desktop left + return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); + } + break; + case DRIGHT: + if (record->event.pressed) { // Windows move desktop right + return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); + } + break; + case PSCREEN_APP: + if (record->event.pressed) { + return MACRO(D(LALT), T(PSCR), U(LALT), END); + } + break; + } + return MACRO_NONE; +} diff --git a/keyboards/nyquist/keymaps/default/Makefile b/keyboards/nyquist/keymaps/default/Makefile index 457a3d01d4a4..1e5761278801 100644 --- a/keyboards/nyquist/keymaps/default/Makefile +++ b/keyboards/nyquist/keymaps/default/Makefile @@ -1,3 +1,5 @@ +RGBLIGHT_ENABLE = yes + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/nyquist/keymaps/default/config.h index 624d284cac40..072d4a7ce211 100644 --- a/keyboards/nyquist/keymaps/default/config.h +++ b/keyboards/nyquist/keymaps/default/config.h @@ -31,4 +31,11 @@ along with this program. If not, see . // #define _MASTER_RIGHT // #define EE_HANDS +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + #endif \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/nyquist/keymaps/default/keymap.c index dcb68a6e069f..c0eeaa9088c0 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/nyquist/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ @@ -175,7 +175,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -184,7 +184,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/nyquist/keymaps/hexwire/keymap.c index 803d257a91fa..8661a3ec3654 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/nyquist/keymaps/hexwire/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , , P0 ,PDOT, , + , , , , , , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| , , , , , , , , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , + , , , , , , , , , , , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -179,7 +179,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index dcb94c67c8af..21eef94564e3 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #define ERROR_DISCONNECT_COUNT 5 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } +#endif - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } + debouncing = false; } - } +# endif return 1; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } - return result; + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } static void unselect_rows(void) { - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static void select_row(uint8_t row) +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } } + +#endif diff --git a/keyboards/nyquist/nyquist.h b/keyboards/nyquist/nyquist.h index e8cccecf5f6f..dcc2a4ffd458 100644 --- a/keyboards/nyquist/nyquist.h +++ b/keyboards/nyquist/nyquist.h @@ -1,9 +1,9 @@ #ifndef NYQUIST_H #define NYQUIST_H -#ifdef SUBPROJECT_rev1 - #include "rev1.h" -#endif +#include QMK_SUBPROJECT_H + +#include "quantum.h" // Used to create a keymap using only KC_ prefixed keys #define KC_KEYMAP( \ @@ -21,6 +21,6 @@ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ ) -#include "quantum.h" +#define LAYOUT_ortho_5x12 KEYMAP #endif \ No newline at end of file diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md index c70bf0257656..16debb987075 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/nyquist/readme.md @@ -1,167 +1,20 @@ -The Nyquist Keyboard -==================== +Nyquist +======= -The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It has been designed in a similar manner to the Let's Split v2 by /u/wootpatoot. Each half of the keyboard is arranged in a 5x6 grid. There is an option to use a 2u key with PCB mounted MX stablizers, in place of the two innermost 1u keys on the bottom row. +A split 60% split 5x12 ortholinear keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro +Hardware Availability: [Keebio](https://keeb.io) -## Build Guide +Make example for this keyboard (after setting up your build environment): -Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) + make nyquist-rev1-default -There is additional information there about flashing and adding RGB underglow. +Example of flashing this keyboard: -## First Time Setup + make nyquist-rev1-default-avrdude -Download or clone the whole firmware and navigate to the keyboards/nyquist directory. Once your development environment is setup, you'll be able to generate the default .hex using: +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. -``` -$ make serial -``` - -You will see a lot of output and if everything worked correctly you will see the built hex file: - -``` -nyquist_rev1_serial.hex -``` - -If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: - - -``` -$ make YOUR_KEYMAP_NAME -``` - -If everything worked correctly you will see a file: - -``` -nyquist_rev1_YOUR_KEYMAP_NAME.hex -``` - -For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. - -Features --------- - -For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). - -Some features supported by the firmware: - -* Either half can connect to the computer via USB, or both halves can be used - independently. -* You only need 3 wires to connect the two halves. Two for VCC and GND and one - for serial communication. -* Optional support for I2C connection between the two halves if for some - reason you require a faster connection between the two halves. Note this - requires an extra wire between halves and pull-up resistors on the data lines. - -### 2u Support -In place of the two innermost 1u keys on the bottom row, a single 2u key can be used. If you choose to use this option, then in your keymap, set the innermost key on the bottom row to what you want the 2u key to be. For example, if using the 2u key on the left half of the board, set the keycode for the lower right key. - -Required Hardware ------------------ - -Apart from diodes and key switches for the keyboard matrix in each half, you -will need: - -* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. -* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable - -Alternatively, you can use any sort of cable and socket that has at least 3 -wires. If you want to use I2C to communicate between halves, you will need a -cable with at least 4 wires and 2x 4.7kΩ pull-up resistors - -Optional Hardware ------------------ - -A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. - -Wiring ------- - -The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. -PD0 on the ATmega32u4) between the two Pro Micros. - -Then wire your key matrix to any of the remaining 17 IO pins of the pro micro -and modify the `matrix.c` accordingly. - -The wiring for serial: - -![serial wiring](http://imgur.com/BnCGU1Y) - -The wiring for i2c: - -![i2c wiring](http://imgur.com/5eiArDA) - -The pull-up resistors may be placed on either half. It is also possible -to use 4 resistors and have the pull-ups in both halves, but this is -unnecessary in simple use cases. - -Flashing -------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. -Example: `make rev1-serial-avrdude` - - -Choosing which board to plug the USB cable into (choosing Master) --------- -Because the two boards are identical, the firmware has logic to differentiate the left and right board. - -It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. - -The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. - -The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. - -### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. - -### Setting the right hand as master -If you always plug the usb cable into the right board, add an extra flag to your `config.h` -``` - #define MASTER_RIGHT -``` - -### Setting EE_hands to use either hands as master -If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. - -The EEPROM is used to store whether the -half is left handed or right handed. This makes it so that the same firmware -file will run on both hands instead of having to flash left and right handed -versions of the firmware to each half. To flash the EEPROM file for the left -half run: -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep -// or the equivalent in dfu-programmer - -``` -and similarly for right half -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) - -After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. - -Note that you need to program both halves, but you have the option of using -different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout using bootmagic's default layout option. -Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the -right half is connected. - - -Notes on Using Pro Micro 3.3V ------------------------------ - -Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects -the frequency on the 3.3V board. - -Also, if the slave board is producing weird characters in certain columns, -update the following line in `matrix.c` to the following: - -``` -// _delay_us(30); // without this wait read unstable value. -_delay_us(300); // without this wait read unstable value. -``` +A build guide for this keyboard can be found here: [Nyquist Build Guide](https://docs.keeb.io) diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h index af4f7dbb1c96..361576887138 100644 --- a/keyboards/nyquist/rev1/config.h +++ b/keyboards/nyquist/rev1/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . #ifndef REV1_CONFIG_H #define REV1_CONFIG_H -#include "../config.h" +#include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ #define VENDOR_ID 0xCEEB diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/nyquist/rev1/rev1.c index fc984e18c1e0..7b3228fa6592 100644 --- a/keyboards/nyquist/rev1/rev1.c +++ b/keyboards/nyquist/rev1/rev1.c @@ -1,4 +1,4 @@ -#include "nyquist.h" +#include QMK_SUBPROJECT_H #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); @@ -16,7 +16,7 @@ void matrix_init_kb(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif // // green led on @@ -32,7 +32,7 @@ void matrix_init_kb(void) { void shutdown_user(void) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); #endif diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/nyquist/rev1/rev1.h index f2d0ece790b7..cf9bf8020395 100644 --- a/keyboards/nyquist/rev1/rev1.h +++ b/keyboards/nyquist/rev1/rev1.h @@ -1,7 +1,7 @@ #ifndef REV1_H #define REV1_H -#include "../nyquist.h" +#include QMK_KEYBOARD_H //void promicro_bootloader_jmp(bool program); #include "quantum.h" diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/nyquist/rev1/rules.mk index 80a942d06f7c..7b30c0beff2a 100644 --- a/keyboards/nyquist/rev1/rules.mk +++ b/keyboards/nyquist/rev1/rules.mk @@ -1,5 +1 @@ BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index dfcff1d9026e..07cdba4bf697 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -74,14 +74,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude +LAYOUTS = ortho_5x12 \ No newline at end of file diff --git a/keyboards/nyquist/serial.c b/keyboards/nyquist/serial.c index 6faed09ce077..74bcbb6bf6e2 100644 --- a/keyboards/nyquist/serial.c +++ b/keyboards/nyquist/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/nyquist/split_util.c b/keyboards/nyquist/split_util.c index 39639c3b4bd8..346cbc908949 100644 --- a/keyboards/nyquist/split_util.c +++ b/keyboards/nyquist/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else diff --git a/keyboards/org60/Makefile b/keyboards/org60/Makefile new file mode 100644 index 000000000000..57b2ef62e5f3 --- /dev/null +++ b/keyboards/org60/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h new file mode 100644 index 000000000000..62b3b69a0ed4 --- /dev/null +++ b/keyboards/org60/config.h @@ -0,0 +1,82 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 大橘子外设 (Large orange peripherals) +#define PRODUCT Org60 +#define DESCRIPTION Org60 Keyboard PCB by 大橘子外设 (Large orange peripherals) + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* Backlight Setup */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 +//#define BACKLIGHT_BREATHING + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* RGB Underglow + * F6 PIN for Org60 that has pre-soldered WS2812 LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define TAPPING_TERM 200 + +#endif diff --git a/keyboards/org60/keymaps/boardy/Makefile b/keyboards/org60/keymaps/boardy/Makefile new file mode 100644 index 000000000000..0755d5009372 --- /dev/null +++ b/keyboards/org60/keymaps/boardy/Makefile @@ -0,0 +1,15 @@ + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +CONSOLE_ENABLE = no # Enable debugging console +COMMAND_ENABLE = no # Commands for debug and configuration +TAP_DANCE_ENABLE = no # Tap Dance skills +UNICODE_ENABLE = no # Unicode + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + + diff --git a/keyboards/org60/keymaps/boardy/keymap.c b/keyboards/org60/keymaps/boardy/keymap.c new file mode 100644 index 000000000000..635838f6cfb2 --- /dev/null +++ b/keyboards/org60/keymaps/boardy/keymap.c @@ -0,0 +1,121 @@ +#include "org60.h" +#include "action_layer.h" + +// Keyboard Layers +enum keyboard_layers { + _BASE, // Base Layer + _FUNCTION, // Function Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KEYMAP( + /* + 0: Base Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | + | | | | | | | | | | | | | | | + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | { | ] | | | + | | | | | | | | | | | | | | | + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | : | " | | + | | | | | | | | | | | | | | + | PrntScr | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | < | > | ? |░░░░░░| |░░░░░░░░| + | | | | | | | | | | | |░░░░░░| |░░░░░░░░| + | Shift | Z | X | C | V | B | N | M | , | . | / |░░░░░░| Up |░░░░░░░░| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |░░░░░░| | | | + | | | | | |░░░░░░| | | | + | Ctrl | Win | Alt | Space | FnO |░░░░░░| Left | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // | | | | | | | | | | | | | + KC_PSCR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_UP, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |░░░░░░| | | | + // | | | | |░░░░░░| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), + //--------------------------------------------------------------------------------------------------------------------------------------' + + + [_FUNCTION] = KEYMAP( + /* + 1: Function Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | | | | | + | Reset | 7 | 8 | 9 | Toggle | Mode | Pwr+ | Pwr- | | Insert | Pause | Home | End | Sleep | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | Page | Page | | + | Caps Lock | 4 | 5 | 6 | Hue+ | Hue- | Sat+ | Sat- | | | Up | Down | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | |░░░░░░| |░░░░░░░░| + | | | | | | Back | Back | | Prev | Next | |░░░░░░| |░░░░░░░░| + | Shift | 1 | 2 | 3 | | Light+ | Light- | | Track | Track | |░░░░░░| Up |░░░░░░░░| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |░░░░░░| | | | + | | | | | |░░░░░░| | | | + | Ctrl | Win | Alt | 0 | Fn0 |░░░░░░| Mute | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + RESET, KC_7, KC_8, KC_9, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, KC_NO, KC_INS, KC_PAUS, KC_HOME, KC_END, KC_SLEP, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // | | | | | | | | | | | | | + KC_CAPS, KC_4, KC_5, KC_6, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_NO, KC_NO, KC_PGUP, KC_PGDN, KC_NO, KC_ENT, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + // | | | | | | | | | | |░░░░░░| |░░░░░░░░| + KC_LSFT, KC_NO, KC_1, KC_2, KC_3, KC_NO, BL_INC, BL_DEC, KC_NO, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_VOLU, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |░░░░░░| | | | + // | | | | |░░░░░░| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_0, F(0), KC_NO, KC_MUTE, KC_VOLD, KC_MPLY), + //--------------------------------------------------------------------------------------------------------------------------------------' + +}; + + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(_FUNCTION), // to Function overlay +}; + + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/boardy/readme.md b/keyboards/org60/keymaps/boardy/readme.md new file mode 100644 index 000000000000..3643fbce30eb --- /dev/null +++ b/keyboards/org60/keymaps/boardy/readme.md @@ -0,0 +1,7 @@ +# Boardy layout + +![Uses this layout](http://i.imgur.com/k3g488o.jpg) + +This is my custom layout for my board Boardy designed to be used with an [Org60] and custom plate. + +[Org60]: https://world.taobao.com/item/544441405112.htm diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9d18d50e31d5 --- /dev/null +++ b/keyboards/org60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include "org60.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + 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_NO, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT ,KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + 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_NO, KC_NO, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; + } + + return MACRO_NONE; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/default/readme.md b/keyboards/org60/keymaps/default/readme.md new file mode 100644 index 000000000000..89f9acaa975b --- /dev/null +++ b/keyboards/org60/keymaps/default/readme.md @@ -0,0 +1,5 @@ +![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg) + +All of the keys which CAN have a function should be assigned one. + +The keys with KC_NO cannot be assigned a value diff --git a/keyboards/org60/org60.c b/keyboards/org60/org60.c new file mode 100644 index 000000000000..77a5e7c18bb4 --- /dev/null +++ b/keyboards/org60/org60.c @@ -0,0 +1,19 @@ +#include "org60.h" + + +extern inline void org60_caps_led_on(void); +extern inline void org60_bl_led_on(void); + +extern inline void org60_caps_led_off(void); +extern inline void org60_bl_led_off(void); + + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -105,7 +105,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -114,7 +114,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/orthodox/readme.md b/keyboards/orthodox/readme.md index 57e940b0f43d..e1fbf94baf30 100644 --- a/keyboards/orthodox/readme.md +++ b/keyboards/orthodox/readme.md @@ -96,7 +96,7 @@ the two halves, i.e. if your split keyboard has 3 rows in each half, then Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `orthodox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` diff --git a/keyboards/orthodox/rev1/rev1.c b/keyboards/orthodox/rev1/rev1.c index f404017b72b5..0524d402041e 100644 --- a/keyboards/orthodox/rev1/rev1.c +++ b/keyboards/orthodox/rev1/rev1.c @@ -30,7 +30,7 @@ void matrix_init_kb(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif // // green led on @@ -46,7 +46,7 @@ void matrix_init_kb(void) { void shutdown_user(void) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); #endif diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index dfcff1d9026e..3f40ff2f827e 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -73,15 +73,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/pegasushoof/README.md b/keyboards/pegasushoof/README.md index 074222c71408..c4c152d40129 100644 --- a/keyboards/pegasushoof/README.md +++ b/keyboards/pegasushoof/README.md @@ -1,24 +1,12 @@ -pegasushoof keyboard firmware -============================= +Pegasus Hoof Controller +=== -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: Pegasus Hoof +Hardware Availability: https://1upkeyboards.com/filco-pegasus-hoof-controller.html -For the full Quantum feature list, see [the parent README.md](/README.md). +Make example for this keyboard (after setting up your build environment): -## Building + make pegasus_hoof-default -Download or clone the whole firmware and navigate to the `keyboard/pegasushoof` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your `.hex` file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build all keymaps, simply run `make`, the `.hex` files will end up in the top directory. - -### Specific Keymap -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `/keymap.c` in the `keymaps` folder, and see keymap document (you can find in top README.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just enter the keymap directory and type `make`: -``` -$ cd keymaps/default -$ make -``` +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/phantom/readme.md b/keyboards/phantom/readme.md index 614c21fda0fc..7a31d106e09f 100644 --- a/keyboards/phantom/readme.md +++ b/keyboards/phantom/readme.md @@ -1,48 +1,16 @@ -Phantom keyboard firmware -========================= +Phantom +======= A community-developed keyboard PCB designed to fit inside the case of a Filco Majestouch. See the [Deskthority wiki](https://deskthority.net/wiki/Phantom) for more information. -## Bootloader +Keyboard Maintainer: QMK Community +Hardware Supported: Phantom PCB +Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=536 -The Phantom uses a [Teensy 2.0](https://www.pjrc.com/store/teensy.html) as a controller. +Make example for this keyboard (after setting up your build environment): -The Teensy has a special bootloader that can be accessed by pressing the button on the Teensy PCB. It is also possible to use Boot Magic and Command to access the bootloader. + make phantom-default -To write the firmware to the Teensy use [Teensy loader](https://www.pjrc.com/teensy/loader.html). - -## Quantum MK Firmware - -For the full Quantum feature list, see the [documentation](https://docs.qmk.fm). - -## RGB underlight - -It is possible to connect a WS2812B LED strip to the Teensy for RGB underlight support. - -For this to work the DIN connection on the WS2812B strip should be soldered to PE2 on the Teensy (see reference image https://i.imgur.com/aDfNoHT.jpg). - -See [rgbmod](keymaps/rgbmod) for a keymap that utilizes the RGB underlight feature. - -## Building - -The Phantom allows for a huge amount of different layouts. - -Depending on which layout and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/phantom](/keyboards/phantom) folder. - -### Custom keymaps - -To define your own keymap, copy one of the [existing keymap](keymaps) folders and give it the name of your keymap. Then check the [keymap documentation](https://docs.qmk.fm/Keymap.html) for details on how to modify the keymap. - -To make it easy to define keymaps for the most common layouts a few macros are provided. - -| Layout | Macro | -| --------------- | ------------------------- | -| Winkey ANSI | `KEYMAP()` | -| Winkeyless ANSI | `KEYMAP_WINKEYLESS()` | -| Winkey ISO | `KEYMAP_ISO()` | -| Winkeyless ISO | `KEYMAP_ISO_WINKEYLESS()` | -| 7BIT | `KEYMAP_7BIT()` | - -To build the firmware with a custom keymap, run `make ` +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/planck/config.h b/keyboards/planck/config.h index c86f8491eed7..ebaf3fb641a4 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -81,11 +81,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#ifdef SUBPROJECT_rev3 - #include "rev3/config.h" -#endif -#ifdef SUBPROJECT_rev4 - #include "rev4/config.h" -#endif +#include QMK_SUBPROJECT_CONFIG_H #endif diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 09063cb97fda..98417a1c8c76 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -10,10 +10,14 @@ extern keymap_config_t keymap_config; #define _BASE 0 #define _MOVE 1 #define _SYMB 2 -#define _MOUSE 3 +#define _MORE 3 #define _FUNC 4 #define ENDASH LALT(KC_MINS) #define POUND LALT(KC_3) +#define LDQUOT LALT(KC_LBRC) +#define RDQUOT LALT(S(KC_LBRC)) +#define LSQUOT LALT(KC_RBRC) +#define RSQUOT LALT(S(KC_RBRC)) #define H(X) LALT(LCTL(X)) enum planck_keycodes { @@ -30,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * | Bksp | A | R | S | T | D | H | N | E | I | O | ' | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -68,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | ’ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -77,26 +81,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYMB] = { {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH }, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RSQUOT }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -/* MOUSE +/* MORE * ,-----------------------------------------------------------------------------------. - * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | + * | | | | | £ | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | SW-D | SW-U | | | | + * | | | | | | | | “ | ” | ‘ | ’ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_MOUSE] = { - {XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______}, +[_MORE] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, POUND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LDQUOT, RDQUOT, LSQUOT, RSQUOT, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -104,17 +108,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | + * | Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Power| | | | | + * | | F21 | F22 | F23 | F24 | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU}, - {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, - {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_POWER,XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {KC_POWER,KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD}, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } @@ -125,20 +129,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case MOVE: if (record->event.pressed) { layer_on(_MOVE); - update_tri_layer(_MOVE, _SYMB, _MOUSE); + update_tri_layer(_MOVE, _SYMB, _MORE); } else { layer_off(_MOVE); - update_tri_layer(_MOVE, _SYMB, _MOUSE); + update_tri_layer(_MOVE, _SYMB, _MORE); } return false; break; case SYMB: if (record->event.pressed) { layer_on(_SYMB); - update_tri_layer(_MOVE, _SYMB, _MOUSE); + update_tri_layer(_MOVE, _SYMB, _MORE); } else { layer_off(_SYMB); - update_tri_layer(_MOVE, _SYMB, _MOUSE); + update_tri_layer(_MOVE, _SYMB, _MORE); } return false; break; diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 4d4e5cdd78b6..d5a689b8fc0a 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,18 +2,33 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. -- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. -- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. +- Consistent and minimal response times should be maintained. Keys that react + differently depending on whether they are tapped or held, keys that react + differently if they are double tapped, etc. should be avoided – they + inevitably send their keycode later than a normal key – interrupting the + immediate feedback from the screen. Therefore we restrict ourselves to + chording as our only means of getting more than one symbol out of a single + physical key. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster, other movement keys, and hotkeys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. +- The hands should never need to leave the home position. The usual culprit for + this is the arrow cluster, so the arrow cluster should be as close to home as + possible. + +- There should be two of every modifier (one on each side), otherwise certain + long key combinations become hard to make. + +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow +cluster, other movement keys, and hotkeys; a `SYMB` layer, with numbers and +symbols; a `FUNC` layer, with function keys and media keys; and a `MORE` layer, +with stuff that doesn’t fit anywhere else. The `MORE` layer is activated by +holding the Move and Symb keys simultaniously. ``` /* BASE * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * | Bksp | A | R | S | T | D | H | N | E | I | O | ' | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -23,11 +38,11 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c /* MOVE * ,-----------------------------------------------------------------------------------. - * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | + * | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | + * | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | + * | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -37,7 +52,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * ,-----------------------------------------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | ’ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -45,13 +60,13 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * `-----------------------------------------------------------------------------------' */ -/* MOUSE +/* MORE * ,-----------------------------------------------------------------------------------. - * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | + * | | | | | £ | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | SW-D | SW-U | | | | + * | | | | | | | | “ | ” | ‘ | ’ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -61,9 +76,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * ,-----------------------------------------------------------------------------------. * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | + * | Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Power| | | | | + * | | F21 | F22 | F23 | F24 | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index ae7d23945bbd..6ef17b30a6d2 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -250,7 +250,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -274,7 +274,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -283,7 +283,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -324,7 +324,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -342,7 +342,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -363,12 +363,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -380,7 +380,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 63e01f389ae2..3e94fe1f4e31 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, - + /* LOCK * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} } - + }; #ifdef AUDIO_ENABLE @@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (IS_LAYER_ON(_DVORAK)) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif layer_off(_DVORAK); } @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (!IS_LAYER_ON(_DVORAK)) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif layer_on(_DVORAK); } @@ -235,12 +235,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -252,7 +252,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/lets_split/keymaps/ergodoxish/Makefile b/keyboards/planck/keymaps/coloneljesus/Makefile similarity index 100% rename from keyboards/lets_split/keymaps/ergodoxish/Makefile rename to keyboards/planck/keymaps/coloneljesus/Makefile diff --git a/keyboards/planck/keymaps/coloneljesus/config.h b/keyboards/planck/keymaps/coloneljesus/config.h new file mode 100644 index 000000000000..b406e2fed97b --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.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/planck/keymaps/coloneljesus/keymap.c b/keyboards/planck/keymaps/coloneljesus/keymap.c new file mode 100644 index 000000000000..668da5c10375 --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/keymap.c @@ -0,0 +1,261 @@ +/* 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 "planck.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 + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | App |Lower | Space |Raise | - | = | \ | Alt | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) }, + {KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT} +}, + +/* 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 | Home | PgDn | PgUp | End | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | 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_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), S(KC_NUBS), KC_MPRV, KC_MNXT, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | [ | ] | Del | Left | Down | Up | Right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | 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_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MPRV, KC_MNXT, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#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) { + 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 + } else { + unregister_code(KC_RSFT); + } + 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; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/coloneljesus/readme.md b/keyboards/planck/keymaps/coloneljesus/readme.md new file mode 100644 index 000000000000..31107f59ce08 --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/readme.md @@ -0,0 +1,2 @@ +# /u/Coloneljesus's Planck Layout + diff --git a/keyboards/planck/keymaps/dale/Makefile b/keyboards/planck/keymaps/dale/Makefile new file mode 100644 index 000000000000..156a3a0a9869 --- /dev/null +++ b/keyboards/planck/keymaps/dale/Makefile @@ -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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/dale/config.h b/keyboards/planck/keymaps/dale/config.h new file mode 100644 index 000000000000..11d51c818776 --- /dev/null +++ b/keyboards/planck/keymaps/dale/config.h @@ -0,0 +1,36 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * 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 + + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 100 +#define MOUSEKEY_MAX_SPEED 10 +#define MOUSEKEY_WHEEL_DELAY 0 + +#endif diff --git a/keyboards/planck/keymaps/dale/keymap.c b/keyboards/planck/keymaps/dale/keymap.c new file mode 100644 index 000000000000..5682f0b4b8c7 --- /dev/null +++ b/keyboards/planck/keymaps/dale/keymap.c @@ -0,0 +1,250 @@ +// Can't Remember Sh*t Keymap for Planck +// Trying to fit as many characters as possible on the default layer +// as its easier for me to remember logical functions than characters +// Also, I like me some numpad + + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _GAME 1 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, + BACKLIT, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | \ | Alt | Lower| Space |Raise | [ | - | = | ] | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, + {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(3, KC_LBRC), KC_MINS, KC_EQL, CTL_T(KC_RBRC)} +}, + +/* Game + * ,-----------------------------------------------------------------------------------. + * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = { + { KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ }, + {KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + + +/* Lower (switched to # because KP# were weird in terminal emulators) + * ,-----------------------------------------------------------------------------------. + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | | | | 0 | | | | KP_+ | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + { KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______}, + {KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | App | | | | Ins | | Home | PGDN | PGUP | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + { KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV}, + {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BSLASH, _______}, + {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL))}, + {_______, _______, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, _______, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP} +} + + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. +{ + switch(id) { + case 0: // this would trigger when you hit a key mapped as M(0) + if (record->event.pressed) { + return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes + } + break; + } + return MACRO_NONE; +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case GAME: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(music_scale); + #endif + persistant_default_layer_set(1UL<<_GAME); + } + return false; + break; + + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); +} + +void shutdown_user() +{ + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif diff --git a/keyboards/planck/keymaps/dale/readme.md b/keyboards/planck/keymaps/dale/readme.md new file mode 100644 index 000000000000..e5ab38756281 --- /dev/null +++ b/keyboards/planck/keymaps/dale/readme.md @@ -0,0 +1,6 @@ +# Dales Planck Layout +Goals: +* Trying to fit as many characters as possible on the default layer + * its easier for me to remember logical functions than characters + * this also makes it easier to use the two US ISO keysets I had on hand +* A number pad AND a number row diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 975017161b11..97b8b943207d 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -211,12 +211,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -228,7 +228,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h index 4c61581993c3..b406e2fed97b 100644 --- a/keyboards/planck/keymaps/default/config.h +++ b/keyboards/planck/keymaps/default/config.h @@ -3,6 +3,18 @@ #include "../../config.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 */ @@ -13,6 +25,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ + #define MIDI_BASIC /* enable advanced MIDI features: diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 61275cb26a53..f71a2b59b9cf 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -1,20 +1,24 @@ -// 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. +/* 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 "planck.h" #include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. - enum planck_layers { _QWERTY, _COLEMAK, @@ -36,10 +40,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, _______, 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, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -173,50 +173,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -255,7 +232,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(plover_song); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -273,7 +250,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(plover_gb_song); #endif layer_off(_PLOVER); } @@ -281,37 +258,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/experimental/Makefile b/keyboards/planck/keymaps/experimental/Makefile index 3a8250a9b563..29108e522b6b 100644 --- a/keyboards/planck/keymaps/experimental/Makefile +++ b/keyboards/planck/keymaps/experimental/Makefile @@ -1,11 +1,11 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration @@ -17,6 +17,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. ONEHAND_ENABLE = yes # Enable one-hand typing +STENO_ENABLE = yes # Enable TX Bolt protocol for Stenography, requires VIRTSER and may not work with mouse keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h index 492490ca1c89..0864b5fbc92d 100644 --- a/keyboards/planck/keymaps/experimental/config.h +++ b/keyboards/planck/keymaps/experimental/config.h @@ -5,6 +5,7 @@ #define LEADER_TIMEOUT 300 #define BACKLIGHT_BREATHING +#define PREVENT_STUCK_MODIFIERS /* ws2812 RGB LED */ diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 17fad784e7c0..8a6e4fe26021 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -3,6 +3,7 @@ #include "planck.h" #include "action_layer.h" +#include "keymap_steno.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif @@ -49,7 +50,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { - {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, + {QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL} @@ -158,10 +159,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} }, /* Adjust (Lower + Raise) @@ -215,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -224,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -233,7 +234,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -279,28 +280,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; return false; case PLOVER: - if (record->event.pressed) { + if (!record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #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); } break; return false; case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -372,12 +364,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -389,7 +381,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif @@ -397,9 +389,9 @@ void music_scale_user(void) LEADER_EXTERNS(); void matrix_scan_user(void) { - LEADER_DICTIONARY() { + LEADER_DICTIONARY() { leading = false; - leader_end(); + leader_end(); SEQ_ONE_KEY (KC_R) { tap_random_base64(); diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index 25a422dbbc82..b570ccfcd666 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -214,7 +214,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /*case DVORAK:*/ /*if (record->event.pressed) {*/ /*#ifdef AUDIO_ENABLE*/ - /*PLAY_NOTE_ARRAY(tone_dvorak, false, 0);*/ + /*PLAY_SONG(tone_dvorak);*/ /*#endif*/ /*persistant_default_layer_set(1UL<<_DVORAK);*/ /*}*/ @@ -255,7 +255,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /*if (record->event.pressed) {*/ /*#ifdef AUDIO_ENABLE*/ /*stop_all_notes();*/ - /*PLAY_NOTE_ARRAY(tone_plover, false, 0);*/ + /*PLAY_SONG(tone_plover);*/ /*#endif*/ /*layer_off(_RAISE);*/ /*layer_off(_LOWER);*/ @@ -273,7 +273,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /*case EXT_PLV:*/ /*if (record->event.pressed) {*/ /*#ifdef AUDIO_ENABLE*/ - /*PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);*/ + /*PLAY_SONG(tone_plover_gb);*/ /*#endif*/ /*layer_off(_PLOVER);*/ /*}*/ @@ -294,12 +294,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -311,7 +311,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 6a649f2c8e40..86bf6409a5f1 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case WORKMAN: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); + PLAY_SONG(tone_workman); #endif persistent_default_layer_set(1UL<<_WORKMAN); } @@ -183,7 +183,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PLOVER: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif if (!eeconfig_is_enabled()) { eeconfig_init(); @@ -219,12 +219,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -236,7 +236,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index 7b9a68113c8f..e7cf00113664 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c @@ -280,7 +280,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif default_layer_set(1UL<<_QWERTY); } @@ -289,7 +289,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif default_layer_set(1UL<<_COLEMAK); } @@ -298,7 +298,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif default_layer_set(1UL<<_DVORAK); } @@ -339,7 +339,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -357,7 +357,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -436,12 +436,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -453,7 +453,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index bf9735be8e16..ea63e9f27404 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case WORKMAN: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_workman, false, 0); + PLAY_SONG(tone_workman); #endif persistent_default_layer_set(1UL<<_WORKMAN); } @@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -240,7 +240,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -258,7 +258,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -291,12 +291,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -308,7 +308,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index c3ba6ef0731d..0adda43af9b1 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -249,7 +249,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -258,7 +258,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -267,7 +267,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -308,7 +308,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -326,7 +326,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -347,12 +347,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -364,7 +364,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index 4127a3ae1315..0fc25fd6e88c 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c @@ -239,12 +239,12 @@ void matrix_init_user(void) void startup_user() { _delay_ms(100); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -256,7 +256,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index fb919835ba89..2cecf010507a 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -131,7 +131,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NERD: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_nerd, false, 0); + PLAY_SONG(tone_nerd); #endif persistent_default_layer_set(1UL<<_NERD); } @@ -172,12 +172,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -189,7 +189,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index d991bece13aa..05c25182738f 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -154,7 +154,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -162,7 +162,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -170,7 +170,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -211,7 +211,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code(KC_RCTL); unregister_code(KC_RALT); unregister_code(KC_RGUI); - } + } break; case _OS: if (record->event.pressed) { @@ -229,7 +229,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) layer_off(currentOs); currentOs = id; } - break; + break; } return MACRO_NONE; }; @@ -237,14 +237,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // stops the tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif } #ifdef AUDIO_ENABLE void play_goodbye_tone() { - PLAY_NOTE_ARRAY(goodbye, false, 0); + PLAY_SONG(goodbye); _delay_ms(150); } diff --git a/keyboards/planck/keymaps/piemod/Makefile b/keyboards/planck/keymaps/piemod/Makefile new file mode 100755 index 000000000000..1e48872e391e --- /dev/null +++ b/keyboards/planck/keymaps/piemod/Makefile @@ -0,0 +1,10 @@ +SUBPROJECT_DEFAULT = rev4 + +MOUSEKEY_ENABLE = yes +BLUETOOTH_ENABLE = yes +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md new file mode 100644 index 000000000000..f2a051da14ec --- /dev/null +++ b/keyboards/planck/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c new file mode 100644 index 000000000000..e6e7a8a5a0a7 --- /dev/null +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -0,0 +1,111 @@ +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +#define DVORAK 0 +#define ARROW 1 //F(1) +#define SYMBOL 2 // F(2) +#define NUMBER 3 // F(3) +#define FUNCTION 4 // F(4) +#define EMACS 5 // F(5) +#define CUSTOM_MACROS 6 // F(6) +#define MOUSE 7 // F(7) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVORAK] = { + {KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE}, + {KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER}, + {KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS}, + {F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, + }, + + [ARROW] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [SYMBOL] = { + {KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, + {KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21)}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [NUMBER] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [FUNCTION] = { + {KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE}, + {RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + }, + + [EMACS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [CUSTOM_MACROS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [MOUSE] = { + {KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO} + }, + + }; + + enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, + }; + + int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 0eb35a9f8741..41cfbaf80618 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -119,7 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -128,7 +128,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -208,12 +208,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -225,7 +225,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index adc1c69aa552..448ae3b908ac 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -23,7 +23,7 @@ #define DOUBLESPACE_LAYER_ENABLE // #define TOLELOT_ENABLE -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 741e8e6504ee..60f6d925af0b 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -527,32 +527,32 @@ void led_set_user(uint8_t usb_led) if ((usb_led & (1<event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -210,12 +210,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -227,7 +227,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 8cf24d472b44..8a5dde886e60 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -172,7 +172,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -181,7 +181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -190,7 +190,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -242,12 +242,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -259,7 +259,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/steno/Makefile b/keyboards/planck/keymaps/steno/Makefile new file mode 100644 index 000000000000..8bfc69499bff --- /dev/null +++ b/keyboards/planck/keymaps/steno/Makefile @@ -0,0 +1,8 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER +AUDIO_ENABLE = no # Audio output on port C6 +MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/planck/keymaps/steno/config.h b/keyboards/planck/keymaps/steno/config.h new file mode 100644 index 000000000000..1879ab007f8c --- /dev/null +++ b/keyboards/planck/keymaps/steno/config.h @@ -0,0 +1,44 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.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) + +#define PREVENT_STUCK_MODIFIERS + +/* + * 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/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c new file mode 100644 index 000000000000..38540a261379 --- /dev/null +++ b/keyboards/planck/keymaps/steno/keymap.c @@ -0,0 +1,256 @@ +/* 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 "planck.h" +#include "action_layer.h" +#include "keymap_steno.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 +}; + +#define ST_BOLT QK_STENO_BOLT +#define ST_GEM QK_STENO_GEMINI + +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) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | |TXBOLT|GEM RP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, ST_BOLT, ST_GEM}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#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) { + 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 + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } + 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; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/steno/readme.md b/keyboards/planck/keymaps/steno/readme.md new file mode 100644 index 000000000000..e8ffd9756522 --- /dev/null +++ b/keyboards/planck/keymaps/steno/readme.md @@ -0,0 +1,4 @@ +# The Default Planck Layout with TX Bolt for the Plover Layer + +To use set Plover to TX Bolt and select the COM port that represents your keyboard. + diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index c047d56b3c03..05a783722efc 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -202,7 +202,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -252,7 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -270,7 +270,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -291,12 +291,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -308,7 +308,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index 51b980e086eb..4674be0662ec 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -220,7 +220,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -228,7 +228,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -236,7 +236,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -273,7 +273,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -290,7 +290,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 13: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -315,12 +315,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -332,7 +332,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c index c60c6e719453..ae1628d6c33d 100644 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ b/keyboards/planck/keymaps/xyverz/keymap.c @@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -178,7 +178,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -239,12 +239,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -256,7 +256,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index 0b1dd7619c25..f824b40338c8 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -110,7 +110,7 @@ void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called o update_tri_layer(_LOWER, _RAISE, _ADJUST); layer_on(_UNICODES); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + PLAY_SONG(tone_ctrl_mod); #endif break; } @@ -202,7 +202,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ persistent_default_layer_set(1UL<<_COLEMAK); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif } return false; @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ persistent_default_layer_set(1UL<<_SWCOLE); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_swcole, false, 0); + PLAY_SONG(tone_swcole); #endif } return false; @@ -236,7 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case SHFT_CAP: + case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. register_code(KC_LSHIFT); @@ -246,12 +246,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(caps_status == 0){ caps_status = 1; #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + PLAY_SONG(tone_capslock_on); #endif } else { caps_status = 0; #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + PLAY_SONG(tone_capslock_off); #endif } } @@ -267,7 +267,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. tap(KC_B); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + PLAY_SONG(tone_ctrl_mod); #endif #ifdef BACKLIGHT_BREATHING breathing_speed_set(2); @@ -287,14 +287,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { tap(KC_C); unregister_code(KC_LCTL); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_copy, false, 0); + PLAY_SONG(tone_copy); #endif } else { // Tap, paste register_code(KC_LCTL); tap(KC_V); unregister_code(KC_LCTL); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_paste, false, 0); + PLAY_SONG(tone_paste); #endif } } @@ -305,7 +305,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ set_unicode_input_mode(UC_WIN); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(uniwin, false, 0); + PLAY_SONG(uniwin); #endif } return false; @@ -314,7 +314,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ set_unicode_input_mode(UC_LNX); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(unilin, false, 0); + PLAY_SONG(unilin); #endif } return false; @@ -419,28 +419,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif } #ifdef AUDIO_ENABLE void play_goodbye_tone(void){ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); } void shutdown_user(){ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } void music_on_user(void){ // Run when the music layer is turned on - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void music_off_user(void){ // Run when music is turned off - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); } #endif diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c index 3980b02f5039..caef2fe5fac7 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -1,4 +1,4 @@ -#include "planck.h" +#include QMK_KEYBOARD_H #ifdef ONEHAND_ENABLE __attribute__ ((weak)) diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 8cfee5d1ccbb..c055d73cb699 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -1,12 +1,7 @@ #ifndef PLANCK_H #define PLANCK_H -#ifdef SUBPROJECT_rev3 - #include "rev3.h" -#endif -#ifdef SUBPROJECT_rev4 - #include "rev4.h" -#endif +#include QMK_SUBPROJECT_H #include "quantum.h" @@ -36,4 +31,7 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } +#define KEYMAP PLANCK_GRID +#define LAYOUT_ortho_4x12 PLANCK_GRID + #endif diff --git a/keyboards/planck/rev3/config.h b/keyboards/planck/rev3/config.h index cc37874e8388..ade11ffe13fb 100644 --- a/keyboards/planck/rev3/config.h +++ b/keyboards/planck/rev3/config.h @@ -1,7 +1,7 @@ #ifndef REV3_CONFIG_H #define REV3_CONFIG_H -#include "../config.h" +#include QMK_KEYBOARD_CONFIG_H #define DEVICE_VER 0x0003 diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h index 628951d97dbe..e5e05236c462 100644 --- a/keyboards/planck/rev3/rev3.h +++ b/keyboards/planck/rev3/rev3.h @@ -1,6 +1,6 @@ #ifndef REV3_H #define REV3_H -#include "../planck.h" +#include QMK_KEYBOARD_H #endif \ No newline at end of file diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 55940968237a..11485710070b 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -1,5 +1 @@ -AUDIO_ENABLE = no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +AUDIO_ENABLE = no # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/planck/rev4/config.h b/keyboards/planck/rev4/config.h index 98189fba7145..dcc76c11c9ec 100644 --- a/keyboards/planck/rev4/config.h +++ b/keyboards/planck/rev4/config.h @@ -1,7 +1,7 @@ #ifndef REV4_CONFIG_H #define REV4_CONFIG_H -#include "../config.h" +#include QMK_KEYBOARD_CONFIG_H #define DEVICE_VER 0x0004 diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h index e4cf1800b8b9..2d35df19d870 100644 --- a/keyboards/planck/rev4/rev4.h +++ b/keyboards/planck/rev4/rev4.h @@ -1,6 +1,6 @@ #ifndef REV4_H #define REV4_H -#include "../planck.h" +#include QMK_KEYBOARD_H #endif \ No newline at end of file diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 01d848e98c61..3b22e0a01b69 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -1,5 +1 @@ -AUDIO_ENABLE = yes # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +AUDIO_ENABLE = yes # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index 5580bb387b2a..8f8477c18ab9 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk @@ -66,3 +66,5 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 \ No newline at end of file diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c index 2f06c8c314da..a273f4ed5226 100644 --- a/keyboards/preonic/keymaps/0xdec/keymap.c +++ b/keyboards/preonic/keymaps/0xdec/keymap.c @@ -109,10 +109,10 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -121,7 +121,7 @@ void music_on_user(void) { music_scale_user(); } void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif @@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case GAME: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_game, false, STACCATO); + PLAY_SONG(tone_game); #endif persistent_default_layer_set(1UL<<_GAME); } diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index 7b5be07344d1..1cbb99caab6a 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -236,7 +236,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -244,7 +244,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -252,7 +252,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -260,7 +260,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _GAME: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_GAME); } @@ -268,7 +268,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _NUMPAD: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_NUMPAD); } @@ -276,7 +276,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _ARROW: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_LOWER); } @@ -317,7 +317,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { #ifdef AUDIO_ENABLE _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(start_up, false, 0); + PLAY_SONG(start_up); #endif } @@ -325,7 +325,7 @@ void matrix_init_user(void) { void play_goodbye_tone(void) { - PLAY_NOTE_ARRAY(goodbye, false, 0); + PLAY_SONG(goodbye); _delay_ms(150); } diff --git a/keyboards/preonic/keymaps/dale/Makefile b/keyboards/preonic/keymaps/dale/Makefile new file mode 100644 index 000000000000..156a3a0a9869 --- /dev/null +++ b/keyboards/preonic/keymaps/dale/Makefile @@ -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 = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/preonic/keymaps/dale/config.h b/keyboards/preonic/keymaps/dale/config.h new file mode 100644 index 000000000000..4c61581993c3 --- /dev/null +++ b/keyboards/preonic/keymaps/dale/config.h @@ -0,0 +1,29 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * 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/preonic/keymaps/dale/keymap.c b/keyboards/preonic/keymaps/dale/keymap.c new file mode 100644 index 000000000000..3c9fb558e478 --- /dev/null +++ b/keyboards/preonic/keymaps/dale/keymap.c @@ -0,0 +1,296 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | \ | Alt |Lower | Space |Raise | [ | - | = | ] | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) }, + {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC)} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / | Ent | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | 0 | | [ | - | + | ] | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_DOT, KC_ASTR}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Wh Dn| M-L | M-Dn | M-R | PrScr| Sc Lk| Break| | | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | App | | | | Ins | | Home | PGDN | PGUP | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + { KC_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV}, + {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_BSLASH, _______}, + {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} +}, + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| |AGswap|AGnorm| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL))}, + {_______, _______, _______, AU_ON, AU_OFF, _______, AG_SWAP, AG_NORM, _______, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP} +} + + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. +{ + switch(id) { + case 0: // this would trigger when you hit a key mapped as M(0) + if (record->event.pressed) { + return MACRO( D(LSFT), T(LEFT), U(LSFT), D(LCTL), T(X), U(LCTL), T(RIGHT), D(LCTL), T(V), U(LCTL), T(LEFT), END ); // this swaps the characters on either side of the cursor when the macro executes + } + break; + } + return MACRO_NONE; +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); +} + +void shutdown_user() +{ + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif diff --git a/keyboards/preonic/keymaps/dale/readme.md b/keyboards/preonic/keymaps/dale/readme.md new file mode 100644 index 000000000000..ea044cbfa9fe --- /dev/null +++ b/keyboards/preonic/keymaps/dale/readme.md @@ -0,0 +1,2 @@ +# Dale's Preonic layout - largely based on his Planck. +# The hardware number row is mostly to avoid inherent context switching delay while he is receiving auditory input. diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h index 4c61581993c3..003fd259c590 100644 --- a/keyboards/preonic/keymaps/default/config.h +++ b/keyboards/preonic/keymaps/default/config.h @@ -3,6 +3,18 @@ #include "../../config.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 */ @@ -13,6 +25,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ + #define MIDI_BASIC /* enable advanced MIDI features: diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 2516a726bdb2..01f40542ca9a 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -1,14 +1,21 @@ +/* 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 "preonic.h" #include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. enum preonic_layers { _QWERTY, @@ -28,10 +35,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -155,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -163,54 +166,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -248,36 +220,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; }; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 09f465de1eb7..37a7dbd9bf05 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -270,12 +270,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -287,7 +287,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c index 214f51a46faa..69c33472e077 100644 --- a/keyboards/preonic/keymaps/kinesis/keymap.c +++ b/keyboards/preonic/keymaps/kinesis/keymap.c @@ -102,12 +102,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -119,7 +119,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c index 249dd1e64ced..4c2bf1fcf09c 100644 --- a/keyboards/preonic/keymaps/nikchi/keymap.c +++ b/keyboards/preonic/keymaps/nikchi/keymap.c @@ -146,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -198,12 +198,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -215,7 +215,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 5972e918cf1d..b27033b1b23b 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -202,7 +202,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -263,12 +263,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -280,7 +280,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index 1275aa18fc25..e905c458f6d4 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } @@ -257,12 +257,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -274,7 +274,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index 0b1dd7619c25..f824b40338c8 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -110,7 +110,7 @@ void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called o update_tri_layer(_LOWER, _RAISE, _ADJUST); layer_on(_UNICODES); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + PLAY_SONG(tone_ctrl_mod); #endif break; } @@ -202,7 +202,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ persistent_default_layer_set(1UL<<_COLEMAK); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif } return false; @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ persistent_default_layer_set(1UL<<_SWCOLE); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_swcole, false, 0); + PLAY_SONG(tone_swcole); #endif } return false; @@ -236,7 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case SHFT_CAP: + case SHFT_CAP: if(record->event.pressed){ key_timer = timer_read(); // if the key is being pressed, we start the timer. register_code(KC_LSHIFT); @@ -246,12 +246,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(caps_status == 0){ caps_status = 1; #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_capslock_on, false, 0); + PLAY_SONG(tone_capslock_on); #endif } else { caps_status = 0; #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_capslock_off, false, 0); + PLAY_SONG(tone_capslock_off); #endif } } @@ -267,7 +267,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap. tap(KC_B); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0); + PLAY_SONG(tone_ctrl_mod); #endif #ifdef BACKLIGHT_BREATHING breathing_speed_set(2); @@ -287,14 +287,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { tap(KC_C); unregister_code(KC_LCTL); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_copy, false, 0); + PLAY_SONG(tone_copy); #endif } else { // Tap, paste register_code(KC_LCTL); tap(KC_V); unregister_code(KC_LCTL); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_paste, false, 0); + PLAY_SONG(tone_paste); #endif } } @@ -305,7 +305,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ set_unicode_input_mode(UC_WIN); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(uniwin, false, 0); + PLAY_SONG(uniwin); #endif } return false; @@ -314,7 +314,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ set_unicode_input_mode(UC_LNX); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(unilin, false, 0); + PLAY_SONG(unilin); #endif } return false; @@ -419,28 +419,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void){ // Run once at startup #ifdef AUDIO_ENABLE _delay_ms(50); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); #endif } #ifdef AUDIO_ENABLE void play_goodbye_tone(void){ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); } void shutdown_user(){ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } void music_on_user(void){ // Run when the music layer is turned on - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void music_off_user(void){ // Run when music is turned off - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); } #endif diff --git a/keyboards/preonic/preonic.c b/keyboards/preonic/preonic.c index d9c119b8daca..cd765fe4afed 100644 --- a/keyboards/preonic/preonic.c +++ b/keyboards/preonic/preonic.c @@ -1,4 +1,4 @@ -#include "preonic.h" +#include QMK_KEYBOARD_H #ifdef ONEHAND_ENABLE __attribute__ ((weak)) diff --git a/keyboards/preonic/preonic.h b/keyboards/preonic/preonic.h index 0e0b101e45a5..02845a549cce 100644 --- a/keyboards/preonic/preonic.h +++ b/keyboards/preonic/preonic.h @@ -33,4 +33,6 @@ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ } +#define LAYOUT_ortho_5x12 PREONIC_GRID + #endif diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk index 08789b867a9a..38c3f3f584bc 100644 --- a/keyboards/preonic/rules.mk +++ b/keyboards/preonic/rules.mk @@ -1,5 +1,3 @@ - - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -68,3 +66,5 @@ API_SYSEX_ENABLE ?= no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_5x12 diff --git a/keyboards/readme.md b/keyboards/readme.md index 9ee3fc7abc6f..5d72a2a4134e 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -57,3 +57,4 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [TheVan 44](/keyboards/tv44) — A 44-key staggered keybard by Evangs. * [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. +* [XD75](/keyboards/xd75) — 15x5 ortholinear keyboard by XIUDI. diff --git a/keyboards/roadkit/keymaps/singlesBrent/Makefile b/keyboards/roadkit/keymaps/singlesBrent/Makefile new file mode 100644 index 000000000000..b61d6cca2c71 --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/Makefile @@ -0,0 +1,22 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dance functionality + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singlesBrent/config.h b/keyboards/roadkit/keymaps/singlesBrent/config.h new file mode 100644 index 000000000000..57468e122acf --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/config.h @@ -0,0 +1,15 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define TAPPING_TERM 175 + +#ifdef BACKLIGHT_ENABLE + #define BACKLIGHT_PIN B5 + #define BACKLIGHT_LEVELS 3 + #define BACKLIGHT_ON_STATE 0 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singlesBrent/keymap.c b/keyboards/roadkit/keymaps/singlesBrent/keymap.c new file mode 100644 index 000000000000..13197346a908 --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/keymap.c @@ -0,0 +1,242 @@ +#include "roadkit.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _NP 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 + +// Macro name shortcuts +#define NUMPAD M(_NP) +#define LAYER1 M(_L1) +#define LAYER2 M(_L2) +#define LAYER3 M(_L3) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +void matrix_init_user(void) { + backlight_level(4); +} + + + +//Tap Dance Declarations + +enum { + + TD_EQUAL_NP = 0, + TD_KP_PLUS_L1, + TD_DOT_L2, + TD_0_L3 + +}; + +//Tap Dance Definitions + + + //TD equal to turn on layer NP +void _td_equal_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_EQUAL); + } else if (state->count == 2) { + backlight_set(3); + layer_on(_NP); + layer_off(_L1); + layer_off(_L2); + layer_off(_L3); + } +} + +void _td_equal_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_EQUAL); + } +} + + + //TD kp plus to toggle layer 1 +void _td_kp_plus_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_KP_PLUS); + } else if (state->count == 2) { +// layer_invert(_L1); + backlight_set(2); + layer_on(_L1); + layer_off(_L2); + layer_off(_L3); + } +} + +void _td_kp_plus_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_KP_PLUS); + } +} + + + //TD dot to toggle layer 2 +void _td_dot_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_DOT); + } else if (state->count == 2) { + backlight_set(1); + layer_on(_L2); + layer_off(_L1); + layer_off(_L3); + } +} + +void _td_dot_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_DOT); + } +} + + //TD 0 to toggle layer 3 +void _td_0_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_0); + } else if (state->count == 2) { + backlight_set(0); + layer_on(_L3); + layer_off(_L1); + layer_off(_L2); + } +} + +void _td_0_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_0); + } +} + +//TD Actions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_EQUAL_NP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_equal_tg_finished, _td_equal_tg_reset), + [TD_KP_PLUS_L1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_kp_plus_tg_finished, _td_kp_plus_tg_reset), + [TD_DOT_L2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_dot_tg_finished, _td_dot_tg_reset), + [TD_0_L3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_0_tg_finished, _td_0_tg_reset) +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numberpad + * ,-----------------------. + * | 7 | 8 | 9 | / | + * |-----`-----`-----`-----| + * | 4 | 5 | 6 | * | + * |-----`-----`-----`-----| + * | 1 | 2 | 3 | - | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + * Tapdances: + * | L3 | L2 | L1 | NP | + * `-----`-----`-----`-----' + */ + [_NP] = /* Numpad */ + SINGLES_KEYMAP(KC_7, KC_8, KC_9, KC_SLASH, \ + KC_4, KC_5, KC_6, KC_KP_ASTERISK, \ + KC_1, KC_2, KC_3, KC_MINUS, \ + TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)), + +/* L1 + * ,-----------------------. + * | Esc |Bksp |Home |PgUp | + * |-----`-----`-----`-----| + * | Tab | Up | End |PgDn | + * |-----`-----`-----`-----| + * |Left |Down |Right|Enter| + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L1] = /* LAYER 1 */ + SINGLES_KEYMAP(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \ + KC_TAB, KC_UP, KC_END, KC_PGDOWN, \ + KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +/* L2 + * ,-----------------------. + * |Sleep|LClik|RClik|VolUp| + * |-----`-----`-----`-----| + * |AltF4| F11 |WinTb|VolDn| + * |-----`-----`-----`-----| + * |PrvTk|Play |NxtTk|Mute | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L2] = /* LAYER 2 */ + SINGLES_KEYMAP(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \ + LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \ + KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +/* L3 needs cut, copy, paste, undo, again (redo), find, calc, www back, www forward, F5 + * ,-----------------------. + * |WBack|WHome|WFor | F5 | + * |-----`-----`-----`-----| + * |Calc |Undo |Redo |WSrch| + * |-----`-----`-----`-----| + * | Cut |Copy |Paste|Find | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L3] = /* LAYER 3 */ + SINGLES_KEYMAP(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \ + KC_CALCULATOR, LCTL(KC_Z), LCTL(KC_Y), KC_WWW_SEARCH, \ + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_F), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _L3: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L3); + } + break; + case _L2: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L2); + } + break; + case _L1: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L1); + } + break; + case _NP: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/singlesBrent/readme.md b/keyboards/roadkit/keymaps/singlesBrent/readme.md new file mode 100644 index 000000000000..48ea4a8b3594 --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/readme.md @@ -0,0 +1,3 @@ +# The singles keymap for roadkit + +This keymap has a base layer with numpad functionality, and then a second layer with some additional keys. The user is encouraged to develop their own keymap using this as a starting point. diff --git a/keyboards/roadkit/readme.md b/keyboards/roadkit/readme.md index d7480a165411..e99b385f37ca 100644 --- a/keyboards/roadkit/readme.md +++ b/keyboards/roadkit/readme.md @@ -1,32 +1,14 @@ -roadkit keyboard firmware -====================== +roadkit +======= -## Quantum MK Firmware +A programmable macro pad. -For the full Quantum feature list, see [the QMK Wiki](https://github.com/qmk/qmk_firmware/wiki). +Keyboard Maintainer: QMK Community +Hardware Supported: Roadkit PCB +Hardware Availability: https://thevankeyboards.com/products/roadkit-r2?variant=37353813966 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the `keyboards/roadkit` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex. You can then use the programmer of your choice to program your .hex file. + make roadkit-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. For the roadkit, the default layout is a standard numpad layout. - -### Singles - -The singles layout for the roadkit corresponds to the configuration where only 1u keys are used and there are 16 of them on the board. To build the singles keymap, run `make singles`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +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/roadkit/roadkit.h b/keyboards/roadkit/roadkit.h index b10e5740f3f1..a82a62e1ed7d 100644 --- a/keyboards/roadkit/roadkit.h +++ b/keyboards/roadkit/roadkit.h @@ -30,4 +30,6 @@ { K30, K31, K32, K33 } \ } +#define LAYOUT_ortho_4x4 SINGLES_KEYMAP + #endif diff --git a/keyboards/roadkit/rules.mk b/keyboards/roadkit/rules.mk index 786c9dc3e70f..523d1ddf039c 100644 --- a/keyboards/roadkit/rules.mk +++ b/keyboards/roadkit/rules.mk @@ -67,3 +67,5 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x4 \ No newline at end of file diff --git a/keyboards/s60_x/default/rules.mk b/keyboards/s60_x/default/rules.mk index f0f0ad76b577..ce4064d1c6a3 100644 --- a/keyboards/s60_x/default/rules.mk +++ b/keyboards/s60_x/default/rules.mk @@ -1,9 +1,5 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/s60_x/readme.md b/keyboards/s60_x/readme.md index e30b2f76ce2c..9e1d06150ff4 100644 --- a/keyboards/s60_x/readme.md +++ b/keyboards/s60_x/readme.md @@ -1,255 +1,13 @@ -S60-x keyboard firmware -====================== +S60-x +===== DIY compact keyboard designed by VinnyCordeiro for Sentraq. Most of the keymaps are based on GH60 code. This is a port from TMK to QMK based on the [original S60-X Repo](https://github.com/VinnyCordeiro/tmk_keyboard). -## S60X Resources -- [Massdrop page](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) +Keyboard Maintainer: QMK Community +Hardware Supported: S60-x PCB +Hardware Availability: https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open -## Flashing your keyboard -The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). +Make example for this keyboard (after setting up your build environment): -[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. + make s60_x-default -[Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. - -**Programming the firmware (Windows)** - -1. download and install FLIP (http://www.atmel.com/tools/FLIP.aspx) -2. connect the keyboard, press the program button on the underside of the board (S1) and wait until it enumerates (you'll hear the "disconnect" and "connect" sound) -3. go to device manager, find the atmega32u4 chip and click "update driver" -4. choose location manually: folder named "usb" inside the installation directory of FLIP -5. once the driver is installed, run flip -6. Device -> Select: choose ATMega32U4 -7. Settings -> Communication -> USB, FLIP should show the signature at this point (58 1E 95 87) -8. File -> Load HEX file: choose the hex firmware: .hex -9. click "Run" -10. after programming is done, disconnect the device from USB and connect again. - - -**Programming the firmware (Linux)** - -1. Download and install/compile/unpack dfu-programmer from http://dfu-programmer.sourceforge.net/. -2. Issue the following commands in the command prompt after connecting the device and pressing the programming button (S1). You may need root permissions or udev rules to do that. - 1. `sudo dfu-programmer atmega32u4 erase` - 2. `sudo dfu-programmer atmega32u4 flash .hex` - 3. `sudo dfu-programmer atmega32u4 start` -3. The keyboard should start working. If it doesn't, reconnect the cable. - -## Building the firmware - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - - $ make [custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|] - -For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started). - -## List of included Keymaps - -Several versions of keymaps are available in advance but you are recommended to define your favorite layout yourself. -To define your own keymap, copy the [default keymap template](/quantum/template/keymaps/default) directory into the `keymaps` directory and start modifying the `keymap.c` file. Some options might require you to change the `config.h` or `Makefile` as well, refer to the main documentation for more information on those. -If you want to later merge your finalised keymap into this repository to make it available for everyone, make sure to also modify the `readme.md` in your keymap directory to show a visual version of your keymap. - -Here's a list of the standard layouts that are provided with the precompiled .hex-files. - -### 0 Initial explanations -The █████ blocks on the layouts hides the switch positions that do not exist physically on the PCB. If you feel like hacking the keyboard and adding new keys, those are the positions that can be used. You'll have to modify the [keymap_common.h](keymap_common.h) file for that. - -The ▒▒▒▒▒ blocks hides switch positions not used on this particular layout, but they do exist on the PCB. - -There is no LED support on the PCB at the moment, but I'll let the code for that untouched. - - -### 1 [Standard - ANSI (default layout)](keymaps/default/keymap.c) -The standard keymap is the one that is pre-flashed on the S60-X. - -#### 1.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 1.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 2 [Standard - ISO](keymaps/iso/keymap.c) -The same as the standard keymap, but with additional ISO keys. - - -#### 2.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 2.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 3 Poker -[The poker keymap](keymaps/poker/keymap.c) emulates original Vortex Poker layers -while both [poker_bit](keymaps/poker_bit/keymap.c) and [poker_set](keymap/poker_set/keymap.c) implement the same layout in a slightly different way, fix a minor issue of the original poker Layout and enhance arrow keys. - - Fn + Esc = ` - Fn + {left, down, up, right} = {home, pgdown, pgup, end} - -#### 3.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Fn │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 3.1 Poker Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ Up │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ Fn │Left │Down │Right│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 4. [Plain](keymaps/plain/keymap.c) -Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host. - -#### 4.0 Plain Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 5. [Hasu](keymaps/hasu/keymap.c) -This is Hasu's favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. - -(Hasu is the creator of the TMK firmware, for those who do not know that.) - - -### 6. [SpaceFN](keymaps/spacefn/keymap.c) -This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. Check the sourcefile and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0) for more information. - -#### 6.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│████ Space/Fn ███│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 6.1 SpaceFN layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │ │Home │ Up │ End │ Psc │ Slk │Pause│ Ins │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │PgUp │Left │Down │Right│ │ │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │Space│PgDwn│ ` │ ~ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ Fn │█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 7. [HHKB](keymap/hhkb/keymap.c) -The HHKB keymap emulates original HHKB layers. -#### 7.0: Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│ Fn │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │▒▒▒▒▒│ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│▒▒▒▒▒│ Alt │ Gui │▒▒▒▒▒│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 7.1: HHKB Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ │ │ │ │ │ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ VoD │ VoU │ Mut │ Ejc │ │ * │ / │Home │PgUp │Left │Right│▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │ │ + │ - │ End │PgDwn│Down │▒▒▒▒▒│ │ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │▒▒▒▒▒│ │ │█████│█████│█████│ │█████│█████│█████│▒▒▒▒▒│ │ │▒▒▒▒▒│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 8 [Custom](keymaps/custom/keymap.c) -The custom keymap is where I tested all the switches, not being concerned with a specific layout or layers. It's a plain layout option with the extra keys used on ISO & HHKB layouts being assigned some other keys. - -#### 8.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │PgUp │BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │PgDwn│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│Home │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ End │Shift│ Up │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - -### 9. [ANSI_QWERTZ](keymaps/ansi_qwertz/keymap.c) - -This keymap was designed for inputting characters with diacritics with ANSI keycaps. -It provides toggleable SpaceFn functionality, a dedicated arrow cluster and a microphone mute key on the function layer as well as a bootloader reset key. - -For more info, [check here](keymaps/ansi_qwertz/readme.md). +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/s60_x/rgb/rules.mk b/keyboards/s60_x/rgb/rules.mk index a979632a922e..42d45c332bda 100644 --- a/keyboards/s60_x/rgb/rules.mk +++ b/keyboards/s60_x/rgb/rules.mk @@ -2,8 +2,4 @@ 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 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable RGB light - -ifndef QUANTUM_DIR - include ../../../Makefile -endif \ No newline at end of file +RGBLIGHT_ENABLE = yes # Enable RGB light \ No newline at end of file diff --git a/keyboards/s65_x/keymaps/smt/keymap.c b/keyboards/s65_x/keymaps/smt/keymap.c new file mode 100644 index 000000000000..0620c5e2dae8 --- /dev/null +++ b/keyboards/s65_x/keymaps/smt/keymap.c @@ -0,0 +1,163 @@ +#include "s65_x.h" + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _FL 3 +#define _CL 4 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Helpful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Qwerty layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ ` │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │H_TAB│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ DEL │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │C_ESC│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LCTRL│L_GUI│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ _FL │R_GUI│LEFT │DOWN │RIGHT│ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 0: ANSI qwerty */ + [_QWERTY] = ANSI_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_GRV, \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + /* 1: Colemak layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ ` │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │H_TAB│ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │█████│ DEL │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │C_ESC│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LCTRL│L_GUI│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ _FL │R_GUI│LEFT │DOWN │RIGHT│ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 1: ANSI colemak */ + [_COLEMAK] = ANSI_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_GRV, \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + /* 2: Dvorak layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│ ` │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │H_TAB│ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │█████│ DEL │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │C_ESC│ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │▒▒▒▒▒│ENTER│█████│PG_UP│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LSHFT│▒▒▒▒▒│ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │▒▒▒▒▒│RSHFT│ UP │PG_DN│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │LCTRL│L_GUI│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ _FL │R_GUI│LEFT │DOWN │RIGHT│ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 2: ANSI dvorak */ + [_DVORAK] = ANSI_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_BSPC, KC_GRV, \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + /* 3: Function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ F13 │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │PRSCR│SCLCK│PAUSE│ │ │ │█████│ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ _CL │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │PG_UP│ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ _FL │ │HOME │PG_DN│ END │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 3: ANSI Fn layer */ + [_FL] = ANSI_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_F13, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), + + /* 4: Control layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ RGB │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │RESET│ │ │QWRTY│COLMK│DVORK│ │ │ │ │█████│RGBV+│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ _CL │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│RGBV-│ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ _FL │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │RGBS+│ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │█████│█████│█████│RGB_M│█████│█████│█████│ │ _FL │ │RGBH-│RGBS-│RGBH+│ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 4: ANSI control layer */ + [_CL] = ANSI_KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ + _______, _______, _______, _______, RESET, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, RGB_VAI, \ + _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + MO(_FL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, \ + _______, _______, _______, RGB_MOD, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/s65_x/readme.md b/keyboards/s65_x/readme.md index 0c558428b4cc..9021af4dffcb 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/s65_x/readme.md @@ -1,80 +1,13 @@ -S65-x keyboard firmware -====================== +S65-x +===== DIY 65% keyboard from Sentraq. -## S65X Resources -- [Sentraq page](https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914) +Keyboard Maintainer: QMK Community +Hardware Supported: S65-x PCB +Hardware Availability: https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914 -## Flashing your keyboard -The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). +Make example for this keyboard (after setting up your build environment): -[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S65-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. - -**Programming the firmware (Windows)** - -1. download and install FLIP (http://www.atmel.com/tools/FLIP.aspx) -2. connect the keyboard, press the program button on the underside of the board (S1) and wait until it enumerates (you'll hear the "disconnect" and "connect" sound) -3. go to device manager, find the atmega32u4 chip and click "update driver" -4. choose location manually: folder named "usb" inside the installation directory of FLIP -5. once the driver is installed, run flip -6. Device -> Select: choose ATMega32U4 -7. Settings -> Communication -> USB, FLIP should show the signature at this point (58 1E 95 87) -8. File -> Load HEX file: choose the hex firmware: .hex -9. click "Run" -10. after programming is done, disconnect the device from USB and connect again. - - -**Programming the firmware (Linux/Mac)** - -1. Download and install/compile/unpack dfu-programmer from http://dfu-programmer.sourceforge.net/. -2. Issue the following commands in the command prompt after connecting the device and pressing the programming button (S1). You may need root permissions or udev rules to do that. - 1. `sudo dfu-programmer atmega32u4 erase` - 2. `sudo dfu-programmer atmega32u4 flash .hex` - 3. `sudo dfu-programmer atmega32u4 start` -3. The keyboard should start working. If it doesn't, reconnect the cable. - -## Building the firmware - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - - $ make default - -For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started). - -## Keymaps - -Currently only an ANSI keymap is provided, hopefully others will contribute theirs. - -### 0 Initial explanations -The █████ blocks on the layouts hides the switch positions that do not exist physically on the PCB. If you feel like hacking the keyboard and adding new keys, those are the positions that can be used. You'll have to modify the [keymap_common.h](keymap_common.h) file for that. - -The ▒▒▒▒▒ blocks hides switch positions not used on this particular layout, but they do exist on the PCB. - - -### 1 [Standard - ANSI (default layout)](keymaps/default/keymap.c) - -#### 1.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │▒▒▒▒▒│END │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│▒▒▒▒▒│PG_UP│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 1.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│Vol+ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │Mute │Vol- │Play │ │ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + make s65_x-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/satan/keymaps/ben_iso/Makefile b/keyboards/satan/keymaps/ben_iso/Makefile new file mode 100644 index 000000000000..2a7ff27793f9 --- /dev/null +++ b/keyboards/satan/keymaps/ben_iso/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/satan/keymaps/ben_iso/config.h b/keyboards/satan/keymaps/ben_iso/config.h new file mode 100644 index 000000000000..84d55698c5be --- /dev/null +++ b/keyboards/satan/keymaps/ben_iso/config.h @@ -0,0 +1,58 @@ +/* +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_BEN +#define CONFIG_H_BEN + +#include "config_common.h" +#include "../../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER SATAN +#define PRODUCT GH60 +#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support + +/*MOUSE CONFIG OPTIONS */ + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 45 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* + * 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/satan/keymaps/ben_iso/keymap.c b/keyboards/satan/keymaps/ben_iso/keymap.c new file mode 100644 index 000000000000..048205898f4b --- /dev/null +++ b/keyboards/satan/keymaps/ben_iso/keymap.c @@ -0,0 +1,122 @@ +#include "satan.h" + +#define BASE 0 // Default layer +#define SPACE 1 // Space layer +#define NUMPAD 2 // Alt layer +#define CAPS 3 // Caps layer +#define FN1 4 // Generic function layer + +#define MAC0 M(0) // +#define MAC1 M(1) // +#define MAC2 M(2) // +#define MAC3 M(3) // +#define MAC4 M(4) // +#define MAC5 M(5) // +#define MAC6 M(6) // +#define MAC7 M(7) // +#define MAC8 M(8) // +#define MAC9 M(9) // +#define GRAV KC_GRV // +#define MEDI F(FNO1)// + +// General shortenings +#define ESCA KC_ESC +#define MINS KC_MINS +#define EQUL KC_EQL +#define BSPC KC_BSPC +#define DELE KC_DEL +#define LBRC KC_LBRC +#define RBRC KC_RBRC +#define ALTR KC_RALT +#define SCLN KC_SCLN +#define QUOT KC_QUOT +#define NUHS KC_NUHS +#define ENTE KC_ENT +#define NUBS KC_NUBS // Less/ greater sign +#define COMM KC_COMM // Comma +#define FSTO KC_DOT // Full stop +#define SLSH KC_SLSH +#define ALTL KC_LALT +#define GUIL KC_LGUI +#define GUIR KC_RGUI +#define MENO KC_MENU + +// Special Actions and Media Keys +#define INSE KC_INS // Insert here +#define HOME KC_HOME // Go to beginning of line +#define ENDI KC_END // go to end of line +#define PSCR KC_PSCR // Print Screen +#define SLCK KC_SLCK // go to end of line +#define PGDN KC_PGDN // go to end of line +#define PGUP KC_PGUP // go to end of line +#define PLPS KC_MPLY // Play/Pause +#define PAUS KC_PAUS // Pause button +#define MUTE KC_MUTE // Mute sound +#define VOLU KC_VOLU // Volume increase +#define VOLD KC_VOLD // Volume decrease +#define MNXT KC_MNXT // next track +#define MPRV KC_MPRV // prev track +#define MSTP KC_MSTP // stop playing +#define MSEL KC_MSEL // Select media (Start playing it) +#define MAIL KC_MAIL // Open default mail app +#define CALC KC_CALC // Open default calculator app +#define MYCM KC_MYCM // Open default file manager + +// increase readability +#define _______ KC_TRNS +#define XXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap BASE: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| R | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| # | R | + * |-----------------------------------------------------------| + * |Shft| \ | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | + * `-----------------------------------------------------------| + */ + +[ BASE ] = KEYMAP_ISO_SPLITRSHIFT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, XXXXX, \ + OSL(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_RSPC, XXXXX, \ + KC_LCTL, KC_LGUI,KC_LALT, LT(SPACE, KC_SPC), KC_RALT,OSL(FN1),TG(NUMPAD), KC_RCTL), + +[ SPACE ] = KEYMAP( + KC_GRAVE, 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, XXXXX,\ + _______, _______, _______, _______, MAIL, _______, _______, HOME, KC_UP, PSCR, SLCK, PAUS, PGUP, _______,\ + _______, _______, _______, PGUP , PGDN, _______, LALT(KC_F4), KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______,\ + _______, _______, _______, _______, CALC, _______, _______, _______, MUTE, VOLD, VOLU, _______, _______, XXXXX,\ + _______, _______, _______, _______, _______, _______, _______, _______), + +[ NUMPAD ] = KEYMAP( //Numpad and alt shortcuts + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXX,\ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, XXXXX,\ + _______, _______, _______, _______, _______, _______, _______, _______), + +[ CAPS ] = KEYMAP( //Mostly mouse layer with option for caps too + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______,\ + _______, KC_CAPS, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXX,\ + _______, _______, _______, _______, _______, _______, _______, _______), + + +[ FN1 ] = KEYMAP( //Functions/settings + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_INC, BL_DEC, BL_TOGG, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXX,\ + _______, _______, _______, _______, _______, _______, _______, _______), +}; + + diff --git a/keyboards/satan/keymaps/ben_iso/readme.md b/keyboards/satan/keymaps/ben_iso/readme.md new file mode 100644 index 000000000000..74b7680b2f17 --- /dev/null +++ b/keyboards/satan/keymaps/ben_iso/readme.md @@ -0,0 +1,12 @@ +# UK ISO layout for the Satan GH60 +## By Ben James +----- +This layout has a few unique features including: +* Spacebar activates special features when held: + * Arrow keys directly under right hand + * Volume control + * Fn keys on number row + * PageUp/PageDn/Home/other general buttons +* Mouse control when CAPS is held. Right hand controls mouse direction, left hand controls speed and mouse buttons. +* Space cadet style brackets when left/right shift are tapped + diff --git a/keyboards/satan/keymaps/mark1/keymap.c b/keyboards/satan/keymaps/mark1/keymap.c new file mode 100644 index 000000000000..2e5bddc49dc0 --- /dev/null +++ b/keyboards/satan/keymaps/mark1/keymap.c @@ -0,0 +1,30 @@ +#include "satan.h" + +#define KC_____ KC_TRNS +#define KC_FN MO(1) // Fn +#define KC_FNLK TG(1) // Fn lock +#define KC_HOME LGUI(KC_LEFT) // Home, or cmd-left +#define KC_END LGUI(KC_RGHT) // End, or cmd-right +#define KC_SLP LGUI(LALT(KC_POWER)) // sleep, or cmd-option-power +#define KC_SCLK LCTL(LSFT(KC_POWER)) // lock screen, or ctrl-shift-power + +// Mark I keyboard layout for GH60 Satan +// http://www.keyboard-layout-editor.com/#/gists/e1cde292bd2094cc3b763206d4d2cfb5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // 0: qwerty + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL ,KC_BSPC, KC_NO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NO, KC_ENT , + KC_LSFT,KC_FN , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_FN , + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_FNLK + ), + // 1: fn layer + 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_HOME,KC_UP ,KC_END ,KC_PGUP,_______,_______,_______, + _______,KC_VOLD,KC_MRWD,KC_MPLY,KC_MFFD,_______,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_PGDN,_______,_______,_______, + _______,_______,KC_MUTE,_______,_______,_______,_______,_______,_______,KC_SCLK,KC_SLP ,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______ + ) +}; diff --git a/keyboards/satan/keymaps/mark1/readme.md b/keyboards/satan/keymaps/mark1/readme.md new file mode 100644 index 000000000000..060faf80cd1e --- /dev/null +++ b/keyboards/satan/keymaps/mark1/readme.md @@ -0,0 +1,5 @@ +# Mark I layout for GH60 Satan + +A Mac keyboard for touch typists who enjoy having a Fn key on both the left-hand and right-hand side. + +[Layout](http://www.keyboard-layout-editor.com/#/gists/e1cde292bd2094cc3b763206d4d2cfb5) diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index 9da7d29b78ca..b7e6fac21936 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * | ~ | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | * |-----------------------------------------------------------| - * | | Up| | | | |Cal| |Ins| |PrSc|Sclk|Paus| | + * | | |Up| | | |Cal| |Ins| |PrSc|Sclk|Paus| | * |-----------------------------------------------------------| * | |Left|Down|Rig| | | | | | |Home|PgUp| | * |-----------------------------------------------------------| @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - + /* Keymap _RL: Function Layer * ,-----------------------------------------------------------. * | | | | | | | | | | | | | | RESET| @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | * |-----------------------------------------------------------| * | | | | | | | | | - * `-----------------------------------------------------------' + * `-----------------------------------------------------------' */ [_RL] = KEYMAP_ANSI( #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md index 1fd388935ebe..33310ce251df 100644 --- a/keyboards/satan/readme.md +++ b/keyboards/satan/readme.md @@ -1,7 +1,15 @@ -Satan GH60 keyboard firmware -====================== - -TODO: to be updated. +Satan GH60 +========== ![controller](https://i.imgur.com/9vyRBoT.jpg) -![power](https://i.imgur.com/pHMZHLP.jpg) \ No newline at end of file +![power](https://i.imgur.com/pHMZHLP.jpg) + +Keyboard Maintainer: QMK Community +Hardware Supported: Satan GH60 PCB +Hardware Availability: https://1upkeyboards.com/gh60-satan-pcb.html + +Make example for this keyboard (after setting up your build environment): + + make satan-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/satan/rules.mk b/keyboards/satan/rules.mk index 87a4a059542a..12a0663ae292 100644 --- a/keyboards/satan/rules.mk +++ b/keyboards/satan/rules.mk @@ -64,3 +64,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 60_ansi 60_iso \ No newline at end of file diff --git a/keyboards/satan/satan.h b/keyboards/satan/satan.h index f3cbd5305e62..3617f5328cc9 100644 --- a/keyboards/satan/satan.h +++ b/keyboards/satan/satan.h @@ -31,8 +31,8 @@ { \ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \ - {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \ } /* Satan GH60 ANSI layout @@ -125,4 +125,7 @@ void matrix_init_user(void); void matrix_scan_user(void); +#define LAYOUT_60_ansi KEYMAP_ANSI +#define LAYOUT_60_iso KEYMAP + #endif diff --git a/keyboards/sixkeyboard/readme.md b/keyboards/sixkeyboard/readme.md index 7d78a0cae56b..a2fc9eb46b2b 100644 --- a/keyboards/sixkeyboard/readme.md +++ b/keyboards/sixkeyboard/readme.md @@ -1,6 +1,17 @@ -# Techkeys SixKeyBoard +Techkeys SixKeyBoard +=== -[Get one here!](http://techkeys.us/collections/accessories/products/sixkeyboard) +Keyboard Maintainer: QMK Community +Hardware Supported: Techkeys SixKeyBoard PCB +Hardware Availability: http://techkeys.us/collections/accessories/products/sixkeyboard + +Make example for this keyboard (after setting up your build environment): + + make sixkeyboard-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. + +## Hardware Info The schematic is like this: @@ -15,4 +26,4 @@ The schematic is like this: The LED on the bottom is `C4`. All 7 of the leds are turned on when the keyboard boots-up in the `sixkeyboard.c` file - backlight_enable is not required. The MCU is an Atmega16u2, so the flash memory is limited to 0x3000 bytes - the current setup uses just about all of that! I'm sure things can be opitimised a bit. -There is a jumper on the bottom of the board (next to the USB port) that serves as a reset button - I drilled a hole in my case to allow for quick access via a screwdriver/metal object. \ No newline at end of file +There is a jumper on the bottom of the board (next to the USB port) that serves as a reset button - I drilled a hole in my case to allow for quick access via a screwdriver/metal object. diff --git a/keyboards/subatomic/Makefile b/keyboards/subatomic/Makefile new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h new file mode 100644 index 000000000000..592434aabb0c --- /dev/null +++ b/keyboards/subatomic/config.h @@ -0,0 +1,85 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6063 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Subatomic Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, C6, C5 } +#define UNUSED_PINS + +// #define AUDIO_VOICES +// #define C6_AUDIO + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * 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/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index f4aa50eba106..c5041f6e1fd0 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c @@ -160,54 +160,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -245,36 +214,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; }; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk new file mode 100644 index 000000000000..b4e2f488dd7a --- /dev/null +++ b/keyboards/subatomic/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=8192 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = yes # MIDI controls +AUDIO_ENABLE = yes # 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. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/subatomic/subatomic.c b/keyboards/subatomic/subatomic.c new file mode 100644 index 000000000000..f2120721c84c --- /dev/null +++ b/keyboards/subatomic/subatomic.c @@ -0,0 +1 @@ +#include "subatomic.h" \ No newline at end of file diff --git a/keyboards/subatomic/subatomic.h b/keyboards/subatomic/subatomic.h new file mode 100644 index 000000000000..b23cb8eb19fd --- /dev/null +++ b/keyboards/subatomic/subatomic.h @@ -0,0 +1,6 @@ +#ifndef SUBATOMIC_H +#define SUBATOMIC_H + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/sweet16/Makefile b/keyboards/sweet16/Makefile new file mode 100644 index 000000000000..0011010fdbf2 --- /dev/null +++ b/keyboards/sweet16/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/sweet16/config.h b/keyboards/sweet16/config.h new file mode 100644 index 000000000000..77d9e276dc7b --- /dev/null +++ b/keyboards/sweet16/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 0x2010 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 1up Keyboards +#define PRODUCT Sweet16 +#define DESCRIPTION 4x4 grid + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, C6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/sweet16/keymaps/default/keymap.c b/keyboards/sweet16/keymaps/default/keymap.c new file mode 100644 index 000000000000..c429d245652f --- /dev/null +++ b/keyboards/sweet16/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +#include "sweet16.h" + +enum custom_keycodes { + UP_URL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_4x4( + KC_7, KC_8, KC_9, KC_ASTR, + KC_4, KC_5, KC_6, KC_SLSH, + KC_1, KC_2, KC_3, KC_MINS, + KC_0, KC_ENT, KC_DOT, KC_EQL + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case UP_URL: + if (record->event.pressed) { + SEND_STRING("http://1upkeyboads.com"); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/sweet16/readme.md b/keyboards/sweet16/readme.md new file mode 100644 index 000000000000..3bd986fc53bb --- /dev/null +++ b/keyboards/sweet16/readme.md @@ -0,0 +1,14 @@ +Sweet16 +=== + +A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards + +Keyboard Maintainer: QMK Community +Hardware Supported: Sweet16 Keyboard PCB +Hardware Availability: [1up Keyboards](https://1upkeyboards.com/) + +Make example for this keyboard (after setting up your build environment): + + make sweet16-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/sweet16/rules.mk b/keyboards/sweet16/rules.mk new file mode 100644 index 000000000000..212e74059e4b --- /dev/null +++ b/keyboards/sweet16/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/sweet16/sweet16.c b/keyboards/sweet16/sweet16.c new file mode 100644 index 000000000000..2f116c2a3786 --- /dev/null +++ b/keyboards/sweet16/sweet16.c @@ -0,0 +1 @@ +#include "sweet16.h" \ No newline at end of file diff --git a/keyboards/sweet16/sweet16.h b/keyboards/sweet16/sweet16.h new file mode 100644 index 000000000000..23d411a89b29 --- /dev/null +++ b/keyboards/sweet16/sweet16.h @@ -0,0 +1,30 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/maartenwut/keymap.c b/keyboards/tada68/keymaps/maartenwut/keymap.c index d1e63a6b3131..8ddd6e30566a 100755 --- a/keyboards/tada68/keymaps/maartenwut/keymap.c +++ b/keyboards/tada68/keymaps/maartenwut/keymap.c @@ -30,15 +30,6 @@ #define LSHIFT OSM(MOD_LSFT) #define SPACE LT(_AR, KC_SPC) -#define MACRO_BREATH_TOGGLE 13 -#define MACRO_BREATH_SPEED_INC 14 -#define MACRO_BREATH_SPEED_DEC 15 -#define MACRO_BREATH_DEFAULT 16 -#define M_BRTOG M(MACRO_BREATH_TOGGLE) -#define M_BSPDU M(MACRO_BREATH_SPEED_INC) -#define M_BSPDD M(MACRO_BREATH_SPEED_DEC) -#define M_BDFLT M(MACRO_BREATH_DEFAULT) - static uint16_t key_timer; enum emoticons { @@ -76,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * | |MsL|MsD|MsR| |_GA| | | | | | | |Hme | * |----------------------------------------------------------------| - * | | |BL-|BL+|BL |BR-|BR+|BR | |VoU|VoD|Mut| |MwU|End | + * | | | | | | | | | |VoU|VoD|Mut| |MwU|End | * |----------------------------------------------------------------| * | | | | | | | |MwL|MwD|MwR | * `----------------------------------------------------------------' @@ -84,13 +75,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = KEYMAP_ANSI( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, KC_PSCR, \ TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TO(_LO), \ - TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_HOME, \ - TRNS, TRNS, BL_DEC, BL_INC, BL_TOGG, M_BSPDD, M_BSPDU, M_BRTOG, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, KC_WH_U, KC_END, \ + TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_HOME, \ + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, KC_WH_U, KC_END, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R), /* Keymap _AR: Arrow layer * ,----------------------------------------------------------------. - * | | | | | | | | | | | | | | | | + * |~` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | * |----------------------------------------------------------------| * |Lenny| | | | | | | | | | | | | | | * |----------------------------------------------------------------| @@ -102,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------' */ [_AR] = KEYMAP_ANSI( - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, TRNS, \ LENNY, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ DWNHRT, TRNS, TRNS, TRNS, TRNS, TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TRNS, TRNS, TRNS, TRNS, \ SHRUG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ @@ -408,29 +399,16 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { } } break; - case MACRO_BREATH_TOGGLE: - if (record->event.pressed) { - breathing_toggle(); - } - break; - - case MACRO_BREATH_SPEED_INC: - if (record->event.pressed) { - breathing_speed_inc(1); - } - break; - - case MACRO_BREATH_SPEED_DEC: - if (record->event.pressed) { - breathing_speed_dec(1); - } - break; - - case MACRO_BREATH_DEFAULT: - if (record->event.pressed) { - breathing_defaults(); - } - break; } return MACRO_NONE; }; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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/tv44/readme.md b/keyboards/tv44/readme.md index 4f691a4ca0ec..f0a277dec938 100644 --- a/keyboards/tv44/readme.md +++ b/keyboards/tv44/readme.md @@ -1,28 +1,14 @@ -tv44 keyboard firmware -====================== +The Van 44 +========== -## Quantum MK Firmware +A compact 44% keyboard. -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: The Van PCB +Hardware Availability: https://thevankeyboards.com/products/minivan-r4-keyboard-kit?variant=37353952718 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/tv44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make tv44-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file +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/uk78/Makefile b/keyboards/uk78/Makefile new file mode 100644 index 000000000000..57b2ef62e5f3 --- /dev/null +++ b/keyboards/uk78/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h new file mode 100644 index 000000000000..e538ad33b77d --- /dev/null +++ b/keyboards/uk78/config.h @@ -0,0 +1,76 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x554B /* Ascii */ +#define PRODUCT_ID 0x004E +#define DEVICE_VER 0x0002 +#define MANUFACTURER UK Keyboards +#define PRODUCT UK78 +#define DESCRIPTION QMK keyboard firmware for UK78 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F3, F2, F1, F0, A0 } +#define MATRIX_COL_PINS { A2, A1, F5, F4, E6, E7, E5, E4, B7, D0, D1, D2, D3, D4, D5, D6, D7, B5, E0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +/* ws2812b options */ +#define RGB_DI_PIN F6 +#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/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c new file mode 100644 index 000000000000..b01beae18226 --- /dev/null +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#include "uk78.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 +// entirely and just use numbers. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_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_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, + 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = 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_PSCR, KC_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md new file mode 100644 index 000000000000..46f2936143b8 --- /dev/null +++ b/keyboards/uk78/readme.md @@ -0,0 +1,16 @@ +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-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/uk78/rules.mk b/keyboards/uk78/rules.mk new file mode 100644 index 000000000000..4e8d14812fda --- /dev/null +++ b/keyboards/uk78/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=8192 + + +# 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/uk78/uk78.c b/keyboards/uk78/uk78.c new file mode 100644 index 000000000000..3611427d0271 --- /dev/null +++ b/keyboards/uk78/uk78.c @@ -0,0 +1 @@ +#include "uk78.h" diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h new file mode 100644 index 000000000000..6cc5eee4791b --- /dev/null +++ b/keyboards/uk78/uk78.h @@ -0,0 +1,20 @@ +#ifndef UK78_H +#define UK78_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ + K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 15ce688973fa..c40bf1ef6acd 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -559,32 +559,32 @@ void led_set_user(uint8_t usb_led) if ((usb_led & (1<] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file +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/whitefox/readme.md b/keyboards/whitefox/readme.md index 0714ad563976..2f1445d33d49 100644 --- a/keyboards/whitefox/readme.md +++ b/keyboards/whitefox/readme.md @@ -1,7 +1,14 @@ -WhiteFox keyboard firmware -====================== +WhiteFox +======== -This is an experimental port which came from the original TMK WhiteFox repo. +A compact 65% keyboard. -The LED controller was not ported, as the original was a dirty hack and it would -be good to have complete support. +Keyboard Maintainer: QMK Community +Hardware Supported: Whitefox PCB +Hardware Availability: https://input.club/whitefox/ + +Make example for this keyboard (after setting up your build environment): + + make whitefox-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/xd60/readme.md b/keyboards/xd60/readme.md index 1e8e52caa111..d7aa3d9b9ec3 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,17 +1,16 @@ -# QMK Firmware for XIUDI's 60% XD60 PCB +XD60 +== -![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) +Compact 60% with arrows. -## Quantum MK Firmware -For the full Quantum feature list, see [the parent readme.md](/readme.md). +![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) -## Additional Notes -The XD60 is essentially a GH60 rev. C, with support for a right-hand arrow cluster. Includes full compatibility with GH60 expansion boards. Board also supports in-switch LEDs (two-pin, single colour), as well as WS2182 LED strips for underglow lighting. Default keymap included, matching configuration on sale page. +Keyboard Maintainer: QMK Community +Hardware Supported: XD60 PCB +Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open -Version 2 PCBs include 6 soldered on RGB underglow LEDs on the bottom, and are labelled "XD60v2" on the top. They are otherwise identical to v1 PCBs. +Make example for this keyboard (after setting up your build environment): -## Known Issues -In-switch backlight LEDs seem to only support 1 brightness level. + make xd60-default -## Build -To build the default keymap, simply run `make xd60-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/xd75/Makefile b/keyboards/xd75/Makefile new file mode 100644 index 000000000000..840dc9a28667 --- /dev/null +++ b/keyboards/xd75/Makefile @@ -0,0 +1,18 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/gh60/keymaps/unxmaal/config.h b/keyboards/xd75/config.h similarity index 53% rename from keyboards/gh60/keymaps/unxmaal/config.h rename to keyboards/xd75/config.h index bb218d6fd44b..3764cfba4b31 100644 --- a/keyboards/gh60/keymaps/unxmaal/config.h +++ b/keyboards/xd75/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2017 REPLACE_WITH_YOUR_NAME This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8,11 +8,11 @@ the Free Software Foundation, either version 2 of the License, or 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 +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 . +along with this program. If not, see . */ #ifndef CONFIG_H @@ -21,16 +21,16 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack -#define PRODUCT GH60 -#define DESCRIPTION t.m.k. keyboard firmware for GH60 +#define VENDOR_ID 0xCDCD +#define PRODUCT_ID 0x7575 +#define DEVICE_VER 0x0001 +#define MANUFACTURER xiudi +#define PRODUCT XD75 +#define DESCRIPTION XD75Re 15x5 ortholinear keyboard /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 14 +#define MATRIX_COLS 15 /* * Keyboard Matrix Assignments @@ -39,18 +39,20 @@ along with this program. If not, see . * 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) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -// Rev A -// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } -// Rev B/C -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -59,7 +61,6 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -101,48 +102,48 @@ along with this program. If not, see . /* key combination for magic key command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + 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_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 +//#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. + * These options are also useful to firmware size reduction. */ /* disable debug print */ @@ -158,33 +159,35 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +// ws2812 options +#define RGB_DI_PIN F6 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 6 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + /* - * RGB Underglow - * These settings are for the F4 by default: - * - * - * #define ws2812_PORTREG PORTF - * #define ws2812_DDRREG DDRF - * #define ws2812_pin PF4 - * #define RGBLED_NUM 14 // Number of LEDs - * #define RGBLIGHT_HUE_STEP 10 - * #define RGBLIGHT_SAT_STEP 17 - * #define RGBLIGHT_VAL_STEP 17 - * - * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. - * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. - * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c + * 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 -/* Deprecated code below -#define ws2812_PORTREG PORTF -#define ws2812_DDRREG DDRF -#define ws2812_pin PF4 -*/ -#define RGB_DI_PIN F4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 #endif diff --git a/keyboards/xd75/keymaps/default/Makefile b/keyboards/xd75/keymaps/default/Makefile new file mode 100644 index 000000000000..d4e08cfb26be --- /dev/null +++ b/keyboards/xd75/keymaps/default/Makefile @@ -0,0 +1,18 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h new file mode 100644 index 000000000000..f52a97bbc865 --- /dev/null +++ b/keyboards/xd75/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c new file mode 100644 index 000000000000..82ea1f2be850 --- /dev/null +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -0,0 +1,186 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd75.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define ___T___ KC_TRNS +#define XXXXXXX KC_NO + +// Layer shorthand +#define _QW 0 +#define _CM 1 +#define _DV 2 +#define _LW 3 +#define _RS 4 +#define _FN 5 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = { /* QWERTY */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_CM] = { /* COLEMAK */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, + { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* DVORAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_DV] = { /* DVORAK */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* LOWERED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = { /* LOWERED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = { /* RAISED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| + * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = { /* FUNCTION */ + { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, + { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, + { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D }, + { RESET , _______, DF(_QW), DF(_CM), DF(_DV), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xd75/keymaps/default/readme.md new file mode 100644 index 000000000000..d53c0f34a87a --- /dev/null +++ b/keyboards/xd75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/fabian/Makefile b/keyboards/xd75/keymaps/fabian/Makefile new file mode 100644 index 000000000000..6e8941fdfd85 --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/Makefile @@ -0,0 +1,37 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h new file mode 100644 index 000000000000..59de3fa55f65 --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +// place overrides here + +#endif diff --git a/keyboards/xd75/keymaps/fabian/keymap.c b/keyboards/xd75/keymaps/fabian/keymap.c new file mode 100644 index 000000000000..884602fde45e --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/keymap.c @@ -0,0 +1,237 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + { CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Colemak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | | | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, + { CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Dvorak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | | | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, + { CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + { SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | 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, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }, +}, + +/* Adjust (Lower + Raise) + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, +}, +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md new file mode 100644 index 000000000000..0bc82be91e07 --- /dev/null +++ b/keyboards/xd75/readme.md @@ -0,0 +1,30 @@ +xd75 keyboard firmware +====================== + +The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! + +## Quantum MK Firmware + +For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/xd75 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +The "default" keymap included is basically the OLKB Atomic keymap with a few buttons added for RGB underglow control. This should be usable as a starting point, but most people will be best served creating their own keymap and flashing it - more info on creating your own keymap is available in [the official QMK documentation](https://docs.qmk.fm). + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk new file mode 100644 index 000000000000..7aa70212ed45 --- /dev/null +++ b/keyboards/xd75/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4996 + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_5x15 \ No newline at end of file diff --git a/keyboards/xd75/xd75.c b/keyboards/xd75/xd75.c new file mode 100644 index 000000000000..3d635f3c10ca --- /dev/null +++ b/keyboards/xd75/xd75.c @@ -0,0 +1,43 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd75.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h new file mode 100644 index 000000000000..08592b665085 --- /dev/null +++ b/keyboards/xd75/xd75.h @@ -0,0 +1,55 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef XD75_H +#define XD75_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, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#define KC_KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ +} + +#define LAYOUT_ortho_5x15 KEYMAP + +#endif diff --git a/layouts/community/60_ansi/layout.json b/layouts/community/60_ansi/layout.json new file mode 100644 index 000000000000..b7e1d0fed2e7 --- /dev/null +++ b/layouts/community/60_ansi/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","","",{w:2.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/community/60_ansi/readme.md b/layouts/community/60_ansi/readme.md new file mode 100644 index 000000000000..15f51d3fa1b6 --- /dev/null +++ b/layouts/community/60_ansi/readme.md @@ -0,0 +1,3 @@ +# 60_ansi + + LAYOUT_60_ansi \ No newline at end of file diff --git a/layouts/community/60_iso/layout.json b/layouts/community/60_iso/layout.json new file mode 100644 index 000000000000..2b8493fca758 --- /dev/null +++ b/layouts/community/60_iso/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","",{w:2.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/community/60_iso/readme.md b/layouts/community/60_iso/readme.md new file mode 100644 index 000000000000..42ff805fb68e --- /dev/null +++ b/layouts/community/60_iso/readme.md @@ -0,0 +1,3 @@ +# 60_iso + + LAYOUT_60_iso \ No newline at end of file diff --git a/keyboards/gh60/keymaps/unxmaal/README.md b/layouts/community/60_iso/unxmaal/README.md similarity index 100% rename from keyboards/gh60/keymaps/unxmaal/README.md rename to layouts/community/60_iso/unxmaal/README.md diff --git a/layouts/community/60_iso/unxmaal/config.h b/layouts/community/60_iso/unxmaal/config.h new file mode 100644 index 000000000000..7a500b1bb565 --- /dev/null +++ b/layouts/community/60_iso/unxmaal/config.h @@ -0,0 +1,32 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef KEYMAP_CONFIG_H +#define KEYMAP_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +#ifndef RGB_DI_PIN + #define RGB_DI_PIN F4 + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 8 // Number of LEDs + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/gh60/keymaps/unxmaal/keymap.c b/layouts/community/60_iso/unxmaal/keymap.c similarity index 98% rename from keyboards/gh60/keymaps/unxmaal/keymap.c rename to layouts/community/60_iso/unxmaal/keymap.c index 7c9bd6a6d7e8..e9b38788e454 100644 --- a/keyboards/gh60/keymaps/unxmaal/keymap.c +++ b/layouts/community/60_iso/unxmaal/keymap.c @@ -1,4 +1,4 @@ -#include "gh60.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define _BL 0 @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Fn|Alt |Gui | Space(tapped), Fn(held) |Gui |Alt |Menu(tapped, Fn2(held)|Ctrl| * `-----------------------------------------------------------------------------' */ - [_BL] = KEYMAP( + [_BL] = LAYOUT_60_iso( KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, \ KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, \ KC_LCTL,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [_AL] = KEYMAP( + [_AL] = LAYOUT_60_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_DELETE, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-------------------------------------------------------------' */ - [_FL] = KEYMAP( + [_FL] = LAYOUT_60_iso( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MPRV,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,RESET, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PGUP,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_TRNS,KC_HOME,KC_PGDN,KC_END,KC_TRNS,KC_TRNS,KC_TRNS, \ @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [_UL] = KEYMAP( + [_UL] = LAYOUT_60_iso( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ @@ -143,6 +143,7 @@ void matrix_scan_user(void) { // Layer LED indicators // ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + #ifdef KEYBOARD_gh60 uint32_t layer = layer_state; if (layer & (1<<1)) { gh60_wasd_leds_on(); @@ -155,6 +156,7 @@ void matrix_scan_user(void) { } else { gh60_esc_led_off(); } + #endif }; #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) diff --git a/layouts/community/60_iso/unxmaal/rules.mk b/layouts/community/60_iso/unxmaal/rules.mk new file mode 100644 index 000000000000..26fc6dc66960 --- /dev/null +++ b/layouts/community/60_iso/unxmaal/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable RGB Underglow diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/layouts/community/ergodox/333fred/README.md similarity index 100% rename from keyboards/ergodox/keymaps/333fred/README.md rename to layouts/community/ergodox/333fred/README.md diff --git a/keyboards/ergodox/keymaps/333fred/config.h b/layouts/community/ergodox/333fred/config.h similarity index 78% rename from keyboards/ergodox/keymaps/333fred/config.h rename to layouts/community/ergodox/333fred/config.h index f19a52bca103..6a03446e0321 100644 --- a/keyboards/ergodox/keymaps/333fred/config.h +++ b/layouts/community/ergodox/333fred/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_H_ #define CONFIG_H_ -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #undef TAPPING_TERM #define TAPPING_TERM 150 diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c similarity index 95% rename from keyboards/ergodox/keymaps/333fred/keymap.c rename to layouts/community/ergodox/333fred/keymap.c index e3f95132d3c6..3fac44e3988f 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -40,15 +40,6 @@ enum custom_macros { KEEPASS_TYPE, }; -// Tap Dance Definitions -enum tap_dance_custom_keys { - TD_SEMICOLON_COLON = 0 -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON) -}; - // NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -59,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | + * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Copy | Paste| | Alt |Ctrl/Esc| + * | Copy | Paste| | Alt | Lock | * ,------|------|------| |------+--------+------. * | | | PgUp | | PgDn | | | * | Bcksp|OSL(2)|------| |------| Ent |Space | @@ -75,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -86,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_BSPC,OSL(SYMB), KC_DEL, // right hand - TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, TD(TD_SEMICOLON_COLON),KC_QUOT, - MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), - KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, - KC_RALT, CTL_T(KC_ESC), + TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_LOCK, KC_PGDN, KC_RCTL, KC_ENT, KC_SPC ), @@ -118,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[CODE] = KEYMAP( // layer 1 : code +[CODE] = LAYOUT_ergodox( // layer 1 : code // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10, @@ -161,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LPRN,KC_RPRN,KC_PIPE,KC_TRNS, @@ -203,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -244,7 +235,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MOVE] = KEYMAP( +[MOVE] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(DLEFT), M(DRIGHT), KC_LCTL, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/333fred/rules.mk b/layouts/community/ergodox/333fred/rules.mk new file mode 100644 index 000000000000..d8e081eaa02a --- /dev/null +++ b/layouts/community/ergodox/333fred/rules.mk @@ -0,0 +1,8 @@ +LCD_BACKLIGHT_ENABLE = yes +LCD_ENABLE = yes +BACKLIGHT_ENABLE = yes +NKRO_ENABLE = yes +KEY_LOCK_ENABLE = yes + + + diff --git a/keyboards/ergodox/keymaps/333fred/visualizer.c b/layouts/community/ergodox/333fred/visualizer.c similarity index 100% rename from keyboards/ergodox/keymaps/333fred/visualizer.c rename to layouts/community/ergodox/333fred/visualizer.c diff --git a/keyboards/ergodox/keymaps/ab/keyboard-layout.json b/layouts/community/ergodox/ab/keyboard-layout.json similarity index 100% rename from keyboards/ergodox/keymaps/ab/keyboard-layout.json rename to layouts/community/ergodox/ab/keyboard-layout.json diff --git a/keyboards/ergodox/keymaps/ab/keymap.c b/layouts/community/ergodox/ab/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/ab/keymap.c rename to layouts/community/ergodox/ab/keymap.c index 7938c9da3b79..7bda0cd22331 100644 --- a/keyboards/ergodox/keymaps/ab/keymap.c +++ b/layouts/community/ergodox/ab/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* - [BASE] = KEYMAP( // layer 0 : default + [BASE] = LAYOUT_ergodox( // layer 0 : default // Left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_WBAK, @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // FN1 Layer - [FN1] = KEYMAP( + [FN1] = LAYOUT_ergodox( // Left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/layouts/community/ergodox/ab/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/ab/readme.md rename to layouts/community/ergodox/ab/readme.md diff --git a/keyboards/ergodox/keymaps/ab/Makefile b/layouts/community/ergodox/ab/rules.mk similarity index 80% rename from keyboards/ergodox/keymaps/ab/Makefile rename to layouts/community/ergodox/ab/rules.mk index b673c5ce52ce..839dd82e1e35 100644 --- a/keyboards/ergodox/keymaps/ab/Makefile +++ b/layouts/community/ergodox/ab/rules.mk @@ -4,6 +4,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/absenth/keymap.c b/layouts/community/ergodox/absenth/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/absenth/keymap.c rename to layouts/community/ergodox/absenth/keymap.c index ded668e13b64..b9dddfb420f7 100644 --- a/keyboards/ergodox/keymaps/absenth/keymap.c +++ b/layouts/community/ergodox/absenth/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/absenth/readme.md b/layouts/community/ergodox/absenth/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/absenth/readme.md rename to layouts/community/ergodox/absenth/readme.md diff --git a/keyboards/ergodox/keymaps/adam/config.h b/layouts/community/ergodox/adam/config.h similarity index 82% rename from keyboards/ergodox/keymaps/adam/config.h rename to layouts/community/ergodox/adam/config.h index b3910bc452bf..21af8c6b8dcc 100644 --- a/keyboards/ergodox/keymaps/adam/config.h +++ b/layouts/community/ergodox/adam/config.h @@ -1,4 +1,4 @@ -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #undef TAPPING_TERM #define TAPPING_TERM 300 //At 500 some bad logic takes hold diff --git a/keyboards/ergodox/keymaps/adam/keymap.c b/layouts/community/ergodox/adam/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/adam/keymap.c rename to layouts/community/ergodox/adam/keymap.c index 432f0fb26f3e..e99e5d45353e 100644 --- a/keyboards/ergodox/keymaps/adam/keymap.c +++ b/layouts/community/ergodox/adam/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `----------------------' */ - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( // left hand GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______, KC_ENT ), - [FLOCK] = KEYMAP( + [FLOCK] = LAYOUT_ergodox( // left hand XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX,KC_LBRC,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - [JLOCK] = KEYMAP( + [JLOCK] = LAYOUT_ergodox( // left hand XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX,KC_LBRC,KC_GRV, KC_TILD,XXXXXXX,XXXXXXX,XXXXXXX, @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - [CAPLOCK] = KEYMAP( + [CAPLOCK] = LAYOUT_ergodox( // left hand TO(BASE), _______, _______, _______, _______, _______, _______, _______, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), _______, diff --git a/keyboards/ergodox/keymaps/adam/readme.md b/layouts/community/ergodox/adam/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/adam/readme.md rename to layouts/community/ergodox/adam/readme.md diff --git a/keyboards/ergodox/keymaps/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/adnw_k_o_y/keymap.c rename to layouts/community/ergodox/adnw_k_o_y/keymap.c index 31ae4262b284..4ff4495905c7 100644 --- a/keyboards/ergodox/keymaps/adnw_k_o_y/keymap.c +++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_german.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/adnw_k_o_y/readme.md b/layouts/community/ergodox/adnw_k_o_y/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/adnw_k_o_y/readme.md rename to layouts/community/ergodox/adnw_k_o_y/readme.md diff --git a/keyboards/ergodox/keymaps/albert/config.h b/layouts/community/ergodox/albert/config.h similarity index 87% rename from keyboards/ergodox/keymaps/albert/config.h rename to layouts/community/ergodox/albert/config.h index e6d3631172c0..0c6231fbbf52 100644 --- a/keyboards/ergodox/keymaps/albert/config.h +++ b/layouts/community/ergodox/albert/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H /* using UK layout for space-cadet-shift */ #define LSPO_KEY KC_9 diff --git a/keyboards/ergodox/keymaps/albert/keymap.c b/layouts/community/ergodox/albert/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/albert/keymap.c rename to layouts/community/ergodox/albert/keymap.c index dfbb311bda1d..c1b47312fef0 100644 --- a/keyboards/ergodox/keymaps/albert/keymap.c +++ b/layouts/community/ergodox/albert/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ## | | ## | | | * `--------------------' `--------------------' */ -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS, @@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ## | | ## | | | * `--------------------' `--------------------' */ -[NUMB] = KEYMAP( +[NUMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x, @@ -203,7 +203,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[CRSR] = KEYMAP( +[CRSR] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO, @@ -244,7 +244,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[MOUS] = KEYMAP( +[MOUS] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, @@ -285,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ## | | ## | | | * `--------------------' `--------------------' */ -[KEYW] = KEYMAP( +[KEYW] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO, KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO, @@ -326,7 +326,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[EMAC] = KEYMAP( +[EMAC] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB, KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/ergodox/keymaps/albert/readme.md b/layouts/community/ergodox/albert/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/albert/readme.md rename to layouts/community/ergodox/albert/readme.md diff --git a/keyboards/ergodox/keymaps/albert/Makefile b/layouts/community/ergodox/albert/rules.mk similarity index 54% rename from keyboards/ergodox/keymaps/albert/Makefile rename to layouts/community/ergodox/albert/rules.mk index eb8544afef01..fcd019e838b0 100644 --- a/keyboards/ergodox/keymaps/albert/Makefile +++ b/layouts/community/ergodox/albert/rules.mk @@ -1,5 +1,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/alexjj/keymap.c b/layouts/community/ergodox/alexjj/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/alexjj/keymap.c rename to layouts/community/ergodox/alexjj/keymap.c index ac954ba5bc90..5127b93f46f8 100644 --- a/keyboards/ergodox/keymaps/alexjj/keymap.c +++ b/layouts/community/ergodox/alexjj/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[UNIC] = KEYMAP( // layer 3 : Unicode Entry +[UNIC] = LAYOUT_ergodox( // layer 3 : Unicode Entry // left hand KC_LALT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_LALT, KC_TRNS, KC_TRNS, KC_E, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/alexjj/readme.md b/layouts/community/ergodox/alexjj/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/alexjj/readme.md rename to layouts/community/ergodox/alexjj/readme.md diff --git a/keyboards/ergodox/keymaps/algernon/COPYING b/layouts/community/ergodox/algernon/COPYING similarity index 100% rename from keyboards/ergodox/keymaps/algernon/COPYING rename to layouts/community/ergodox/algernon/COPYING diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/layouts/community/ergodox/algernon/NEWS.md similarity index 100% rename from keyboards/ergodox/keymaps/algernon/NEWS.md rename to layouts/community/ergodox/algernon/NEWS.md diff --git a/keyboards/ergodox/keymaps/algernon/config.h b/layouts/community/ergodox/algernon/config.h similarity index 93% rename from keyboards/ergodox/keymaps/algernon/config.h rename to layouts/community/ergodox/algernon/config.h index 9bb1025be5e4..8c115e21a069 100644 --- a/keyboards/ergodox/keymaps/algernon/config.h +++ b/layouts/community/ergodox/algernon/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_ALGERNON_H #define CONFIG_ALGERNON_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #undef MOUSEKEY_TIME_TO_MAX #undef MOUSEKEY_MAX_SPEED diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/layouts/community/ergodox/algernon/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/algernon/keymap.c rename to layouts/community/ergodox/algernon/keymap.c index b615f3f5fd26..8be54986f896 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/layouts/community/ergodox/algernon/keymap.c @@ -3,7 +3,7 @@ */ #include -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "led.h" #include "debug.h" #include "action_layer.h" @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ESC | | HUN | | | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 ,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ESC | | LEAD | | | * `--------------------' `--------------------' */ -[ADORE] = KEYMAP( +[ADORE] = LAYOUT_ergodox( // left hand KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 ,KC_BSLS ,KC_X ,KC_W ,KC_C ,KC_H ,KC_F ,TD(CT_LBP) @@ -225,7 +225,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[ARRW] = KEYMAP( +[ARRW] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS @@ -271,7 +271,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[APPSEL] = KEYMAP( +[APPSEL] = LAYOUT_ergodox( // left hand KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS @@ -318,7 +318,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[HUN] = KEYMAP( +[HUN] = LAYOUT_ergodox( // left hand KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO @@ -363,7 +363,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NMDIA] = KEYMAP( +[NMDIA] = LAYOUT_ergodox( // left hand KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -408,7 +408,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[PLVR] = KEYMAP( +[PLVR] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, @@ -958,7 +958,7 @@ void matrix_scan_user(void) { } SEQ_ONE_KEY (KC_V) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")"); + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" LAYOUT_ergodox_VERSION ")"); } SEQ_ONE_KEY (KC_L) { diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/layouts/community/ergodox/algernon/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/algernon/readme.md rename to layouts/community/ergodox/algernon/readme.md diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/layouts/community/ergodox/algernon/rules.mk similarity index 57% rename from keyboards/ergodox/keymaps/algernon/Makefile rename to layouts/community/ergodox/algernon/rules.mk index 23d3bb723994..4487dd812d20 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/layouts/community/ergodox/algernon/rules.mk @@ -27,19 +27,17 @@ endif OPT_DEFS += -DUSER_PRINT -KEYMAP_VERSION = $(shell \ - if [ -d "${KEYMAP_PATH}/.git" ]; then \ - cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ +LAYOUT_ergodox_VERSION = $(shell \ + if [ -d "${LAYOUT_ergodox_PATH}/.git" ]; then \ + cd "${LAYOUT_ergodox_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ else echo QMK; fi) -KEYMAP_BRANCH = $(shell \ - if [ -d "${KEYMAP_PATH}/.git" ]; then \ - cd "${KEYMAP_PATH}"; \ +LAYOUT_ergodox_BRANCH = $(shell \ + if [ -d "${LAYOUT_ergodox_PATH}/.git" ]; then \ + cd "${LAYOUT_ergodox_PATH}"; \ fi; \ git rev-parse --abbrev-ref HEAD 2>/dev/null) -OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\" +OPT_DEFS += -DLAYOUT_ergodox_VERSION=\"$(LAYOUT_ergodox_VERSION)\\\#$(LAYOUT_ergodox_BRANCH)\" + -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/layouts/community/ergodox/algernon/tools/heatmap-layout.ADORE.json similarity index 100% rename from keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json rename to layouts/community/ergodox/algernon/tools/heatmap-layout.ADORE.json diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/layouts/community/ergodox/algernon/tools/heatmap-layout.Dvorak.json similarity index 100% rename from keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json rename to layouts/community/ergodox/algernon/tools/heatmap-layout.Dvorak.json diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/layouts/community/ergodox/algernon/tools/hid-commands old mode 100755 new mode 100644 similarity index 100% rename from keyboards/ergodox/keymaps/algernon/tools/hid-commands rename to layouts/community/ergodox/algernon/tools/hid-commands diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/layouts/community/ergodox/algernon/tools/log-to-heatmap.py old mode 100755 new mode 100644 similarity index 100% rename from keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py rename to layouts/community/ergodox/algernon/tools/log-to-heatmap.py diff --git a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py b/layouts/community/ergodox/algernon/tools/text-to-log.py old mode 100755 new mode 100644 similarity index 100% rename from keyboards/ergodox/keymaps/algernon/tools/text-to-log.py rename to layouts/community/ergodox/algernon/tools/text-to-log.py diff --git a/keyboards/ergodox/keymaps/alphadox/config.h b/layouts/community/ergodox/alphadox/config.h similarity index 83% rename from keyboards/ergodox/keymaps/alphadox/config.h rename to layouts/community/ergodox/alphadox/config.h index deb218dc0d43..6fc64f508230 100644 --- a/keyboards/ergodox/keymaps/alphadox/config.h +++ b/layouts/community/ergodox/alphadox/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #define FORCE_NKRO #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/ergodox/keymaps/alphadox/keymap.c b/layouts/community/ergodox/alphadox/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/alphadox/keymap.c rename to layouts/community/ergodox/alphadox/keymap.c index 731e62c0cd13..8acd86b7ae8d 100644 --- a/keyboards/ergodox/keymaps/alphadox/keymap.c +++ b/layouts/community/ergodox/alphadox/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -12,7 +12,7 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP, CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC) ), -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), -[ETC] = KEYMAP( +[ETC] = LAYOUT_ergodox( RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS, KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, diff --git a/keyboards/ergodox/keymaps/alphadox/Makefile b/layouts/community/ergodox/alphadox/rules.mk similarity index 93% rename from keyboards/ergodox/keymaps/alphadox/Makefile rename to layouts/community/ergodox/alphadox/rules.mk index 633499d00b6d..f93ff3bb68e7 100644 --- a/keyboards/ergodox/keymaps/alphadox/Makefile +++ b/layouts/community/ergodox/alphadox/rules.mk @@ -12,6 +12,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/andrew_osx/keymap.c b/layouts/community/ergodox/andrew_osx/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/andrew_osx/keymap.c rename to layouts/community/ergodox/andrew_osx/keymap.c index 750155d9863b..ef37fc0329bf 100644 --- a/keyboards/ergodox/keymaps/andrew_osx/keymap.c +++ b/layouts/community/ergodox/andrew_osx/keymap.c @@ -1,7 +1,7 @@ // Netable differences vs. the default firmware for the ErgoDox EZ: // 1. The Cmd key is now on the right side, making Cmd+Space easier. // 2. The media keys work on OSX (But not on Windows). -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_QUOT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_FN1, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/belak/LICENSE b/layouts/community/ergodox/belak/LICENSE similarity index 100% rename from keyboards/ergodox/keymaps/belak/LICENSE rename to layouts/community/ergodox/belak/LICENSE diff --git a/keyboards/ergodox/keymaps/belak/README.md b/layouts/community/ergodox/belak/README.md similarity index 100% rename from keyboards/ergodox/keymaps/belak/README.md rename to layouts/community/ergodox/belak/README.md diff --git a/keyboards/ergodox/keymaps/belak/keymap.c b/layouts/community/ergodox/belak/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/belak/keymap.c rename to layouts/community/ergodox/belak/keymap.c index 45f63539bb22..016cf30b4b4b 100644 --- a/keyboards/ergodox/keymaps/belak/keymap.c +++ b/layouts/community/ergodox/belak/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "eeconfig.h" @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | End | | PgDn | | | * `---------------------' `----------------------' */ - [BASE] = KEYMAP( // layer 0 : default + [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ - [SYMB] = KEYMAP( + [SYMB] = LAYOUT_ergodox( // left hand _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, E_TFLIP, _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, E_TSET, @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ - [NUMP] = KEYMAP( + [NUMP] = LAYOUT_ergodox( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -184,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), /* Keymap 3: Swap control and gui on the thumb */ - [SWPH] = KEYMAP( + [SWPH] = LAYOUT_ergodox( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/layouts/community/ergodox/belak/rules.mk b/layouts/community/ergodox/belak/rules.mk new file mode 100644 index 000000000000..cd8fdec64173 --- /dev/null +++ b/layouts/community/ergodox/belak/rules.mk @@ -0,0 +1,4 @@ +TAP_DANCE_ENABLE=yes +UNICODE_ENABLE=yes + + diff --git a/keyboards/ergodox/keymaps/belak/visualizer.c b/layouts/community/ergodox/belak/visualizer.c similarity index 100% rename from keyboards/ergodox/keymaps/belak/visualizer.c rename to layouts/community/ergodox/belak/visualizer.c diff --git a/keyboards/ergodox/keymaps/bepo/keymap.c b/layouts/community/ergodox/bepo/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/bepo/keymap.c rename to layouts/community/ergodox/bepo/keymap.c index 05250ee6a779..c33c3c255029 100644 --- a/keyboards/ergodox/keymaps/bepo/keymap.c +++ b/layouts/community/ergodox/bepo/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "keymap_bepo.h" #include "keymap_french.h" @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[BEPO] = KEYMAP( +[BEPO] = LAYOUT_ergodox( // Left hand BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, BP_PERCENT, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC, @@ -72,7 +72,7 @@ MO(FNAV), KC_RSHIFT, KC_ENTER), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[QW_B] = KEYMAP( +[QW_B] = LAYOUT_ergodox( // Left hand KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL, KC_PERCENT, KC_B, KC_E, KC_P, KC_O, KC_E, KC_BSPC, @@ -109,7 +109,7 @@ KC_TRNS, MO(QW_S), KC_ENTER), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[QW_A] = KEYMAP( +[QW_A] = LAYOUT_ergodox( // Left hand KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL, KC_PERCENT, KC_PIPE, KC_E, KC_AMPR, KC_O, KC_E, KC_BSPC, @@ -146,7 +146,7 @@ KC_TRNS, MO(QW_S), KC_ENTER), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[QW_S] = KEYMAP( +[QW_S] = LAYOUT_ergodox( // Left hand KC_HASH, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_GRV, S(KC_B), S(KC_E), S(KC_P), S(KC_O), S(KC_E), KC_TRNS, @@ -183,7 +183,7 @@ KC_TRNS, KC_TRNS, KC_TRNS), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[AZ_B] = KEYMAP( +[AZ_B] = LAYOUT_ergodox( // Left hand FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LPRN, FR_RPRN, KC_DEL, FR_PERC, KC_B, FR_EACU, KC_P, KC_O, FR_EGRV, KC_BSPC, @@ -220,7 +220,7 @@ KC_TRNS, MO(AZ_S), KC_ENTER), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[AZ_A] = KEYMAP( +[AZ_A] = LAYOUT_ergodox( // Left hand FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LBRC, FR_RBRC, KC_DEL, FR_PERC, FR_PIPE, FR_EACU, FR_AMP, KC_O, FR_EGRV, KC_BSPC, @@ -257,7 +257,7 @@ KC_TRNS, MO(AZ_S), KC_ENTER), * | | |L_FNav| |L_FNav| | | * `--------------------' `--------------------' */ -[AZ_S] = KEYMAP( +[AZ_S] = LAYOUT_ergodox( // Left hand FR_HASH, FR_1, FR_2, FR_3, FR_4, FR_5, KC_TRNS, FR_GRV, S(KC_B), S(KC_E), S(KC_P), S(KC_O), S(KC_E), KC_TRNS, @@ -294,7 +294,7 @@ KC_TRNS, KC_TRNS, KC_TRNS), * | | | | | | | | * `--------------------' `--------------------' */ -[FNAV] = KEYMAP( +[FNAV] = LAYOUT_ergodox( // Left hand KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MUTE, KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_VOLU, @@ -331,7 +331,7 @@ KC_TRNS, KC_TRNS, KC_NO), * | | | | | | | | * `--------------------' `--------------------' */ -[NUMK] = KEYMAP( +[NUMK] = LAYOUT_ergodox( // Left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/ergodox/keymaps/bepo/readme.md b/layouts/community/ergodox/bepo/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/bepo/readme.md rename to layouts/community/ergodox/bepo/readme.md diff --git a/keyboards/ergodox/keymaps/bepo/Makefile b/layouts/community/ergodox/bepo/rules.mk similarity index 80% rename from keyboards/ergodox/keymaps/bepo/Makefile rename to layouts/community/ergodox/bepo/rules.mk index b673c5ce52ce..839dd82e1e35 100644 --- a/keyboards/ergodox/keymaps/bepo/Makefile +++ b/layouts/community/ergodox/bepo/rules.mk @@ -4,6 +4,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/bepo_csa/keymap.c rename to layouts/community/ergodox/bepo_csa/keymap.c index 495242adb34f..9526ea3f77b9 100644 --- a/keyboards/ergodox/keymaps/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -1,5 +1,5 @@ /* TypeMatrix-2030-like keymap */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "action_util.h" @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[LR_BASE] = KEYMAP( // layer 0 : default +[LR_BASE] = LAYOUT_ergodox( // layer 0 : default // left hand BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /** * Same as default but for use with Canadian Multilingual on OS side */ -[LR_CSA] = KEYMAP( +[LR_CSA] = LAYOUT_ergodox( // left hand KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS, @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[LR_CSA_SFT] = KEYMAP( +[LR_CSA_SFT] = LAYOUT_ergodox( // left hand KC_HASH, M(M_1), M(M_2), M(M_3), M(M_4), M(M_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -203,7 +203,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[LR_CSA_AGR] = KEYMAP( +[LR_CSA_AGR] = LAYOUT_ergodox( // left hand MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, @@ -248,7 +248,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[LR_CSA_AGR_SFT] = KEYMAP( +[LR_CSA_AGR_SFT] = LAYOUT_ergodox( // left hand CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS, KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS, @@ -293,7 +293,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[LR_NUMR] = KEYMAP( +[LR_NUMR] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, @@ -338,7 +338,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[LR_FN] = KEYMAP( +[LR_FN] = LAYOUT_ergodox( TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, diff --git a/keyboards/ergodox/keymaps/bepo_csa/readme.md b/layouts/community/ergodox/bepo_csa/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/bepo_csa/readme.md rename to layouts/community/ergodox/bepo_csa/readme.md diff --git a/keyboards/ergodox/keymaps/bryan/keymap.c b/layouts/community/ergodox/bryan/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/bryan/keymap.c rename to layouts/community/ergodox/bryan/keymap.c index 572cea8cdad6..220ae2e80375 100644 --- a/keyboards/ergodox/keymaps/bryan/keymap.c +++ b/layouts/community/ergodox/bryan/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(2), KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/coderkun_neo2/keymap.c rename to layouts/community/ergodox/coderkun_neo2/keymap.c index 2d6f76856a4f..5b1887ec532a 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/layouts/community/ergodox/coderkun_neo2/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "led.h" #include "keymap_extras/keymap_neo2.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ HYP │ │ MEH │ │ │ * └─────┴─────┴─────┘ └─────┴─────┴─────┘ */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NEO_GRV, NEO_Y, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_HOME, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ HYP │ │ MEH │ │ │ * └─────┴─────┴─────┘ └─────┴─────┴─────┘ */ -[PMQ] = KEYMAP( +[PMQ] = LAYOUT_ergodox( // left hand KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, DE_C, DE_P, DE_T, DE_F, DE_K, DE_L, KC_HOME, @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ HYP │ │ MEH │ │ │ * └─────┴─────┴─────┘ └─────┴─────┴─────┘ */ -[PMN] = KEYMAP( +[PMN] = LAYOUT_ergodox( KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, DE_Y, DE_X, DE_V, DE_L, DE_C, DE_W, KC_HOME, KC_NO, DE_U, DE_I, DE_A, DE_E, DE_O, @@ -152,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │ │ │ │ * └─────┴─────┴─────┘ └─────┴─────┴─────┘ */ -[FMU] = KEYMAP( +[FMU] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, @@ -193,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │ │ │ │ * └─────┴─────┴─────┘ └─────┴─────┴─────┘ */ -[NHL] = KEYMAP( +[NHL] = LAYOUT_ergodox( // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP,KC_BSPC,KC_UP, KC_DELT,KC_PGDN,KC_NO, diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/readme.md b/layouts/community/ergodox/coderkun_neo2/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/coderkun_neo2/readme.md rename to layouts/community/ergodox/coderkun_neo2/readme.md diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/Makefile b/layouts/community/ergodox/coderkun_neo2/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/coderkun_neo2/Makefile rename to layouts/community/ergodox/coderkun_neo2/rules.mk diff --git a/keyboards/ergodox/keymaps/colemak/keymap.c b/layouts/community/ergodox/colemak/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/colemak/keymap.c rename to layouts/community/ergodox/colemak/keymap.c index 7ef81ab4b9ff..e9e27bcc4dfb 100644 --- a/keyboards/ergodox/keymaps/colemak/keymap.c +++ b/layouts/community/ergodox/colemak/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/colemak/readme.md b/layouts/community/ergodox/colemak/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/colemak/readme.md rename to layouts/community/ergodox/colemak/readme.md diff --git a/keyboards/ergodox/keymaps/colemak_osx_pc_no/keymap.c b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/colemak_osx_pc_no/keymap.c rename to layouts/community/ergodox/colemak_osx_pc_no/keymap.c index eb0156c45bc9..11967703730d 100644 --- a/keyboards/ergodox/keymaps/colemak_osx_pc_no/keymap.c +++ b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_norwegian.h" @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |-/Alt | | Bspc | | | * `--------------------' `---------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand NO_BSLS, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, NO_ASTR, TG(1), NO_QUES, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[BASE_MAC] = KEYMAP( +[BASE_MAC] = LAYOUT_ergodox( NO_BSLS_MAC, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NUMB_SYMB] = KEYMAP( +[NUMB_SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_PERC, KC_TRNS , KC_TRNS, KC_TRNS, KC_3 , KC_2 , KC_1 , KC_0 , KC_TRNS, @@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NUMB_SYMB_MAC] = KEYMAP( +[NUMB_SYMB_MAC] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_PERC, KC_TRNS , KC_TRNS, KC_TRNS, KC_3 , KC_2 , KC_1 , KC_0 , KC_TRNS, @@ -196,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[FUNCTION] = KEYMAP( +[FUNCTION] = LAYOUT_ergodox( KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_F3 , KC_F2 , KC_F1 , KC_TRNS , KC_TRNS, diff --git a/keyboards/ergodox/keymaps/colemak_osx_pc_no/readme.md b/layouts/community/ergodox/colemak_osx_pc_no/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/colemak_osx_pc_no/readme.md rename to layouts/community/ergodox/colemak_osx_pc_no/readme.md diff --git a/keyboards/ergodox/keymaps/colemak_programmer/keymap.c b/layouts/community/ergodox/colemak_programmer/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/colemak_programmer/keymap.c rename to layouts/community/ergodox/colemak_programmer/keymap.c index 1caccc5c29fc..46cd28dc8c82 100644 --- a/keyboards/ergodox/keymaps/colemak_programmer/keymap.c +++ b/layouts/community/ergodox/colemak_programmer/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |symbol|N-Lock| End | | PgDn | | | * `---------------------' `---------------------' */ -[0] = KEYMAP( // layer 0 : default +[0] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(3), @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `----------------------' */ -[1] = KEYMAP( // layer 1: QWERTY layer (games) +[1] = LAYOUT_ergodox( // layer 1: QWERTY layer (games) KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[2] = KEYMAP( +[2] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_PIPE, KC_PLUS, KC_LT, KC_PERC, KC_HASH, DF(1), @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // F-keys -[3] = KEYMAP( +[3] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -201,7 +201,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[4] = KEYMAP( +[4] = LAYOUT_ergodox( RESET, KC_LSFT, KC_LSFT, KC_SYSREQ, KC_PSCR, KC_SLCK, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/colemak_programmer/readme.md b/layouts/community/ergodox/colemak_programmer/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/colemak_programmer/readme.md rename to layouts/community/ergodox/colemak_programmer/readme.md diff --git a/keyboards/ergodox/keymaps/colemak_programmer/Makefile b/layouts/community/ergodox/colemak_programmer/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/colemak_programmer/Makefile rename to layouts/community/ergodox/colemak_programmer/rules.mk diff --git a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c b/layouts/community/ergodox/common_nighthawk/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/common-nighthawk/keymap.c rename to layouts/community/ergodox/common_nighthawk/keymap.c index debf384f3d0d..e113e85d1fa6 100644 --- a/keyboards/ergodox/keymaps/common-nighthawk/keymap.c +++ b/layouts/community/ergodox/common_nighthawk/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Mute | | Prev | | | * `--------------------' `----------------------' */ -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_UNDS, KC_1, KC_1, KC_UNDS, KC_ESC, ALL_T(KC_NO), KC_HOME, CTL_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_EXLM, KC_CIRC, KC_LBRC, KC_LPRN, KC_LCBR, KC_TRNS, @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, diff --git a/layouts/community/ergodox/common_nighthawk/rules.mk b/layouts/community/ergodox/common_nighthawk/rules.mk new file mode 100644 index 000000000000..180880c16576 --- /dev/null +++ b/layouts/community/ergodox/common_nighthawk/rules.mk @@ -0,0 +1,4 @@ +SUBPROJECT_DEFAULT = ez +TAP_DANCE_ENABLE = yes + + diff --git a/keyboards/ergodox/keymaps/csharp_dev/keymap.c b/layouts/community/ergodox/csharp_dev/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/csharp_dev/keymap.c rename to layouts/community/ergodox/csharp_dev/keymap.c index e0c66f487294..7996c92e083d 100644 --- a/keyboards/ergodox/keymaps/csharp_dev/keymap.c +++ b/layouts/community/ergodox/csharp_dev/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_LPRN, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_QUOTE), KC_RPRN, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPACE, @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // FKEYS + MACROS -[FKEYS] = KEYMAP( +[FKEYS] = LAYOUT_ergodox( // left hand KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_GRAVE, KC_TAB,M(MACRO_PUBLIC),M(MACRO_STATIC), M(MACRO_STRING),M(MACRO_INT),M(MACRO_RETURN),KC_TRNS, diff --git a/keyboards/ergodox/keymaps/csharp_dev/readme.md b/layouts/community/ergodox/csharp_dev/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/csharp_dev/readme.md rename to layouts/community/ergodox/csharp_dev/readme.md diff --git a/keyboards/ergodox/keymaps/dave/keymap.c b/layouts/community/ergodox/dave/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dave/keymap.c rename to layouts/community/ergodox/dave/keymap.c index 23c4e04906ba..f50be71fabb0 100644 --- a/keyboards/ergodox/keymaps/dave/keymap.c +++ b/layouts/community/ergodox/dave/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // PROGRAMMING -[PROG] = KEYMAP( +[PROG] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // NAVIGATION -[NAVI] = KEYMAP( +[NAVI] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_INS, KC_PGUP, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DELT, KC_PGDN, diff --git a/keyboards/ergodox/keymaps/dave/readme.md b/layouts/community/ergodox/dave/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dave/readme.md rename to layouts/community/ergodox/dave/readme.md diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/layouts/community/ergodox/deadcyclo/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/deadcyclo/keymap.c rename to layouts/community/ergodox/deadcyclo/keymap.c index 243ce94e9804..0ae1ef7fb2d0 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/layouts/community/ergodox/deadcyclo/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand LT(UNI,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -197,7 +197,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA , MOUSE and NAVIGATION -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6), KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -239,7 +239,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, * `--------------------' `--------------------' */ // Unicode -[UNI] = KEYMAP( +[UNI] = LAYOUT_ergodox( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), @@ -281,7 +281,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, * `--------------------' `--------------------' */ // Unicode 2 -[UNI2] = KEYMAP( +[UNI2] = LAYOUT_ergodox( KC_TRNS, UC(0x00b9), UC(0x00b2), UC(0x00b3), UC(0x2074), UC(0x2075), UC(0x2076), KC_TRNS, UC(0x2081), UC(0x2082), UC(0x2083), UC(0x2084), UC(0x2085), UC(0x2086), KC_TRNS, UC(0x215e), UC(0x215d), UC(0x215c), UC(0x215b), UC(0x215a), diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/layouts/community/ergodox/deadcyclo/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/deadcyclo/readme.md rename to layouts/community/ergodox/deadcyclo/readme.md diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/layouts/community/ergodox/deadcyclo/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/deadcyclo/Makefile rename to layouts/community/ergodox/deadcyclo/rules.mk diff --git a/keyboards/ergodox/keymaps/dragon788/keymap.c b/layouts/community/ergodox/dragon788/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dragon788/keymap.c rename to layouts/community/ergodox/dragon788/keymap.c index d33bc6a259ce..ea3fe3ee5e0e 100644 --- a/keyboards/ergodox/keymaps/dragon788/keymap.c +++ b/layouts/community/ergodox/dragon788/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, @@ -157,7 +157,7 @@ KEYMAP( * `--------------------' `--------------------' */ -[PLVR] = KEYMAP( // layout: layer 4: Steno for Plover +[PLVR] = LAYOUT_ergodox( // layout: layer 4: Steno for Plover // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, diff --git a/keyboards/ergodox/keymaps/dvorak/dvorak.png.md b/layouts/community/ergodox/dvorak/dvorak.png.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak/dvorak.png.md rename to layouts/community/ergodox/dvorak/dvorak.png.md diff --git a/keyboards/ergodox/keymaps/dvorak/keymap.c b/layouts/community/ergodox/dvorak/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dvorak/keymap.c rename to layouts/community/ergodox/dvorak/keymap.c index d3609c673ed3..ade89db96544 100644 --- a/keyboards/ergodox/keymaps/dvorak/keymap.c +++ b/layouts/community/ergodox/dvorak/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/dvorak_emacs/keymap.c b/layouts/community/ergodox/dvorak_emacs/keymap.c old mode 100755 new mode 100644 similarity index 99% rename from keyboards/ergodox/keymaps/dvorak_emacs/keymap.c rename to layouts/community/ergodox/dvorak_emacs/keymap.c index d33c6e5271e0..fc83a1d66c15 --- a/keyboards/ergodox/keymaps/dvorak_emacs/keymap.c +++ b/layouts/community/ergodox/dvorak_emacs/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `----------------------' * */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TILD, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRACKET, @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | TRANS| | TRANS| | | * `--------------------' `--------------------' */ -[AUX] = KEYMAP( +[AUX] = LAYOUT_ergodox( // left hand KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, diff --git a/keyboards/ergodox/keymaps/dvorak_emacs/readme.md b/layouts/community/ergodox/dvorak_emacs/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_emacs/readme.md rename to layouts/community/ergodox/dvorak_emacs/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c b/layouts/community/ergodox/dvorak_emacs_software/keymap.c old mode 100755 new mode 100644 similarity index 99% rename from keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c rename to layouts/community/ergodox/dvorak_emacs_software/keymap.c index a2bc15c991d4..1f5681f66a37 --- a/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c +++ b/layouts/community/ergodox/dvorak_emacs_software/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "keymap_dvorak.h" #include "debug.h" #include "action_layer.h" @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `----------------------' * */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TILD, DV_QUOT, DV_COMM,DV_DOT, DV_P, DV_Y, DV_LBRC, @@ -96,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | TRANS| | TRANS| | | * `--------------------' `--------------------' */ -[AUX] = KEYMAP( +[AUX] = LAYOUT_ergodox( // left hand KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO, diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md b/layouts/community/ergodox/dvorak_emacs_software/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md rename to layouts/community/ergodox/dvorak_emacs_software/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_intl_squisher/keymap.c b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dvorak_intl_squisher/keymap.c rename to layouts/community/ergodox/dvorak_intl_squisher/keymap.c index 89eae52080b5..e1ed56f8491f 100644 --- a/keyboards/ergodox/keymaps/dvorak_intl_squisher/keymap.c +++ b/layouts/community/ergodox/dvorak_intl_squisher/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_WBAK, KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_DELT, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( // layer 0 : default +LAYOUT_ergodox( // layer 0 : default // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/dvorak_intl_squisher/readme.md b/layouts/community/ergodox/dvorak_intl_squisher/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_intl_squisher/readme.md rename to layouts/community/ergodox/dvorak_intl_squisher/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_plover/README.md b/layouts/community/ergodox/dvorak_plover/README.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_plover/README.md rename to layouts/community/ergodox/dvorak_plover/README.md diff --git a/keyboards/ergodox/keymaps/dvorak_plover/keymap.c b/layouts/community/ergodox/dvorak_plover/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dvorak_plover/keymap.c rename to layouts/community/ergodox/dvorak_plover/keymap.c index d0505609d7b0..4d11224731e1 100644 --- a/keyboards/ergodox/keymaps/dvorak_plover/keymap.c +++ b/layouts/community/ergodox/dvorak_plover/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(SYMB), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[PLVR] = KEYMAP( // layout: layer 2: Steno for Plover +[PLVR] = LAYOUT_ergodox( // layout: layer 2: Steno for Plover // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, @@ -156,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ace| | End | | PgDn | | | * `--------------------' `----------------------' */ -[QWRT] = KEYMAP( // layer 3: qwerty for gaming +[QWRT] = LAYOUT_ergodox( // layer 3: qwerty for gaming // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/layouts/community/ergodox/dvorak_programmer/README.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_programmer/README.md rename to layouts/community/ergodox/dvorak_programmer/README.md diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/layouts/community/ergodox/dvorak_programmer/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/dvorak_programmer/keymap.c rename to layouts/community/ergodox/dvorak_programmer/keymap.c index d299d02c34a6..33115d21f3ea 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer/keymap.c @@ -1,5 +1,5 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "led.h" #include "debug.h" #include "action_layer.h" @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // base layer -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // shell navigation layer -[SHELL_NAV] = KEYMAP( +[SHELL_NAV] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // key navigation layer -[KEY_NAV] = KEYMAP( +[KEY_NAV] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // key selection layer -[KEY_SEL] = KEYMAP( +[KEY_SEL] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // number layer -[NUMBER] = KEYMAP( +[NUMBER] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -172,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -[SYMBOL] = KEYMAP( +[SYMBOL] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -193,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), -[BRACKETS] = KEYMAP( +[BRACKETS] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS, @@ -214,7 +214,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), -[SHORTCUTS] = KEYMAP( +[SHORTCUTS] = LAYOUT_ergodox( // left hand KC_NO, MEH(KC_F1), MEH(KC_F2), MEH(KC_F3), MEH(KC_F4), MEH(KC_F5), MEH(KC_F6), KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -236,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -[MOUSE] = KEYMAP( +[MOUSE] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile b/layouts/community/ergodox/dvorak_programmer/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_programmer/Makefile rename to layouts/community/ergodox/dvorak_programmer/rules.mk diff --git a/keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c rename to layouts/community/ergodox/dvorak_programmer_swe/keymap.c index 8d65f7c7a575..9c66baceb239 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB), @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS, @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -182,7 +182,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[DEVL] = KEYMAP( +[DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md rename to layouts/community/ergodox/dvorak_programmer_swe/readme.md diff --git a/keyboards/ergodox/keymaps/dvorak_spanish/keymap.c b/layouts/community/ergodox/dvorak_spanish/keymap.c old mode 100755 new mode 100644 similarity index 99% rename from keyboards/ergodox/keymaps/dvorak_spanish/keymap.c rename to layouts/community/ergodox/dvorak_spanish/keymap.c index 6d7adf90736a..19dfb27f57f3 --- a/keyboards/ergodox/keymaps/dvorak_spanish/keymap.c +++ b/layouts/community/ergodox/dvorak_spanish/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * SA = SHIFT-ALT * */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NONUS_BSLASH, LT(AUX, KC_F1), KC_DOT, KC_COMM,KC_SCLN,KC_P, KC_Y, MEH_T(KC_DEL), @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | L2 | | VolDn| | | * `--------------------' `--------------------' */ -[AUX] = KEYMAP( +[AUX] = LAYOUT_ergodox( // left hand KC_NO , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_SLEP, KC_TRNS, KC_NONUS_BSLASH, LSFT(KC_NONUS_BSLASH), KC_MS_U, KC_NO, KC_NO, KC_NO, @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * SA = SHIFT-ALT * */ -[QWERTY] = KEYMAP( +[QWERTY] = LAYOUT_ergodox( // left hand KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NONUS_BSLASH, KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_DEL), diff --git a/keyboards/ergodox/keymaps/dvorak_spanish/readme.md b/layouts/community/ergodox/dvorak_spanish/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/dvorak_spanish/readme.md rename to layouts/community/ergodox/dvorak_spanish/readme.md diff --git a/keyboards/ergodox/keymaps/emacs_osx_dk/keymap.c b/layouts/community/ergodox/emacs_osx_dk/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/emacs_osx_dk/keymap.c rename to layouts/community/ergodox/emacs_osx_dk/keymap.c index e80f08d7367c..3fa14a5644a0 100644 --- a/keyboards/ergodox/keymaps/emacs_osx_dk/keymap.c +++ b/layouts/community/ergodox/emacs_osx_dk/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/emacs_osx_dk/readme.md b/layouts/community/ergodox/emacs_osx_dk/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/emacs_osx_dk/readme.md rename to layouts/community/ergodox/emacs_osx_dk/readme.md diff --git a/keyboards/ergodox/keymaps/erez_experimental/config.h b/layouts/community/ergodox/erez_experimental/config.h similarity index 84% rename from keyboards/ergodox/keymaps/erez_experimental/config.h rename to layouts/community/ergodox/erez_experimental/config.h index 4da18c65aab5..4b9c29c94e90 100644 --- a/keyboards/ergodox/keymaps/erez_experimental/config.h +++ b/layouts/community/ergodox/erez_experimental/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #define ONESHOT_TAP_TOGGLE 2 #define ONESHOT_TIMEOUT 300 diff --git a/keyboards/ergodox/keymaps/erez_experimental/keymap.c b/layouts/community/ergodox/erez_experimental/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/erez_experimental/keymap.c rename to layouts/community/ergodox/erez_experimental/keymap.c index 13b8240ce824..481f984d5d10 100644 --- a/keyboards/ergodox/keymaps/erez_experimental/keymap.c +++ b/layouts/community/ergodox/erez_experimental/keymap.c @@ -1,5 +1,5 @@ #include -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS), KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/erez_experimental/readme.md b/layouts/community/ergodox/erez_experimental/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/erez_experimental/readme.md rename to layouts/community/ergodox/erez_experimental/readme.md diff --git a/keyboards/ergodox/keymaps/erez_experimental/Makefile b/layouts/community/ergodox/erez_experimental/rules.mk similarity index 80% rename from keyboards/ergodox/keymaps/erez_experimental/Makefile rename to layouts/community/ergodox/erez_experimental/rules.mk index b673c5ce52ce..839dd82e1e35 100644 --- a/keyboards/ergodox/keymaps/erez_experimental/Makefile +++ b/layouts/community/ergodox/erez_experimental/rules.mk @@ -4,6 +4,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/familiar/README.md b/layouts/community/ergodox/familiar/README.md similarity index 100% rename from keyboards/ergodox/keymaps/familiar/README.md rename to layouts/community/ergodox/familiar/README.md diff --git a/keyboards/ergodox/keymaps/familiar/keymap.c b/layouts/community/ergodox/familiar/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/familiar/keymap.c rename to layouts/community/ergodox/familiar/keymap.c index c0334615b2c9..bc513c0cc43c 100644 --- a/keyboards/ergodox/keymaps/familiar/keymap.c +++ b/layouts/community/ergodox/familiar/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | TO(1)| |TO(3) | | | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand _______, UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC), _______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______, @@ -142,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[CSYM] = KEYMAP( +[CSYM] = LAYOUT_ergodox( // left hand _______, UC(0x00B9), _______, _______, UC(0x00A3), _______, _______, _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______, @@ -184,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NUMP] = KEYMAP( +[NUMP] = LAYOUT_ergodox( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -227,7 +227,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[ARRW] = KEYMAP( +[ARRW] = LAYOUT_ergodox( // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_UP, _______, _______, _______, diff --git a/keyboards/ergodox/keymaps/familiar/Makefile b/layouts/community/ergodox/familiar/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/familiar/Makefile rename to layouts/community/ergodox/familiar/rules.mk diff --git a/layouts/community/ergodox/french_hacker/keymap.c b/layouts/community/ergodox/french_hacker/keymap.c new file mode 100644 index 000000000000..30bf56608d5b --- /dev/null +++ b/layouts/community/ergodox/french_hacker/keymap.c @@ -0,0 +1,365 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "keymap_french.h" + +#define BASE 0 // default Colemak Mod-DH layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define ACC 3 // accented characters + +#define QCOPY 0 // Qubes OS VM to VM copy +#define QPASTE 1 // Qubes OS VM to VM paste +#define M_ACIRC 2 // â +#define M_ECIRC 3 // ê +#define M_ICIRC 4 // î +#define M_OCIRC 5 // ô +#define M_UCIRC 6 // û +#define M_YCIRC 7 // ŷ +#define M_AUMLT 8 // ä +#define M_EUMLT 9 // ë +#define M_IUMLT 10 // ï +#define M_OUMLT 11 // ö +#define M_UUMLT 12 // ü +#define M_YUMLT 13 // ÿ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base Colemak Mod-DH layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | F | P | B | TO(0)| |TO(2) | J | L | U | Y | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | Bcksp | + * |--------+------+------+------+------+------| TO(1)| |OSL(3)|------+------+------+------+------+--------| + * | LShift | Z | X | C | D | V | | | | K | H | , | . | : | Rshift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ins | Caps | Left | Right| MO(2)| | MO(2)| Down | Up | PgDn | PgUp | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |QCopy | Ralt | | Ralt |QPaste| + * ,------|------|------| |------+------+------. + * | | | Home | | End | | | + * | Space| Ctrl |------| |------| Ctrl |Enter | + * | | | LAlt | | LAlt | | | + * `--------------------' `--------------------' + */ + // If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TRNS, FR_Q, FR_W, KC_F, KC_P, KC_B, TO(BASE), + KC_TAB, FR_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT, FR_Z, KC_X, KC_C, KC_D, KC_V, TO(SYMB), + KC_INS, KC_CAPS, KC_LEFT,KC_RIGHT, MO(SYMB), + M(QCOPY), KC_RALT, + KC_HOME, + KC_SPC,KC_LCTRL, KC_LALT, + // right hand + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + TO(MDIA), KC_J, KC_L, KC_U, KC_Y, FR_SCLN, KC_TRNS, + FR_M, KC_N, KC_E, KC_I, KC_O, KC_BSPC, + OSL(ACC), KC_K, KC_H, FR_COMM, FR_DOT, FR_COLN, KC_RSFT, + MO(SYMB), KC_DOWN, KC_UP, KC_PGDN, KC_PGUP, + + KC_RALT, M(QPASTE), + KC_END, + KC_LALT,KC_RCTL, KC_ENT + ), + + +/* Keymap 1: Symbol Layer + * // TODO missing: ¤ + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | § | < | { | \ | ~ | | | | % | @ | } | > | µ | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ' | = | - | ( | + |------| |------| * | ) | _ | / | " | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ` | ? | # | [ | | | | | | & | ] | $ | ! | ^ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | € | £ | $ | | | | | | | ß | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,FR_SECT,FR_LESS, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS, + KC_TRNS,FR_APOS,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS, + KC_TRNS,FR_GRV,FR_QUES,FR_HASH,FR_LBRC,FR_PIPE,KC_TRNS, + FR_EURO,FR_PND,FR_DLR,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_GRTR, FR_MU, KC_F12, + FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_QUOT, KC_TRNS, + KC_TRNS, FR_AMP, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_S), KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), + +/* Keymap 3: accented characters + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | à | â | ä | | | | | | | î | ï | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | é | è | ê | ë | |------| |------| | | ô | ö | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | ù | û | ü | | | | | | | ŷ | ÿ | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// ACCENTED CHARACTERS +[ACC] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, FR_AGRV, M(M_ACIRC), M(M_AUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, FR_EACU, FR_EGRV, M(M_ECIRC), M(M_EUMLT), KC_TRNS, + KC_TRNS, KC_TRNS, FR_UGRV, M(M_UCIRC), M(M_UUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M(M_ICIRC), M(M_IUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, M(M_OCIRC), M(M_OUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M(M_YCIRC), M(M_YUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case QCOPY: + if (record->event.pressed) { + return MACRO(I(255), + D(LCTRL), + T(C), + D(LSFT), + T(C), + U(LCTRL), + U(LSFT), + END); + } + break; + case QPASTE: + if (record->event.pressed) { + return MACRO(I(255), + D(LCTRL), + D(LSFT), + T(V), + U(LCTRL), + T(INS), + U(LSFT), + END); + } + break; + case M_ACIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(Q), // FR_A + END); + } + break; + case M_ECIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(E), + END); + } + break; + case M_UCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(U), + END); + } + break; + case M_ICIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(I), + END); + } + break; + case M_OCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(O), + END); + } + break; + case M_YCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(Y), + END); + } + break; + case M_AUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(Q), + END); + } + break; + case M_EUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(E), + END); + } + break; + case M_UUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(U), + END); + } + break; + case M_IUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(I), + END); + } + break; + case M_OUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(O), + END); + } + break; + case M_YUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(Y), + END); + } + break; + + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case SYMB: + ergodox_right_led_1_on(); + break; + case MDIA: + ergodox_right_led_2_on(); + break; + case ACC: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/layouts/community/ergodox/french_hacker/readme.md b/layouts/community/ergodox/french_hacker/readme.md new file mode 100644 index 000000000000..6b0575af1364 --- /dev/null +++ b/layouts/community/ergodox/french_hacker/readme.md @@ -0,0 +1,30 @@ +# French hacker layout + +## Introduction + +[Colemak Mod-DH](https://colemakmods.github.io/mod-dh/) layout for +users keeping an `azerty` layout configuration on their OS. + +This keymap is for users keeping their operating systems configured with +`azerty` - for typing passwords or in their native languages - but who +wants a Colemak Mod-DH layout on their mechanical. + +The symbols layers was done after analysing various programming +languages sources codes and should be close to optimal for typing +confort. + +Special macros for [Qubes OS](https://www.qubes-os.org/) are included. + +There is an accented characters layer for infrequent typing of french +accents. + +Special macros for [Qubes OS](https://www.qubes-os.org/) are included. + +## Build + + cd keyboards/ergodox + make french_hacker + +## Design explanations + +See my [blog post](http://dialectical-computing.de/blog/blog/2017/01/29/a-better-coder-layout-for-the-ergodox-ez-keyboard/). diff --git a/keyboards/ergodox/keymaps/galson/keymap.c b/layouts/community/ergodox/galson/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/galson/keymap.c rename to layouts/community/ergodox/galson/keymap.c index 0d3e7560dddd..e34500551805 100644 --- a/keyboards/ergodox/keymaps/galson/keymap.c +++ b/layouts/community/ergodox/galson/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_PLUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2, KC_EQL, KC_Q, KC_W, KC_E, KC_R, GUI_T(KC_T), KC_LSPO, @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/galson/readme.md b/layouts/community/ergodox/galson/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/galson/readme.md rename to layouts/community/ergodox/galson/readme.md diff --git a/keyboards/ergodox/keymaps/galson/Makefile b/layouts/community/ergodox/galson/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/galson/Makefile rename to layouts/community/ergodox/galson/rules.mk diff --git a/keyboards/ergodox/keymaps/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/german-kinergo/keymap.c rename to layouts/community/ergodox/german-kinergo/keymap.c index 971318d87bf7..d8da953e0e90 100644 --- a/keyboards/ergodox/keymaps/german-kinergo/keymap.c +++ b/layouts/community/ergodox/german-kinergo/keymap.c @@ -1,7 +1,7 @@ // German keymap derived from "german", but more closely resembling the German layout of the Kinesis Ergo Elan. // // chschmitz, 2016-01-27 -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_german.h" @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, DE_ACUT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1), @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_PGDN, KC_ENT, KC_SPC ), -// [BASE] = KEYMAP( // layer 0 : default +// [BASE] = LAYOUT_ergodox( // layer 0 : default // // left hand // KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, // KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/layouts/community/ergodox/german-kinergo/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/german-kinergo/readme.md rename to layouts/community/ergodox/german-kinergo/readme.md diff --git a/keyboards/ergodox/keymaps/german-lukas/README.md b/layouts/community/ergodox/german-lukas/README.md similarity index 100% rename from keyboards/ergodox/keymaps/german-lukas/README.md rename to layouts/community/ergodox/german-lukas/README.md diff --git a/keyboards/ergodox/keymaps/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/german-lukas/keymap.c rename to layouts/community/ergodox/german-lukas/keymap.c index c6e9f2f900b0..2ad909b6c83f 100644 --- a/keyboards/ergodox/keymaps/german-lukas/keymap.c +++ b/layouts/community/ergodox/german-lukas/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_german.h" @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, DE_ACUT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // Shortcuts -[SHRT] = KEYMAP( +[SHRT] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), KC_TRNS, diff --git a/keyboards/ergodox/keymaps/german-manuneo/compile_keymap.py b/layouts/community/ergodox/german-manuneo/compile_keymap.py similarity index 99% rename from keyboards/ergodox/keymaps/german-manuneo/compile_keymap.py rename to layouts/community/ergodox/german-manuneo/compile_keymap.py index 7076a6ecb2e0..44f31b1c6e69 100644 --- a/keyboards/ergodox/keymaps/german-manuneo/compile_keymap.py +++ b/layouts/community/ergodox/german-manuneo/compile_keymap.py @@ -30,7 +30,7 @@ KEYBOARD_LAYOUTS = { # These map positions in the parsed layout to - # positions in the KEYMAP MATRIX + # positions in the LAYOUT_ergodox MATRIX 'ergodox_ez': [ [ 0, 1, 2, 3, 4, 5, 6], [38, 39, 40, 41, 42, 43, 44], [ 7, 8, 9, 10, 11, 12, 13], [45, 46, 47, 48, 49, 50, 51], @@ -664,7 +664,7 @@ def iter_keymap_parts(config, keymaps): keymap = keymaps[layer_name] row_indents = ROW_INDENTS.get(config['layout']) keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) - yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) + yield "[L{0}] = LAYOUT_ergodox({1}\n),\n".format(i, keymap_lines) yield "};\n\n" diff --git a/keyboards/ergodox/keymaps/german-manuneo/keymap.c b/layouts/community/ergodox/german-manuneo/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/german-manuneo/keymap.c rename to layouts/community/ergodox/german-manuneo/keymap.c index 16e92bc23bc0..71988b7dda5e 100644 --- a/keyboards/ergodox/keymaps/german-manuneo/keymap.c +++ b/layouts/community/ergodox/german-manuneo/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "keymap.h" #include "keymap_german.h" @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |BSPC |LSFT | ESC | ! PGDN|ENTER|SPACE| * '-----------------' '-----------------' */ -[L0] = KEYMAP( +[L0] = LAYOUT_ergodox( MO(5), DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, MO(4), DE_X, DE_P, DE_F, DE_W, DE_G, KC_HOME, MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, @@ -166,7 +166,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L1] = KEYMAP( +[L1] = LAYOUT_ergodox( KC_TRNS, DE_EXLM, DE_DQOT, DE_PARA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_ASTR, DE_PIPE, DE_SLSH, DE_LCBR, DE_RCBR, KC_TRNS, KC_TRNS, DE_UNDS, DE_MINS, DE_AMPR, DE_LBRC, DE_RBRC, @@ -204,7 +204,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L2] = KEYMAP( +[L2] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -242,7 +242,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L3] = KEYMAP( +[L3] = LAYOUT_ergodox( KC_TRNS, M(UC_SUPERSCRIPT_ONE), M(UC_SUPERSCRIPT_TWO), M(UC_SUPERSCRIPT_THREE), M(UC_SUPERSCRIPT_FOUR), M(UC_SUPERSCRIPT_FIVE), M(UC_FOR_ALL), KC_TRNS, M(UC_MULTIPLICATION_SIGN), M(UC_VULGAR_FRACTION_ONE_HALF), M(UC_DIVISION_SIGN), M(UC_VULGAR_FRACTION_ONE_QUARTER), M(UC_VULGAR_FRACTION_ONE_FIFTH), KC_TRNS, KC_TRNS, KC_TRNS, M(UC_PLUS_MINUS_SIGN), DE_AT, DE_EURO, M(UC_EMPTY_SET), @@ -280,7 +280,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L4] = KEYMAP( +[L4] = LAYOUT_ergodox( KC_TRNS, M(UC_SUBSCRIPT_ONE), M(UC_SUBSCRIPT_TWO), M(UC_SUBSCRIPT_THREE), M(UC_SUBSCRIPT_FOUR), M(UC_SUBSCRIPT_FIVE), KC_TRNS, KC_TRNS, M(UC_GREEK_SMALL_LETTER_CHI), M(UC_GREEK_SMALL_LETTER_PI), M(UC_GREEK_SMALL_LETTER_PHI), M(UC_GREEK_SMALL_LETTER_OMEGA), M(UC_GREEK_SMALL_LETTER_GAMMA), KC_TRNS, KC_TRNS, M(UC_GREEK_SMALL_LETTER_UPSILON), M(UC_GREEK_SMALL_LETTER_IOTA), M(UC_GREEK_SMALL_LETTER_ALPHA), M(UC_GREEK_SMALL_LETTER_EPSILON), M(UC_GREEK_SMALL_LETTER_OMICRON), @@ -318,7 +318,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L5] = KEYMAP( +[L5] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(UC_GREEK_CAPITAL_LETTER_CHI), M(UC_GREEK_CAPITAL_LETTER_PI), M(UC_GREEK_CAPITAL_LETTER_PHI), M(UC_GREEK_CAPITAL_LETTER_OMEGA), M(UC_GREEK_CAPITAL_LETTER_GAMMA), KC_TRNS, KC_TRNS, M(UC_GREEK_CAPITAL_LETTER_UPSILON), M(UC_GREEK_CAPITAL_LETTER_IOTA), M(UC_GREEK_CAPITAL_LETTER_ALPHA), M(UC_GREEK_CAPITAL_LETTER_EPSILON), M(UC_GREEK_CAPITAL_LETTER_OMICRON), @@ -356,7 +356,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L6] = KEYMAP( +[L6] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/german-manuneo/keymap.md b/layouts/community/ergodox/german-manuneo/keymap.md similarity index 99% rename from keyboards/ergodox/keymaps/german-manuneo/keymap.md rename to layouts/community/ergodox/german-manuneo/keymap.md index 837b25446292..c59f16a00cf1 100644 --- a/keyboards/ergodox/keymaps/german-manuneo/keymap.md +++ b/layouts/community/ergodox/german-manuneo/keymap.md @@ -12,7 +12,7 @@ Tested with python 2.7 and python 3.4 { "layout": "ergodox_ez", "keymaps_includes": [ - "ergodox.h", + QMK_KEYBOARD_H, "action_layer.h", "keymap_common.h", "keymap_extras/keymap_german.h", diff --git a/keyboards/ergodox/keymaps/german/keymap.c b/layouts/community/ergodox/german/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/german/keymap.c rename to layouts/community/ergodox/german/keymap.c index 9b2f6ffa2df4..67d01fd337a4 100644 --- a/keyboards/ergodox/keymaps/german/keymap.c +++ b/layouts/community/ergodox/german/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_german.h" @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS, @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, diff --git a/keyboards/ergodox/keymaps/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c similarity index 96% rename from keyboards/ergodox/keymaps/guni/keymap.c rename to layouts/community/ergodox/guni/keymap.c index 9d9191f627ea..9a00f0a979b9 100644 --- a/keyboards/ergodox/keymaps/guni/keymap.c +++ b/layouts/community/ergodox/guni/keymap.c @@ -1,10 +1,10 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "bootloader.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( // layer 0 : default + LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_FN29,KC_ENT ,KC_SPC ), - KEYMAP( // layer 1 : function and symbol keys + LAYOUT_ergodox( // layer 1 : function and symbol keys // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS ), - KEYMAP( // layer 2: navigation + LAYOUT_ergodox( // layer 2: navigation // left hand KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - KEYMAP( // layer 3 : teensy bootloader functions + LAYOUT_ergodox( // layer 3 : teensy bootloader functions // left hand KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - KEYMAP( // layer 4: numpad + LAYOUT_ergodox( // layer 4: numpad // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, diff --git a/keyboards/ergodox/keymaps/guni/readme.txt b/layouts/community/ergodox/guni/readme.txt similarity index 96% rename from keyboards/ergodox/keymaps/guni/readme.txt rename to layouts/community/ergodox/guni/readme.txt index 93ae5f056739..679a08e31d30 100644 --- a/keyboards/ergodox/keymaps/guni/readme.txt +++ b/layouts/community/ergodox/guni/readme.txt @@ -23,7 +23,7 @@ xkbcomp $DISPLAY $HOME/.xkbmap * automatic startup each time you startup x echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc - KEYMAP( // layer 0 : default + LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL , KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_FN25 , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, @@ -44,7 +44,7 @@ echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc KC_FN29,KC_ENT ,KC_SPC ), - KEYMAP( // layer 1 : function and symbol keys + LAYOUT_ergodox( // layer 1 : function and symbol keys // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_TRNS,KC_AT,KC_UNDS ,KC_LBRC,KC_RBRC,KC_CIRC ,KC_TRNS, @@ -65,7 +65,7 @@ echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc KC_TRNS,KC_TRNS,KC_TRNS ), - KEYMAP( // layer 2: navigation + LAYOUT_ergodox( // layer 2: navigation // left hand KC_NO,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_PGUP,KC_HOME,KC_UP ,KC_END,KC_NO ,KC_TRNS, @@ -85,7 +85,7 @@ echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), - KEYMAP( // layer 3 : teensy bootloader functions + LAYOUT_ergodox( // layer 3 : teensy bootloader functions // left hand KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -107,7 +107,7 @@ echo 'xkbcomp $HOME/.xkbmap $DISPLAY' >> ~/.xinitrc ), - KEYMAP( // layer 4: numpad + LAYOUT_ergodox( // layer 4: numpad // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c b/layouts/community/ergodox/ishigoya-jp/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/ishigoya-jp/keymap.c rename to layouts/community/ergodox/ishigoya-jp/keymap.c index c219ce884050..43bc74a0e1f5 100644 --- a/keyboards/ergodox/keymaps/ishigoya-jp/keymap.c +++ b/layouts/community/ergodox/ishigoya-jp/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_jp.h" @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand M(TOJPLOUT), KC_NO, KC_EQL, LSFT(KC_5), KC_NO, KC_NO, LCTL(KC_A), KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, M(CUTCOPY), @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * */ -[JP] = KEYMAP( +[JP] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(JPNU), M(JPKO), M(JPSA), M(JPHE), M(JPKE), KC_TRNS, KC_TRNS, M(JPTO), M(JPSHI), M(JPKA), M(JPKI), M(JPSU), @@ -222,7 +222,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * */ -[JPXON] = KEYMAP( +[JPXON] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(JPXE), KC_NO, M(JPXKE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(JPXKA), KC_NO, KC_NO, @@ -265,7 +265,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * */ -[JPKAZARI] = KEYMAP( +[JPKAZARI] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(JPGO), M(JPZA), M(JPBE), M(JPGE), KC_NO, KC_NO, M(JPDO), M(JPJI), M(JPGA), M(JPGI), M(JPZU), @@ -308,7 +308,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * */ -[JPTOPROW] = KEYMAP( +[JPTOPROW] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_E, KC_MINS, M(JPRE), KC_NO, KC_NO, KC_NO, M(JPRA), M(JPRI), M(JPNA), M(JPNO), M(JPMI), @@ -352,7 +352,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * */ -[JPTRKZ] = KEYMAP( +[JPTRKZ] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(JPPE),KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -393,7 +393,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // Numbers -[NUM] = KEYMAP( +[NUM] = LAYOUT_ergodox( // left hand KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_NO, KC_NO, JP_DQT, KC_RBRACKET, KC_BSPC, KC_SCLN, diff --git a/keyboards/ergodox/keymaps/ishigoya-jp/readme.md b/layouts/community/ergodox/ishigoya-jp/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/ishigoya-jp/readme.md rename to layouts/community/ergodox/ishigoya-jp/readme.md diff --git a/keyboards/ergodox/keymaps/italian/keymap.c b/layouts/community/ergodox/italian/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/italian/keymap.c rename to layouts/community/ergodox/italian/keymap.c index e4c7a569cbb0..366f4c9b9863 100644 --- a/keyboards/ergodox/keymaps/italian/keymap.c +++ b/layouts/community/ergodox/italian/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TT(SYMB), @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/layouts/community/ergodox/italian/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/italian/readme.md rename to layouts/community/ergodox/italian/readme.md diff --git a/keyboards/ergodox/keymaps/j3rn/keymap.c b/layouts/community/ergodox/j3rn/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/j3rn/keymap.c rename to layouts/community/ergodox/j3rn/keymap.c index 2069f26ae555..443d8394967f 100644 --- a/keyboards/ergodox/keymaps/j3rn/keymap.c +++ b/layouts/community/ergodox/j3rn/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/j3rn/readme.md b/layouts/community/ergodox/j3rn/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/j3rn/readme.md rename to layouts/community/ergodox/j3rn/readme.md diff --git a/keyboards/ergodox/keymaps/jack/config.h b/layouts/community/ergodox/jack/config.h similarity index 88% rename from keyboards/ergodox/keymaps/jack/config.h rename to layouts/community/ergodox/jack/config.h index 5c11652264a9..04bbed611a64 100644 --- a/keyboards/ergodox/keymaps/jack/config.h +++ b/layouts/community/ergodox/jack/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H /* ws2812 RGB LED */ #define RGB_DI_PIN D7 diff --git a/keyboards/ergodox/keymaps/jack/keymap.c b/layouts/community/ergodox/jack/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/jack/keymap.c rename to layouts/community/ergodox/jack/keymap.c index 9cb80c59d12f..6a00ffa29334 100644 --- a/keyboards/ergodox/keymaps/jack/keymap.c +++ b/layouts/community/ergodox/jack/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -8,7 +8,7 @@ #define MDIA 2 // media keys const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_MOD, M(2), KC_SPC,KC_SPC ), -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, diff --git a/keyboards/ergodox/keymaps/jacobono/keymap.c b/layouts/community/ergodox/jacobono/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/jacobono/keymap.c rename to layouts/community/ergodox/jacobono/keymap.c index dc7382bfe86a..c0a1c0cdb885 100644 --- a/keyboards/ergodox/keymaps/jacobono/keymap.c +++ b/layouts/community/ergodox/jacobono/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* - [COLEMAK] = KEYMAP( // layer 0 : Colemak layout default layer + [COLEMAK] = LAYOUT_ergodox( // layer 0 : Colemak layout default layer // left hand KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_TRNS, @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* - [QWERTY] = KEYMAP( // layer 1 + [QWERTY] = LAYOUT_ergodox( // layer 1 // left hand KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOL - [SYMB] = KEYMAP( + [SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_AT, KC_ASTR, KC_EQL, KC_UNDS, KC_TRNS, @@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // Numpad - [NUMPAD] = KEYMAP( + [NUMPAD] = LAYOUT_ergodox( // left hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS, @@ -204,7 +204,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE - KEYMAP( + LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/jacobono/readme.md b/layouts/community/ergodox/jacobono/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/jacobono/readme.md rename to layouts/community/ergodox/jacobono/readme.md diff --git a/keyboards/ergodox/keymaps/jafo/jafo-Notes b/layouts/community/ergodox/jafo/jafo-Notes similarity index 90% rename from keyboards/ergodox/keymaps/jafo/jafo-Notes rename to layouts/community/ergodox/jafo/jafo-Notes index 9376125e90dd..33a67d40d158 100644 --- a/keyboards/ergodox/keymaps/jafo/jafo-Notes +++ b/layouts/community/ergodox/jafo/jafo-Notes @@ -2,7 +2,7 @@ These are notes on how to build and deploy the firmware to Ez, but they are from before the qmk restructuring. cd qmk_firmware/keyboard/ergodox_ez -make KEYMAP=jafo +make LAYOUT_ergodox=jafo cp ergodox_ez.hex keymaps/jafo/ /tmp/teensy.64bit Open hex keymap file diff --git a/keyboards/ergodox/keymaps/jafo/jafo-layout.pdf b/layouts/community/ergodox/jafo/jafo-layout.pdf similarity index 100% rename from keyboards/ergodox/keymaps/jafo/jafo-layout.pdf rename to layouts/community/ergodox/jafo/jafo-layout.pdf diff --git a/keyboards/ergodox/keymaps/jafo/keymap.c b/layouts/community/ergodox/jafo/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/jafo/keymap.c rename to layouts/community/ergodox/jafo/keymap.c index 4f1428f2ba60..081f18894fbc 100644 --- a/keyboards/ergodox/keymaps/jafo/keymap.c +++ b/layouts/community/ergodox/jafo/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/jafo/readme.md b/layouts/community/ergodox/jafo/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/jafo/readme.md rename to layouts/community/ergodox/jafo/readme.md diff --git a/keyboards/ergodox/keymaps/jgarr/keymap.c b/layouts/community/ergodox/jgarr/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/jgarr/keymap.c rename to layouts/community/ergodox/jgarr/keymap.c index 42d58421decf..359b2e1acf03 100644 --- a/keyboards/ergodox/keymaps/jgarr/keymap.c +++ b/layouts/community/ergodox/jgarr/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(1), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/josh/keymap.c b/layouts/community/ergodox/josh/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/josh/keymap.c rename to layouts/community/ergodox/josh/keymap.c index da887fc64f3b..5121fabdb002 100644 --- a/keyboards/ergodox/keymaps/josh/keymap.c +++ b/layouts/community/ergodox/josh/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand LT(MDIA, KC_EQL),KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, ALT_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, ALL_T(KC_NO), @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/josh/readme.md b/layouts/community/ergodox/josh/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/josh/readme.md rename to layouts/community/ergodox/josh/readme.md diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/layouts/community/ergodox/kastyle/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/kastyle/keymap.c rename to layouts/community/ergodox/kastyle/keymap.c index 467996686977..923715477bbf 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/layouts/community/ergodox/kastyle/keymap.c @@ -1,7 +1,7 @@ /* Setup to approximate a Kinesis Advantage with an eye to use in a * Mac/OSX environment * This version adds a hand swap feature to flip the keyboard */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/kastyle/readme.md b/layouts/community/ergodox/kastyle/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/kastyle/readme.md rename to layouts/community/ergodox/kastyle/readme.md diff --git a/keyboards/ergodox/keymaps/kines-ish/keymap.c b/layouts/community/ergodox/kines-ish/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/kines-ish/keymap.c rename to layouts/community/ergodox/kines-ish/keymap.c index 83f5b0e2b4ac..da39b5278b11 100644 --- a/keyboards/ergodox/keymaps/kines-ish/keymap.c +++ b/layouts/community/ergodox/kines-ish/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_PSCR,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_SLCK,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/kines-ish/readme.md b/layouts/community/ergodox/kines-ish/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/kines-ish/readme.md rename to layouts/community/ergodox/kines-ish/readme.md diff --git a/layouts/community/ergodox/kristian/keymap.c b/layouts/community/ergodox/kristian/keymap.c new file mode 100644 index 000000000000..aeb3112de87c --- /dev/null +++ b/layouts/community/ergodox/kristian/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "keymap_fr_ch.h" +#include "keymap_french.h" +#include "keymap_german.h" +#include "keymap_german_ch.h" +#include "keymap_nordic.h" +#include "keymap_norwegian.h" +#include "keymap_spanish.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +[0] = LAYOUT_ergodox(NO_LESS,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_APOS),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_AM,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSLH),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_APOS),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_APOS,KC_LALT,KC_LGUI,KC_ENTER), + +[1] = LAYOUT_ergodox(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_TRANSPARENT,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_7,KC_8,KC_9,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_4,KC_5,KC_6,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_0,KC_1,KC_2,KC_3,NO_LBRC,NO_RBRC,KC_LSHIFT,KC_COMMA,KC_DOT,LSFT(NO_LBRC),LSFT(NO_RBRC),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LALT,KC_LGUI,KC_ENTER), + +[2] = LAYOUT_ergodox(KC_ESCAPE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LALT,KC_LGUI,KC_MS_BTN1,KC_MS_BTN2,KC_ESCAPE,KC_TRANSPARENT,KC_TRANSPARENT,KC_SPACE,KC_LGUI,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_ESCAPE,KC_MS_WH_UP,KC_MS_WH_DOWN,KC_MS_ACCEL0,KC_MS_ACCEL1), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + +}; diff --git a/layouts/community/ergodox/layout.json b/layouts/community/ergodox/layout.json new file mode 100644 index 000000000000..5348e91a68f2 --- /dev/null +++ b/layouts/community/ergodox/layout.json @@ -0,0 +1,26 @@ +[{x:3.5,a:7},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"","",{x:4.5},"",""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{x:6.5},""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""], +[{y:-0.75,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{x:6.5},""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.75,x:0.5},"","",{x:14.5},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""], +[{h:2},"",{h:2},"",""], +[{x:2},""], +[{r:-30,rx:13,y:-1,x:-3},"",""], +[{x:-3},"",{h:2},"",{h:2},""], +[{x:-3},""] diff --git a/keyboards/ergodox/keymaps/maz/keymap.c b/layouts/community/ergodox/maz/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/maz/keymap.c rename to layouts/community/ergodox/maz/keymap.c index 6378f874be0d..ad425a726c59 100644 --- a/keyboards/ergodox/keymaps/maz/keymap.c +++ b/layouts/community/ergodox/maz/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // not sure if gui is meta key or super... it says meta on the basic keycodes page, and i think that's consitent with other shit, but you should really figure out how to program the keyboard to have meta and super separately instead of hacking your init.el to recognize alt as meta... because shit will get fucked up beteween awesome and emacs and other shit i'm guessing // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[ARRW] = KEYMAP( +[ARRW] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -159,7 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/maz/readme.md b/layouts/community/ergodox/maz/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/maz/readme.md rename to layouts/community/ergodox/maz/readme.md diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/layouts/community/ergodox/mclennon_osx/README.md similarity index 100% rename from keyboards/ergodox/keymaps/mclennon_osx/README.md rename to layouts/community/ergodox/mclennon_osx/README.md diff --git a/keyboards/ergodox/keymaps/mclennon_osx/keymap.c b/layouts/community/ergodox/mclennon_osx/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/mclennon_osx/keymap.c rename to layouts/community/ergodox/mclennon_osx/keymap.c index 627ff01e4a9e..dd37c5eef73b 100644 --- a/keyboards/ergodox/keymaps/mclennon_osx/keymap.c +++ b/layouts/community/ergodox/mclennon_osx/keymap.c @@ -1,5 +1,5 @@ // Media keys work on OSX, but not on Windows. -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // AUXILIARY -[AUXI] = KEYMAP( +[AUXI] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/mpiechotka/keymap.c b/layouts/community/ergodox/mpiechotka/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/mpiechotka/keymap.c rename to layouts/community/ergodox/mpiechotka/keymap.c index 67aca4479cda..cfd5b195e281 100644 --- a/keyboards/ergodox/keymaps/mpiechotka/keymap.c +++ b/layouts/community/ergodox/mpiechotka/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_colemak.h" @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * 1) End/L1 * 2) PgDown/L2 */ -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(SYMB), @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * 1) End/L1 * 2) PgDown/L2 */ -[BASE_CM] = KEYMAP( // layer 0 : default +[BASE_CM] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, CM_Q, CM_W, CM_F, CM_P, CM_G, TG(SYMB), @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -173,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MACROS -[MACR] = KEYMAP( +[MACR] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(DL_BASE),F(DL_BASE_CM),KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(PC1), F(PC2), F(PC3), F(PC4), KC_NO, diff --git a/keyboards/ergodox/keymaps/mpiechotka/readme.md b/layouts/community/ergodox/mpiechotka/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/mpiechotka/readme.md rename to layouts/community/ergodox/mpiechotka/readme.md diff --git a/keyboards/ergodox/keymaps/msc/keymap.c b/layouts/community/ergodox/msc/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/msc/keymap.c rename to layouts/community/ergodox/msc/keymap.c index c43aecf6b863..52962634193e 100644 --- a/keyboards/ergodox/keymaps/msc/keymap.c +++ b/layouts/community/ergodox/msc/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/msc/readme.md b/layouts/community/ergodox/msc/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/msc/readme.md rename to layouts/community/ergodox/msc/readme.md diff --git a/keyboards/ergodox/keymaps/naps62/keymap.c b/layouts/community/ergodox/naps62/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/naps62/keymap.c rename to layouts/community/ergodox/naps62/keymap.c index 9064053fc109..481b0dd765fa 100644 --- a/keyboards/ergodox/keymaps/naps62/keymap.c +++ b/layouts/community/ergodox/naps62/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_SPC), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(2), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LGUI(KC_W), LGUI(KC_E), KC_BTN1, LGUI(KC_T), KC_TRNS, KC_TRNS, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), KC_MS_D, KC_MS_R, diff --git a/keyboards/ergodox/keymaps/naps62/readme.md b/layouts/community/ergodox/naps62/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/naps62/readme.md rename to layouts/community/ergodox/naps62/readme.md diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c rename to layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c index ab2464c42457..39913503379b 100644 --- a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.c +++ b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "keymap_extras/keymap_german.h" @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |ENTER|MO(1)| TAB | !ESC |MO(1)|SPACE| '-----------------' '-----------------' */ -[L0] = KEYMAP( +[L0] = LAYOUT_ergodox( KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR, MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | ! | | | '-----------------' '-----------------' */ -[L1] = KEYMAP( +[L1] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_EURO, DE_UNDS, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | 0 | * '-----------------' '-----------------' */ -[L2] = KEYMAP( +[L2] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, @@ -148,7 +148,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L3] = KEYMAP( +[L3] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_TRNS, @@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L4] = KEYMAP( +[L4] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -224,7 +224,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L5] = KEYMAP( +[L5] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -262,7 +262,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | ! | | | * '-----------------' '-----------------' */ -[L6] = KEYMAP( +[L6] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.md similarity index 100% rename from keyboards/ergodox/keymaps/neo2_on_qwertz_hardware/keymap.md rename to layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.md diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c rename to layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c index 1d505f8e3843..afadf13ff608 100644 --- a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_norwegian.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |GUI/, | | Bspc | | | * `--------------------' `---------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2, @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |crtl/,| | | | | * `--------------------' `--------------------' */ -[BASE_MAC] = KEYMAP( +[BASE_MAC] = LAYOUT_ergodox( KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NUMB_FUNC] = KEYMAP( +[NUMB_FUNC] = LAYOUT_ergodox( NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md b/layouts/community/ergodox/norwegian_programmer_osx_pc/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md rename to layouts/community/ergodox/norwegian_programmer_osx_pc/readme.md diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c rename to layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c index acf74a47d29d..10b7df642be7 100644 --- a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_norwegian.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |GUI/, | | Bspc | | | * `--------------------' `---------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |crtl/,| | | | | * `--------------------' `--------------------' */ -[BASE_MAC] = KEYMAP( +[BASE_MAC] = LAYOUT_ergodox( KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[NUMB_FUNC] = KEYMAP( +[NUMB_FUNC] = LAYOUT_ergodox( NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md rename to layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/readme.md diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/layouts/community/ergodox/ordinary/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/ordinary/keymap.c rename to layouts/community/ergodox/ordinary/keymap.c index ac84df57014a..86ab86491004 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/layouts/community/ergodox/ordinary/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "led.h" #include "mousekey.h" #include "debug.h" @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | PgDn | | Down | | | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC ,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | + | = | != | | -> | _ | - | * `--------------------' `--------------------' */ -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) @@ -151,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Home | |VolDn | | Pause| * `--------------------' `--------------------' */ -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC ,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U @@ -193,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[SPEC] = KEYMAP( +[SPEC] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS @@ -235,7 +235,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Down | | PgDn | | | * `--------------------' `--------------------' */ -[RBASE] = KEYMAP( +[RBASE] = LAYOUT_ergodox( // left hand KC_EQL ,KC_0 ,KC_9 ,KC_8 ,KC_7 ,KC_6 ,KC_MINS ,KC_BSLS ,KC_P ,KC_O ,KC_I ,KC_U ,KC_Y ,KC_RBRC diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-base.txt b/layouts/community/ergodox/ordinary/ordinary-base.txt similarity index 100% rename from keyboards/ergodox/keymaps/ordinary/ordinary-base.txt rename to layouts/community/ergodox/ordinary/ordinary-base.txt diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-media.txt b/layouts/community/ergodox/ordinary/ordinary-media.txt similarity index 100% rename from keyboards/ergodox/keymaps/ordinary/ordinary-media.txt rename to layouts/community/ergodox/ordinary/ordinary-media.txt diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-special.txt b/layouts/community/ergodox/ordinary/ordinary-special.txt similarity index 100% rename from keyboards/ergodox/keymaps/ordinary/ordinary-special.txt rename to layouts/community/ergodox/ordinary/ordinary-special.txt diff --git a/keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt b/layouts/community/ergodox/ordinary/ordinary-symbol.txt similarity index 100% rename from keyboards/ergodox/keymaps/ordinary/ordinary-symbol.txt rename to layouts/community/ergodox/ordinary/ordinary-symbol.txt diff --git a/keyboards/ergodox/keymaps/ordinary/readme.md b/layouts/community/ergodox/ordinary/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/ordinary/readme.md rename to layouts/community/ergodox/ordinary/readme.md diff --git a/keyboards/ergodox/keymaps/osx_de/keymap.c b/layouts/community/ergodox/osx_de/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/osx_de/keymap.c rename to layouts/community/ergodox/osx_de/keymap.c index e3b9e11f476a..a9a27a8d4327 100644 --- a/keyboards/ergodox/keymaps/osx_de/keymap.c +++ b/layouts/community/ergodox/osx_de/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_german_osx.h" @@ -29,7 +29,7 @@ //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE]=KEYMAP( +[BASE]=LAYOUT_ergodox( //left half KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(M_CTL_SFT_HASH), KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(NUMB), ALL_T(DE_OSX_ACUT), KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), -[SYMB]=KEYMAP( +[SYMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F13, KC_F12, KC_F14, KC_F15, KC_TRNS, KC_TRNS), -[MDIA]=KEYMAP( +[MDIA]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK), -[SMLY]=KEYMAP( +[SMLY]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -[NUMB]=KEYMAP( +[NUMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -[EGOS]=KEYMAP( +[EGOS]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/osx_de/osx_de_highres.png.md b/layouts/community/ergodox/osx_de/osx_de_highres.png.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_de/osx_de_highres.png.md rename to layouts/community/ergodox/osx_de/osx_de_highres.png.md diff --git a/keyboards/ergodox/keymaps/osx_de/readme.md b/layouts/community/ergodox/osx_de/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_de/readme.md rename to layouts/community/ergodox/osx_de/readme.md diff --git a/keyboards/ergodox/keymaps/osx_de_adnw_koy/keymap.c b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/osx_de_adnw_koy/keymap.c rename to layouts/community/ergodox/osx_de_adnw_koy/keymap.c index 6c4312a32e8d..9d2e117bc105 100644 --- a/keyboards/ergodox/keymaps/osx_de_adnw_koy/keymap.c +++ b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -25,7 +25,7 @@ //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE]=KEYMAP( +[BASE]=LAYOUT_ergodox( //left half KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LCTL, KC_TAB, KC_K, KC_DOT, KC_O, KC_COMM, KC_Z, KC_LGUI, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ALL_T(DE_ACUT), TG(NUMB), KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), -[SYMB]=KEYMAP( +[SYMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_GRV, LSFT(KC_GRV), DE_EXLM, DE_QST, KC_TRNS, KC_TRNS, @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -[MDIA]=KEYMAP( +[MDIA]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK), -[QWERTZ]=KEYMAP( +[QWERTZ]=LAYOUT_ergodox( //left half KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_V), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI, @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ALL_T(DE_ACUT), KC_TRNS, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), -[NUMB]=KEYMAP( +[NUMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/osx_de_adnw_koy/osx_de_adnw_koy_highres.png.md b/layouts/community/ergodox/osx_de_adnw_koy/osx_de_adnw_koy_highres.png.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_de_adnw_koy/osx_de_adnw_koy_highres.png.md rename to layouts/community/ergodox/osx_de_adnw_koy/osx_de_adnw_koy_highres.png.md diff --git a/keyboards/ergodox/keymaps/osx_de_experimental/keymap.c b/layouts/community/ergodox/osx_de_experimental/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/osx_de_experimental/keymap.c rename to layouts/community/ergodox/osx_de_experimental/keymap.c index 61b6a4fdb31e..15c700a78304 100644 --- a/keyboards/ergodox/keymaps/osx_de_experimental/keymap.c +++ b/layouts/community/ergodox/osx_de_experimental/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_neo2.h" @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[BASE]=KEYMAP( +[BASE]=LAYOUT_ergodox( //left half KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM), KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, @@ -149,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[SYMB]=KEYMAP( +[SYMB]=LAYOUT_ergodox( //left half KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5, KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS, @@ -201,7 +201,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[MDIA]=KEYMAP( +[MDIA]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, @@ -253,7 +253,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[SMLY]=KEYMAP( +[SMLY]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -305,7 +305,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[NUMB]=KEYMAP( +[NUMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, @@ -357,7 +357,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * **/ -[EGOS]=KEYMAP( +[EGOS]=LAYOUT_ergodox( //left half KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/osx_de_experimental/osx_de_experimental_highres.png.md b/layouts/community/ergodox/osx_de_experimental/osx_de_experimental_highres.png.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_de_experimental/osx_de_experimental_highres.png.md rename to layouts/community/ergodox/osx_de_experimental/osx_de_experimental_highres.png.md diff --git a/keyboards/ergodox/keymaps/osx_de_experimental/readme.md b/layouts/community/ergodox/osx_de_experimental/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_de_experimental/readme.md rename to layouts/community/ergodox/osx_de_experimental/readme.md diff --git a/keyboards/ergodox/keymaps/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/osx_fr/keymap.c rename to layouts/community/ergodox/osx_fr/keymap.c index 7dee284fae7e..f899b8b0f1b4 100644 --- a/keyboards/ergodox/keymaps/osx_fr/keymap.c +++ b/layouts/community/ergodox/osx_fr/keymap.c @@ -1,5 +1,5 @@ // French AZERTY version of the default_osx file -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_french_osx.h" @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand FR_MINS, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_LEFT, KC_DELT, FR_A, FR_Z, KC_E, KC_R, KC_T, TG(1), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,FR_EXLM,FR_AT, FR_LCBR,FR_RCBR,FR_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/osx_kinesis_pnut/keymap.c b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/osx_kinesis_pnut/keymap.c rename to layouts/community/ergodox/osx_kinesis_pnut/keymap.c index 11281df8abde..59ffe4f3ff0f 100644 --- a/keyboards/ergodox/keymaps/osx_kinesis_pnut/keymap.c +++ b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c @@ -5,7 +5,7 @@ // Only default layer was remapped all others layers are standard Ergodox EZ // Very personal mapping of-course, but who knows a starting point for others. -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_CAPSLOCK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c rename to layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c index 98d2836ab21e..dcf2dc1d85ba 100644 --- a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c +++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -3,7 +3,7 @@ * Fake it till you make it! */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "timer.h" @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `----------------------' */ - [BASE] = KEYMAP( // layer 0 : default + [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC, @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS - [SYMB] = KEYMAP( + [SYMB] = LAYOUT_ergodox( // left hand KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -126,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND TENKEY - [MDIA] = KEYMAP( + [MDIA] = LAYOUT_ergodox( KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md rename to layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md diff --git a/keyboards/ergodox/keymaps/phoenix/keymap.c b/layouts/community/ergodox/phoenix/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/phoenix/keymap.c rename to layouts/community/ergodox/phoenix/keymap.c index 624817d474f7..7ebdeaeb83c3 100644 --- a/keyboards/ergodox/keymaps/phoenix/keymap.c +++ b/layouts/community/ergodox/phoenix/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/phoenix/readme.md b/layouts/community/ergodox/phoenix/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/phoenix/readme.md rename to layouts/community/ergodox/phoenix/readme.md diff --git a/keyboards/ergodox/keymaps/plover/keymap.c b/layouts/community/ergodox/plover/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/plover/keymap.c rename to layouts/community/ergodox/plover/keymap.c index 12b3aa212f1f..d3e3547299ea 100644 --- a/keyboards/ergodox/keymaps/plover/keymap.c +++ b/layouts/community/ergodox/plover/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -157,7 +157,7 @@ KEYMAP( * `--------------------' `--------------------' */ -[PLVR] = KEYMAP( // layout: layer 4: Steno for Plover +[PLVR] = LAYOUT_ergodox( // layout: layer 4: Steno for Plover // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/plums/keymap.c b/layouts/community/ergodox/plums/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/plums/keymap.c rename to layouts/community/ergodox/plums/keymap.c index 2853455e3d9d..c75ce0f9778a 100644 --- a/keyboards/ergodox/keymaps/plums/keymap.c +++ b/layouts/community/ergodox/plums/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/plums/readme.md b/layouts/community/ergodox/plums/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/plums/readme.md rename to layouts/community/ergodox/plums/readme.md diff --git a/keyboards/ergodox/keymaps/pvinis/Changelog.md b/layouts/community/ergodox/pvinis/Changelog.md similarity index 100% rename from keyboards/ergodox/keymaps/pvinis/Changelog.md rename to layouts/community/ergodox/pvinis/Changelog.md diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/layouts/community/ergodox/pvinis/Readme.md similarity index 100% rename from keyboards/ergodox/keymaps/pvinis/Readme.md rename to layouts/community/ergodox/pvinis/Readme.md diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/layouts/community/ergodox/pvinis/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/pvinis/keymap.c rename to layouts/community/ergodox/pvinis/keymap.c index 3c49118842fa..1bca0398dcd0 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/layouts/community/ergodox/pvinis/keymap.c @@ -1,6 +1,6 @@ // pvinis' ergodox keymap -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "mousekey.h" // easier name for left ctrl-alt-gui @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | |SYSCTL| |Msngr | | | * `--------------------' `----------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `----------------------' */ -[BEGIN] = KEYMAP( +[BEGIN] = LAYOUT_ergodox( KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LALT ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC ,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G @@ -143,7 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `----------------------' */ -[QWERTY] = KEYMAP( +[QWERTY] = LAYOUT_ergodox( KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS ,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS ,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G @@ -187,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[CARPALX] = KEYMAP( +[CARPALX] = LAYOUT_ergodox( KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS ,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS ,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R @@ -231,7 +231,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ^ | | | | | * `--------------------' `--------------------' */ -[SYSCTL] = KEYMAP( +[SYSCTL] = LAYOUT_ergodox( KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -275,7 +275,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | ^ | | | | | * `--------------------' `--------------------' */ -[MOUSE] = KEYMAP( +[MOUSE] = LAYOUT_ergodox( KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -320,7 +320,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `----------------------' */ /* -[TEMPLATE] = KEYMAP( +[TEMPLATE] = LAYOUT_ergodox( KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS @@ -341,7 +341,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ), -[TEMPLATE] = KEYMAP( +[TEMPLATE] = LAYOUT_ergodox( KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO diff --git a/keyboards/ergodox/keymaps/pvinis/Makefile b/layouts/community/ergodox/pvinis/rules.mk similarity index 76% rename from keyboards/ergodox/keymaps/pvinis/Makefile rename to layouts/community/ergodox/pvinis/rules.mk index 7ceb51ce4ce0..87cbd93c2ba3 100644 --- a/keyboards/ergodox/keymaps/pvinis/Makefile +++ b/layouts/community/ergodox/pvinis/rules.mk @@ -4,6 +4,4 @@ SLEEP_LED_ENABLE = no # no led blinking while sleeping NKRO_ENABLE = yes # disable for windows TAP_DANCE_ENABLE = yes # tap-tap-tap -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/layouts/community/ergodox/readme.md b/layouts/community/ergodox/readme.md new file mode 100644 index 000000000000..ddbe1933c237 --- /dev/null +++ b/layouts/community/ergodox/readme.md @@ -0,0 +1,3 @@ +# ergodox + + LAYOUT_ergodox \ No newline at end of file diff --git a/keyboards/ergodox/keymaps/replicaJunction/config.h b/layouts/community/ergodox/replicaJunction/config.h similarity index 92% rename from keyboards/ergodox/keymaps/replicaJunction/config.h rename to layouts/community/ergodox/replicaJunction/config.h index d32b46e4e6e5..c69ce8cea98f 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/config.h +++ b/layouts/community/ergodox/replicaJunction/config.h @@ -18,6 +18,14 @@ along with this program. If not, see . #ifndef KEYBOARDS_ERGODOX_CONFIG_H_ #define KEYBOARDS_ERGODOX_CONFIG_H_ +#include QMK_KEYBOARD_CONFIG_H + + +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_MAX_SPEED +#undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_DELAY 100 #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_MAX_SPEED 3 @@ -52,12 +60,5 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) -#ifdef SUBPROJECT_ez - #include "ez/config.h" -#endif -#ifdef SUBPROJECT_infinity - #include "infinity/config.h" -#endif - #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox/keymaps/replicaJunction/keymap.c b/layouts/community/ergodox/replicaJunction/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/replicaJunction/keymap.c rename to layouts/community/ergodox/replicaJunction/keymap.c index c9213553c1f9..fc80059276bd 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/keymap.c +++ b/layouts/community/ergodox/replicaJunction/keymap.c @@ -16,7 +16,7 @@ * here: https://colemakmods.github.io/mod-dh/ */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | _NU | | Down | | | * `--------------------' `--------------------' */ -[_CO] = KEYMAP( +[_CO] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_LCTL,KC_Q, KC_W, KC_F, KC_P, KC_B, KC_HOME, @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | _NU | | Down | | | * `--------------------' `--------------------' */ -[_QW] = KEYMAP( // Layer1: QWERTY +[_QW] = LAYOUT_ergodox( // Layer1: QWERTY // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_LCTL,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, @@ -161,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[_NU] = KEYMAP( +[_NU] = LAYOUT_ergodox( // left hand _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, _______, @@ -209,7 +209,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Ctrl+` is a keyboard shortcut for the program ConEmu, which provides a Quake-style drop-down command prompt. * */ -[_EX] = KEYMAP( +[_EX] = LAYOUT_ergodox( // left hand _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MUTE, _______, _______, _______, _______, _______, KCX_CGR, KC_VOLU, @@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[_GA] = KEYMAP( +[_GA] = LAYOUT_ergodox( // left hand _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox/keymaps/replicaJunction/readme.md b/layouts/community/ergodox/replicaJunction/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/replicaJunction/readme.md rename to layouts/community/ergodox/replicaJunction/readme.md diff --git a/keyboards/ergodox/keymaps/reset_eeprom/keymap.c b/layouts/community/ergodox/reset_eeprom/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/reset_eeprom/keymap.c rename to layouts/community/ergodox/reset_eeprom/keymap.c index 8d689765856f..c960af9cb935 100644 --- a/keyboards/ergodox/keymaps/reset_eeprom/keymap.c +++ b/layouts/community/ergodox/reset_eeprom/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, diff --git a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c b/layouts/community/ergodox/robot_test_layout/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/robot_test_layout/keymap.c rename to layouts/community/ergodox/robot_test_layout/keymap.c index e9e2597d7e08..5d672deeb990 100644 --- a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c +++ b/layouts/community/ergodox/robot_test_layout/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -17,7 +17,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( +[0] = LAYOUT_ergodox( RGB_TOGGLE, RGB_FF0000, RGB_00FF00, RGB_0000FF, RGB_FFFFFF, KC_5, KC_LPRN, KC_GRAVE, KC_A, KC_B, KC_C, KC_D, KC_E, KC_EXLM, KC_HASH, KC_J, KC_K, KC_L, KC_M, KC_N, diff --git a/keyboards/ergodox/keymaps/robot_test_layout/readme.md b/layouts/community/ergodox/robot_test_layout/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/robot_test_layout/readme.md rename to layouts/community/ergodox/robot_test_layout/readme.md diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c similarity index 96% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c rename to layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c index 2c643044049b..e024d5fb95f5 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c @@ -1,11 +1,11 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #define BASE 0 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, KC_LCTRL, KC_A, KC_S, KC_E, KC_T, KC_G, diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md b/layouts/community/ergodox/romanzolotarev-norman-osx/readme.md similarity index 93% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md rename to layouts/community/ergodox/romanzolotarev-norman-osx/readme.md index 637f9cba2cb7..5e7d0ebb1eb8 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md +++ b/layouts/community/ergodox/romanzolotarev-norman-osx/readme.md @@ -37,5 +37,5 @@ Then you can clone this repository, make and flash your ErgoDox. git clone https://github.com/romanzolotarev/qmk_firmware cd qmk_firmware/keyboards/ergodox # Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c -SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy +SLEEP_LED_ENABLED=no LAYOUT_ergodox=romanzolotarev-norman-osx make teensy ``` diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx-hjkl/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx-hjkl/keymap.c rename to layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c index 9f41e51899a4..1dd956bdad53 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx-hjkl/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -8,7 +8,7 @@ #define ARRW 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F14, KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, TG(PLVR), CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G, @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_FN3, KC_QUOT, KC_SPC ), - [SYMB] = KEYMAP( + [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [PLVR] = KEYMAP( + [PLVR] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_N, KC_M ), - [ARRW] = KEYMAP( + [ARRW] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx-hjkl/readme.md rename to layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/readme.md diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx/keymap.c rename to layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c index 563e24872d69..f8ae8a51d1ac 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -8,7 +8,7 @@ #define ARRW 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F14, KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, TG(PLVR), CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G, @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_FN3, KC_QUOT, KC_SPC ), - [SYMB] = KEYMAP( + [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [PLVR] = KEYMAP( + [PLVR] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_N, KC_M ), - [ARRW] = KEYMAP( + [ARRW] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx/readme.md b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-plover-osx/readme.md rename to layouts/community/ergodox/romanzolotarev-norman-plover-osx/readme.md diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c rename to layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c index 5569f5c74ef4..d0b7520c3103 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -6,7 +6,7 @@ #define QWRT 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_E, KC_T, KC_G, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_RALT, KC_QUOT, KC_SPC ), - [QWRT] = KEYMAP( + [QWRT] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_E, KC_R, KC_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_D, KC_F, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-qwerty-osx/readme.md b/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/romanzolotarev-norman-qwerty-osx/readme.md rename to layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/readme.md diff --git a/keyboards/ergodox/keymaps/sethbc/keymap.c b/layouts/community/ergodox/sethbc/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/sethbc/keymap.c rename to layouts/community/ergodox/sethbc/keymap.c index 8816ad63bb91..7f142a9760c5 100644 --- a/keyboards/ergodox/keymaps/sethbc/keymap.c +++ b/layouts/community/ergodox/sethbc/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define BASE 0 // default layer @@ -6,7 +6,7 @@ #define FN2 2 // media keys const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(FN2), @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_ENT, KC_SPC ), // FN1 -[FN1] = KEYMAP( +[FN1] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), // FN2 -[FN2] = KEYMAP( +[FN2] = LAYOUT_ergodox( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/sethbc/readme.md b/layouts/community/ergodox/sethbc/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/sethbc/readme.md rename to layouts/community/ergodox/sethbc/readme.md diff --git a/layouts/community/ergodox/sethbc/rules.mk b/layouts/community/ergodox/sethbc/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/layouts/community/ergodox/sethbc/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/ergodox/keymaps/siroken3/default.png.md b/layouts/community/ergodox/siroken3/default.png.md similarity index 100% rename from keyboards/ergodox/keymaps/siroken3/default.png.md rename to layouts/community/ergodox/siroken3/default.png.md diff --git a/keyboards/ergodox/keymaps/siroken3/default_highres.png.md b/layouts/community/ergodox/siroken3/default_highres.png.md similarity index 100% rename from keyboards/ergodox/keymaps/siroken3/default_highres.png.md rename to layouts/community/ergodox/siroken3/default_highres.png.md diff --git a/keyboards/ergodox/keymaps/siroken3/keymap.c b/layouts/community/ergodox/siroken3/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/siroken3/keymap.c rename to layouts/community/ergodox/siroken3/keymap.c index 258f122b48cf..e8e12238737b 100644 --- a/keyboards/ergodox/keymaps/siroken3/keymap.c +++ b/layouts/community/ergodox/siroken3/keymap.c @@ -1,7 +1,7 @@ // Netable differences vs. the default firmware for the ErgoDox EZ: // 1. The Cmd key is now on the right side, making Cmd+Space easier. // 2. The media keys work on OSX (But not on Windows). -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/siroken3/readme.md b/layouts/community/ergodox/siroken3/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/siroken3/readme.md rename to layouts/community/ergodox/siroken3/readme.md diff --git a/keyboards/ergodox/keymaps/sneako/keymap.c b/layouts/community/ergodox/sneako/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/sneako/keymap.c rename to layouts/community/ergodox/sneako/keymap.c index 08cadd685222..98f3469fcedd 100644 --- a/keyboards/ergodox/keymaps/sneako/keymap.c +++ b/layouts/community/ergodox/sneako/keymap.c @@ -1,7 +1,7 @@ // Based on `default_osx` // Replace left Bksp with Ctrl/Esc // Remove the Ctrl from Z and / -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/sneako/readme.md b/layouts/community/ergodox/sneako/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/sneako/readme.md rename to layouts/community/ergodox/sneako/readme.md diff --git a/keyboards/ergodox/keymaps/software_neo2/keymap.c b/layouts/community/ergodox/software_neo2/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/software_neo2/keymap.c rename to layouts/community/ergodox/software_neo2/keymap.c index 571ca062cdbf..925caa01618a 100644 --- a/keyboards/ergodox/keymaps/software_neo2/keymap.c +++ b/layouts/community/ergodox/software_neo2/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "led.h" #include "action_layer.h" @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, diff --git a/keyboards/ergodox/keymaps/supercoder/config.h b/layouts/community/ergodox/supercoder/config.h similarity index 78% rename from keyboards/ergodox/keymaps/supercoder/config.h rename to layouts/community/ergodox/supercoder/config.h index 2de3599f870f..8c191a87c51f 100644 --- a/keyboards/ergodox/keymaps/supercoder/config.h +++ b/layouts/community/ergodox/supercoder/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H 1 -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/ergodox/keymaps/supercoder/keymap.c b/layouts/community/ergodox/supercoder/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/supercoder/keymap.c rename to layouts/community/ergodox/supercoder/keymap.c index 775acf2c96de..a42937bd6beb 100644 --- a/keyboards/ergodox/keymaps/supercoder/keymap.c +++ b/layouts/community/ergodox/supercoder/keymap.c @@ -2,7 +2,7 @@ * SuperCoder 2000 layout */ -#include "ergodox.h" +#include QMK_KEYBOARD_H /* Layers */ @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | DONE | | DONE | | | * `--------------------' `--------------------' */ -[SC2K] = KEYMAP( +[SC2K] = LAYOUT_ergodox( // left hand KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 diff --git a/keyboards/ergodox/keymaps/supercoder/makefile.mk b/layouts/community/ergodox/supercoder/makefile.mk similarity index 100% rename from keyboards/ergodox/keymaps/supercoder/makefile.mk rename to layouts/community/ergodox/supercoder/makefile.mk diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/layouts/community/ergodox/supercoder/readme.md similarity index 96% rename from keyboards/ergodox/keymaps/supercoder/readme.md rename to layouts/community/ergodox/supercoder/readme.md index e1aa0b00a885..7f2c9ef6955a 100644 --- a/keyboards/ergodox/keymaps/supercoder/readme.md +++ b/layouts/community/ergodox/supercoder/readme.md @@ -25,5 +25,5 @@ your own: $ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder -$ make KEYMAP=supercoder +$ make LAYOUT_ergodox=supercoder ``` diff --git a/keyboards/ergodox/keymaps/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/swedish-lindhe/keymap.c rename to layouts/community/ergodox/swedish-lindhe/keymap.c index 9f3e82184d90..e977ab994871 100644 --- a/keyboards/ergodox/keymaps/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_swedish.h" @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `---------------------' */ -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F11, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, KC_TRNS, @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/swedish-lindhe/readme.md b/layouts/community/ergodox/swedish-lindhe/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/swedish-lindhe/readme.md rename to layouts/community/ergodox/swedish-lindhe/readme.md diff --git a/keyboards/ergodox/keymaps/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/swedish/keymap.c rename to layouts/community/ergodox/swedish/keymap.c index c110538e6fa4..d2b9b40d1f64 100644 --- a/keyboards/ergodox/keymaps/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand NO_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,NO_AT, NO_LCBR,NO_RCBR,NO_PIPE,KC_TRNS, @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/swedish/readme.md b/layouts/community/ergodox/swedish/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/swedish/readme.md rename to layouts/community/ergodox/swedish/readme.md diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/layouts/community/ergodox/swissgerman/keyboard-layout.json similarity index 100% rename from keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json rename to layouts/community/ergodox/swissgerman/keyboard-layout.json diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/layouts/community/ergodox/swissgerman/keyboard-layout_1_2.json similarity index 100% rename from keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json rename to layouts/community/ergodox/swissgerman/keyboard-layout_1_2.json diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/layouts/community/ergodox/swissgerman/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/swissgerman/keymap.c rename to layouts/community/ergodox/swissgerman/keymap.c index 2291fb651a94..0288c955b5dc 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/layouts/community/ergodox/swissgerman/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, @@ -151,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/layouts/community/ergodox/swissgerman/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/swissgerman/readme.md rename to layouts/community/ergodox/swissgerman/readme.md diff --git a/keyboards/ergodox/keymaps/techtomas/keymap.c b/layouts/community/ergodox/techtomas/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/techtomas/keymap.c rename to layouts/community/ergodox/techtomas/keymap.c index 93d59d4876c2..361583a0df8c 100644 --- a/keyboards/ergodox/keymaps/techtomas/keymap.c +++ b/layouts/community/ergodox/techtomas/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand LT(APP,KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_SPC), MEH_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,S(KC_COMM), @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // Control -[APP] = KEYMAP( +[APP] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LGUI(KC_Q), LGUI(KC_W), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -156,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // Control -[CNTL] = KEYMAP( +[CNTL] = LAYOUT_ergodox( KC_PWR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, diff --git a/keyboards/ergodox/keymaps/techtomas/readme.md b/layouts/community/ergodox/techtomas/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/techtomas/readme.md rename to layouts/community/ergodox/techtomas/readme.md diff --git a/keyboards/ergodox/keymaps/teckinesis/keymap.c b/layouts/community/ergodox/teckinesis/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/teckinesis/keymap.c rename to layouts/community/ergodox/teckinesis/keymap.c index 2837874f788b..0b65572f6812 100644 --- a/keyboards/ergodox/keymaps/teckinesis/keymap.c +++ b/layouts/community/ergodox/teckinesis/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "led.h" #include "debug.h" #include "action_layer.h" @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | PgDn | | Down | | | * `--------------------' `--------------------' */ -[BASE] = KEYMAP( +[BASE] = LAYOUT_ergodox( // left hand F(LSpec),KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC ,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Down | | PgDn | | | * `--------------------' `--------------------' */ -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) @@ -144,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Home | |VolDn | | Pause| * `--------------------' `--------------------' */ -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC ,KC_TRNS ,KC_NO ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U @@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[SPEC] = KEYMAP( +[SPEC] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS diff --git a/keyboards/ergodox/keymaps/teckinesis/ordinary-special.png.md b/layouts/community/ergodox/teckinesis/ordinary-special.png.md similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/ordinary-special.png.md rename to layouts/community/ergodox/teckinesis/ordinary-special.png.md diff --git a/keyboards/ergodox/keymaps/teckinesis/ordinary-special.txt b/layouts/community/ergodox/teckinesis/ordinary-special.txt similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/ordinary-special.txt rename to layouts/community/ergodox/teckinesis/ordinary-special.txt diff --git a/keyboards/ergodox/keymaps/teckinesis/readme.md b/layouts/community/ergodox/teckinesis/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/readme.md rename to layouts/community/ergodox/teckinesis/readme.md diff --git a/keyboards/ergodox/keymaps/teckinesis/teckinesis-base.json b/layouts/community/ergodox/teckinesis/teckinesis-base.json similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/teckinesis-base.json rename to layouts/community/ergodox/teckinesis/teckinesis-base.json diff --git a/keyboards/ergodox/keymaps/teckinesis/teckinesis-media.json b/layouts/community/ergodox/teckinesis/teckinesis-media.json similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/teckinesis-media.json rename to layouts/community/ergodox/teckinesis/teckinesis-media.json diff --git a/keyboards/ergodox/keymaps/teckinesis/teckinesis-symbol.json b/layouts/community/ergodox/teckinesis/teckinesis-symbol.json similarity index 100% rename from keyboards/ergodox/keymaps/teckinesis/teckinesis-symbol.json rename to layouts/community/ergodox/teckinesis/teckinesis-symbol.json diff --git a/keyboards/ergodox/keymaps/tkuichooseyou/README.md b/layouts/community/ergodox/tkuichooseyou/README.md similarity index 100% rename from keyboards/ergodox/keymaps/tkuichooseyou/README.md rename to layouts/community/ergodox/tkuichooseyou/README.md diff --git a/keyboards/ergodox/keymaps/tkuichooseyou/keymap.c b/layouts/community/ergodox/tkuichooseyou/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/tkuichooseyou/keymap.c rename to layouts/community/ergodox/tkuichooseyou/keymap.c index d1c779186582..0a94b5205281 100644 --- a/keyboards/ergodox/keymaps/tkuichooseyou/keymap.c +++ b/layouts/community/ergodox/tkuichooseyou/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(LSFT(KC_LBRC)), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, ALL_T(KC_NO), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -KEYMAP( +LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/tm2030/keymap.c b/layouts/community/ergodox/tm2030/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/tm2030/keymap.c rename to layouts/community/ergodox/tm2030/keymap.c index 1d861ee7c254..fa919b5d88a8 100644 --- a/keyboards/ergodox/keymaps/tm2030/keymap.c +++ b/layouts/community/ergodox/tm2030/keymap.c @@ -1,5 +1,5 @@ /* TypeMatrix-2030-like keymap */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "led.h" @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[DVRK] = KEYMAP( // layer 0 : default +[DVRK] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[NUMR] = KEYMAP( +[NUMR] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, @@ -171,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[FNLR] = KEYMAP( +[FNLR] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, diff --git a/keyboards/ergodox/keymaps/tm2030/readme.md b/layouts/community/ergodox/tm2030/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/tm2030/readme.md rename to layouts/community/ergodox/tm2030/readme.md diff --git a/keyboards/ergodox/keymaps/tonyabra_osx/keymap.c b/layouts/community/ergodox/tonyabra_osx/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/tonyabra_osx/keymap.c rename to layouts/community/ergodox/tonyabra_osx/keymap.c index 2a15fcb8d893..d0b5c5d9c12d 100644 --- a/keyboards/ergodox/keymaps/tonyabra_osx/keymap.c +++ b/layouts/community/ergodox/tonyabra_osx/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/tonyabra_osx/readme.md b/layouts/community/ergodox/tonyabra_osx/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/tonyabra_osx/readme.md rename to layouts/community/ergodox/tonyabra_osx/readme.md diff --git a/keyboards/ergodox/keymaps/townk_osx/config.h b/layouts/community/ergodox/townk_osx/config.h similarity index 97% rename from keyboards/ergodox/keymaps/townk_osx/config.h rename to layouts/community/ergodox/townk_osx/config.h index 72d3e96700c3..59b3188dfb6f 100644 --- a/keyboards/ergodox/keymaps/townk_osx/config.h +++ b/layouts/community/ergodox/townk_osx/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ergodox/keymaps/townk_osx/keymap.c b/layouts/community/ergodox/townk_osx/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/townk_osx/keymap.c rename to layouts/community/ergodox/townk_osx/keymap.c index 5043d49a09cf..a6097d9a3e0c 100644 --- a/keyboards/ergodox/keymaps/townk_osx/keymap.c +++ b/layouts/community/ergodox/townk_osx/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "action_util.h" @@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * M(2) = Cmd+C * M(3) = Cmd+V */ -[BASE]=KEYMAP(//left half +[BASE]=LAYOUT_ergodox(//left half KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_F16), CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G, @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | XXXX | | * `--------------------' `--------------------' */ -[KEYPAD]=KEYMAP(//left half +[KEYPAD]=LAYOUT_ergodox(//left half KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_MS_ACCEL2, KC_NO, KC_MS_WH_UP, KC_MS_U, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_MS_ACCEL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * XXX = These keys are transparent keys that, when pressed, they issue the key from the previous layer. */ -[FN]=KEYMAP(//left half +[FN]=LAYOUT_ergodox(//left half KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_MEDIA_STOP, KC_MEDIA_REWIND, KC_MEDIA_SELECT, KC_MEDIA_FAST_FORWARD, KC_NO, KC_TRNS, KC_CAPS, KC_MEDIA_EJECT, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_NO, diff --git a/keyboards/ergodox/keymaps/townk_osx/makefile.mk b/layouts/community/ergodox/townk_osx/makefile.mk similarity index 100% rename from keyboards/ergodox/keymaps/townk_osx/makefile.mk rename to layouts/community/ergodox/townk_osx/makefile.mk diff --git a/keyboards/ergodox/keymaps/townk_osx/readme.md b/layouts/community/ergodox/townk_osx/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/townk_osx/readme.md rename to layouts/community/ergodox/townk_osx/readme.md diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c rename to layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c index c9dc43c561f6..909127ad4fbb 100644 --- a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c +++ b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | SPACE| | ALT | | PgDn | | | * `--------------------' `----------------------' */ -[0] = KEYMAP( +[0] = LAYOUT_ergodox( TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT), KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3), KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I, @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[1] = KEYMAP( +[1] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_W, KC_QUOTE, KC_SLASH, KC_R, KC_T, KC_TRNS, KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[2] = KEYMAP( +[2] = LAYOUT_ergodox( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[3] = KEYMAP( +[3] = LAYOUT_ergodox( // Left Hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md rename to layouts/community/ergodox/twentylives_dvorak_with_hebrew/readme.md diff --git a/keyboards/ergodox/keymaps/twey/keymap.c b/layouts/community/ergodox/twey/keymap.c similarity index 98% rename from keyboards/ergodox/keymaps/twey/keymap.c rename to layouts/community/ergodox/twey/keymap.c index 1ecbce46615d..70152864b33e 100644 --- a/keyboards/ergodox/keymaps/twey/keymap.c +++ b/layouts/community/ergodox/twey/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "keymap_plover.h" @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(0), KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -96,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), -[STEN] = KEYMAP( // layout: layer 2: Steno for Plover +[STEN] = LAYOUT_ergodox( // layout: layer 2: Steno for Plover // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/twey/readme.md b/layouts/community/ergodox/twey/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/twey/readme.md rename to layouts/community/ergodox/twey/readme.md diff --git a/keyboards/ergodox/keymaps/videck/config.h b/layouts/community/ergodox/videck/config.h similarity index 81% rename from keyboards/ergodox/keymaps/videck/config.h rename to layouts/community/ergodox/videck/config.h index d89aabe77918..b18b7fa9a9f6 100644 --- a/keyboards/ergodox/keymaps/videck/config.h +++ b/layouts/community/ergodox/videck/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include QMK_KEYBOARD_CONFIG_H #ifndef NO_DEBUG #define NO_DEBUG diff --git a/keyboards/ergodox/keymaps/videck/keymap.c b/layouts/community/ergodox/videck/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/videck/keymap.c rename to layouts/community/ergodox/videck/keymap.c index 7bd6274e941b..1229469d717d 100644 --- a/keyboards/ergodox/keymaps/videck/keymap.c +++ b/layouts/community/ergodox/videck/keymap.c @@ -1,6 +1,6 @@ #include -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "action_layer.h" enum { @@ -15,7 +15,7 @@ enum { // See the videck.png image for a visualization of the layout. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = KEYMAP( + [BASE] = LAYOUT_ergodox( // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_SLCK, KC_ENT, KC_SPC ), - [ARROWS] = KEYMAP( + [ARROWS] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [MOUSE] = KEYMAP( + [MOUSE] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [PARENS] = KEYMAP( + [PARENS] = LAYOUT_ergodox( // left hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/videck/readme.md b/layouts/community/ergodox/videck/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/videck/readme.md rename to layouts/community/ergodox/videck/readme.md diff --git a/keyboards/ergodox/keymaps/videck/Makefile b/layouts/community/ergodox/videck/rules.mk similarity index 84% rename from keyboards/ergodox/keymaps/videck/Makefile rename to layouts/community/ergodox/videck/rules.mk index 5c7d21f2cc37..62cf81ea31ba 100644 --- a/keyboards/ergodox/keymaps/videck/Makefile +++ b/layouts/community/ergodox/videck/rules.mk @@ -14,6 +14,4 @@ TAP_DANCE_ENABLE:=yes UNICODEMAP_ENABLE:=no UNICODE_ENABLE:=no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/videck/videck.json b/layouts/community/ergodox/videck/videck.json similarity index 100% rename from keyboards/ergodox/keymaps/videck/videck.json rename to layouts/community/ergodox/videck/videck.json diff --git a/keyboards/ergodox/keymaps/win10_writers-block/config.h b/layouts/community/ergodox/win10_writers-block/config.h similarity index 85% rename from keyboards/ergodox/keymaps/win10_writers-block/config.h rename to layouts/community/ergodox/win10_writers-block/config.h index 43259db08805..ed6170369e0a 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/config.h +++ b/layouts/community/ergodox/win10_writers-block/config.h @@ -1,6 +1,13 @@ #ifndef KEYBOARDS_ERGODOX_CONFIG_H_ #define KEYBOARDS_ERGODOX_CONFIG_H_ +#include QMK_KEYBOARD_CONFIG_H + +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_MAX_SPEED +#undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_DELAY 100 #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_MAX_SPEED 3 @@ -10,7 +17,7 @@ /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST - +#undef TAPPING_TERM #define TAPPING_TERM 300 #define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) @@ -25,12 +32,4 @@ keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) -#ifdef SUBPROJECT_ez - #include "ez/config.h" -#endif -#ifdef SUBPROJECT_infinity - #include "infinity/config.h" -#endif - - #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c b/layouts/community/ergodox/win10_writers-block/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/win10_writers-block/keymap.c rename to layouts/community/ergodox/win10_writers-block/keymap.c index 3106b337478f..05adaed75992 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c +++ b/layouts/community/ergodox/win10_writers-block/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "version.h" @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, @@ -144,7 +144,7 @@ LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, @@ -187,7 +187,7 @@ LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, * `--------------------' `--------------------' */ // RIMWORLD -[RIMW] = KEYMAP( +[RIMW] = LAYOUT_ergodox( // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10, @@ -229,7 +229,7 @@ LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/layouts/community/ergodox/win10_writers-block/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/win10_writers-block/readme.md rename to layouts/community/ergodox/win10_writers-block/readme.md diff --git a/keyboards/ergodox/keymaps/win10_writers-block/Makefile b/layouts/community/ergodox/win10_writers-block/rules.mk similarity index 69% rename from keyboards/ergodox/keymaps/win10_writers-block/Makefile rename to layouts/community/ergodox/win10_writers-block/rules.mk index fbab4b71c42a..83c5090c5f4e 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/Makefile +++ b/layouts/community/ergodox/win10_writers-block/rules.mk @@ -4,6 +4,4 @@ TAP_DANCE_ENABLE=yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/ergodox/keymaps/workman_osx_mdw/keymap.c b/layouts/community/ergodox/workman_osx_mdw/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/workman_osx_mdw/keymap.c rename to layouts/community/ergodox/workman_osx_mdw/keymap.c index c05a1018deae..d0f3882fa868 100644 --- a/keyboards/ergodox/keymaps/workman_osx_mdw/keymap.c +++ b/layouts/community/ergodox/workman_osx_mdw/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" // readme @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(1), @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_PERC, KC_AMPR, LSFT(KC_SLSH), LSFT(KC_EQL), KC_AT, KC_TRNS, @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, @@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[DEAD] = KEYMAP( +[DEAD] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, M(100), M(101), M(102), M(103), M(104), KC_TRNS, diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/xyverz/keymap.c rename to layouts/community/ergodox/xyverz/keymap.c index b186c70ba3cb..2e4b1e797ece 100644 --- a/keyboards/ergodox/keymaps/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -13,7 +13,7 @@ * */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" #include "eeconfig.h" @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' * */ -[_DV] = KEYMAP( +[_DV] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[_QW] = KEYMAP( +[_QW] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, @@ -143,7 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | End | | PgDn | | | * `--------------------' `--------------------' */ -[_CM] = KEYMAP( +[_CM] = LAYOUT_ergodox( // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, @@ -185,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[_MD] = KEYMAP( +[_MD] = LAYOUT_ergodox( // left hand RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, @@ -227,7 +227,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[_KP] = KEYMAP( +[_KP] = LAYOUT_ergodox( // left hand KC_PWR, _______, _______, _______, _______, _______, _______, KC_SLEP, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox/keymaps/xyverz/readme.md b/layouts/community/ergodox/xyverz/readme.md similarity index 100% rename from keyboards/ergodox/keymaps/xyverz/readme.md rename to layouts/community/ergodox/xyverz/readme.md diff --git a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf b/layouts/community/ergodox/yoruian/90-ergodox-yoruian.conf similarity index 100% rename from keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf rename to layouts/community/ergodox/yoruian/90-ergodox-yoruian.conf diff --git a/keyboards/ergodox/keymaps/yoruian/README b/layouts/community/ergodox/yoruian/README similarity index 100% rename from keyboards/ergodox/keymaps/yoruian/README rename to layouts/community/ergodox/yoruian/README diff --git a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian b/layouts/community/ergodox/yoruian/ergodox_yoruian similarity index 100% rename from keyboards/ergodox/keymaps/yoruian/ergodox_yoruian rename to layouts/community/ergodox/yoruian/ergodox_yoruian diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/layouts/community/ergodox/yoruian/keymap.c similarity index 97% rename from keyboards/ergodox/keymaps/yoruian/keymap.c rename to layouts/community/ergodox/yoruian/keymap.c index 41dfda3c6df7..367fe3c097b2 100644 --- a/keyboards/ergodox/keymaps/yoruian/keymap.c +++ b/layouts/community/ergodox/yoruian/keymap.c @@ -17,7 +17,7 @@ #include "yoruian.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP_YORUIAN\ +[0] = LAYOUT_ergodox_YORUIAN\ (9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, LC, U, I, A, N, SCLN, M, H, T, S, C, RC, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { BSPC, RALT, P2, TAB, NO, NO, E, LSFT, NO, NO, ENT, SPC), -[1] = KEYMAP_YORUIAN\ +[1] = LAYOUT_ergodox_YORUIAN\ (TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, diff --git a/layouts/community/ergodox/yoruian/rules.mk b/layouts/community/ergodox/yoruian/rules.mk new file mode 100644 index 000000000000..0e9338d249e2 --- /dev/null +++ b/layouts/community/ergodox/yoruian/rules.mk @@ -0,0 +1,11 @@ + + +install-xorg-configuration: + install -m 0664 90-$(KEYBOARD)-$(LAYOUT_ergodox).conf \ + /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(LAYOUT_ergodox).conf + install -m 0644 $(KEYBOARD)_$(LAYOUT_ergodox) \ + /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(LAYOUT_ergodox) + +uninstall-xorg-configuration: + -rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(LAYOUT_ergodox).conf + -rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(LAYOUT_ergodox) diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/layouts/community/ergodox/yoruian/yoruian.h similarity index 93% rename from keyboards/ergodox/keymaps/yoruian/yoruian.h rename to layouts/community/ergodox/yoruian/yoruian.h index b5aaf74b1a67..2a85ef9a2e90 100644 --- a/keyboards/ergodox/keymaps/yoruian/yoruian.h +++ b/layouts/community/ergodox/yoruian/yoruian.h @@ -14,11 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" -#define KEYMAP_YORUIAN( \ +#define LAYOUT_ergodox_YORUIAN( \ /* Spacial positions. */ \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ @@ -28,7 +28,7 @@ k55, k56, k57, k58, \ k54, k59, \ k53, k52, k51, k5C, k5B, k5A) \ - KEYMAP(KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, \ + LAYOUT_ergodox(KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, \ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, \ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, \ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, \ diff --git a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c b/layouts/community/ergodox/zweihander-osx/keymap.c similarity index 99% rename from keyboards/ergodox/keymaps/zweihander-osx/keymap.c rename to layouts/community/ergodox/zweihander-osx/keymap.c index 725a73e346d5..2ace33ee2b9b 100644 --- a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c +++ b/layouts/community/ergodox/zweihander-osx/keymap.c @@ -1,4 +1,4 @@ -#include "ergodox.h" +#include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[SYMB] = KEYMAP( +[SYMB] = LAYOUT_ergodox( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_DQT ,KC_TRNS, @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[MDIA] = KEYMAP( +[MDIA] = LAYOUT_ergodox( KC_TRNS, KC_F14 , KC_F15 , KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, /* F14 dims screen, F15 brightens */ KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS, KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS, diff --git a/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown b/layouts/community/ergodox/zweihander-osx/readme.markdown similarity index 100% rename from keyboards/ergodox/keymaps/zweihander-osx/readme.markdown rename to layouts/community/ergodox/zweihander-osx/readme.markdown diff --git a/keyboards/ergodox/keymaps/zweihander-osx/Makefile b/layouts/community/ergodox/zweihander-osx/rules.mk similarity index 100% rename from keyboards/ergodox/keymaps/zweihander-osx/Makefile rename to layouts/community/ergodox/zweihander-osx/rules.mk diff --git a/layouts/community/ortho_4x12/ergodoxish/config.h b/layouts/community/ortho_4x12/ergodoxish/config.h new file mode 100644 index 000000000000..3c3d9b8858c3 --- /dev/null +++ b/layouts/community/ortho_4x12/ergodoxish/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file diff --git a/layouts/community/ortho_4x12/ergodoxish/keymap.c b/layouts/community/ortho_4x12/ergodoxish/keymap.c new file mode 100644 index 000000000000..49600aa33e07 --- /dev/null +++ b/layouts/community/ortho_4x12/ergodoxish/keymap.c @@ -0,0 +1,214 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_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_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 / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/layouts/community/ortho_4x12/layout.json b/layouts/community/ortho_4x12/layout.json new file mode 100644 index 000000000000..9439b6e0bede --- /dev/null +++ b/layouts/community/ortho_4x12/layout.json @@ -0,0 +1,4 @@ +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""] \ No newline at end of file diff --git a/layouts/community/ortho_4x12/readme.md b/layouts/community/ortho_4x12/readme.md new file mode 100644 index 000000000000..6963727c6e2f --- /dev/null +++ b/layouts/community/ortho_4x12/readme.md @@ -0,0 +1,3 @@ +# ortho_4x12 + + LAYOUT_ortho_4x12 \ No newline at end of file diff --git a/layouts/community/ortho_4x4/layout.json b/layouts/community/ortho_4x4/layout.json new file mode 100644 index 000000000000..ef2a095267a3 --- /dev/null +++ b/layouts/community/ortho_4x4/layout.json @@ -0,0 +1,4 @@ +["","","",""], +["","","",""], +["","","",""], +["","","",""] diff --git a/layouts/community/ortho_4x4/readme.md b/layouts/community/ortho_4x4/readme.md new file mode 100644 index 000000000000..b7afef7b88d8 --- /dev/null +++ b/layouts/community/ortho_4x4/readme.md @@ -0,0 +1,3 @@ +# ortho_4x4 + + LAYOUT_ortho_4x4 \ No newline at end of file diff --git a/layouts/community/ortho_5x12/layout.json b/layouts/community/ortho_5x12/layout.json new file mode 100644 index 000000000000..9b12fa18250c --- /dev/null +++ b/layouts/community/ortho_5x12/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""] diff --git a/layouts/community/ortho_5x12/readme.md b/layouts/community/ortho_5x12/readme.md new file mode 100644 index 000000000000..b5037efecd7b --- /dev/null +++ b/layouts/community/ortho_5x12/readme.md @@ -0,0 +1,3 @@ +# ortho_5x12 + + LAYOUT_ortho_5x12 \ No newline at end of file diff --git a/layouts/community/ortho_5x15/layout.json b/layouts/community/ortho_5x15/layout.json new file mode 100644 index 000000000000..e7703827e88f --- /dev/null +++ b/layouts/community/ortho_5x15/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""] diff --git a/layouts/community/ortho_5x15/readme.md b/layouts/community/ortho_5x15/readme.md new file mode 100644 index 000000000000..137af0aeb09c --- /dev/null +++ b/layouts/community/ortho_5x15/readme.md @@ -0,0 +1,3 @@ +# ortho_5x15 + + LAYOUT_ortho_5x15 \ No newline at end of file diff --git a/layouts/default/60_ansi/default_60_ansi/keymap.c b/layouts/default/60_ansi/default_60_ansi/keymap.c new file mode 100644 index 000000000000..130dc19c4b0a --- /dev/null +++ b/layouts/default/60_ansi/default_60_ansi/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; \ No newline at end of file diff --git a/layouts/default/60_ansi/layout.json b/layouts/default/60_ansi/layout.json new file mode 100644 index 000000000000..b7e1d0fed2e7 --- /dev/null +++ b/layouts/default/60_ansi/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","","",{w:2.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/default/60_ansi/readme.md b/layouts/default/60_ansi/readme.md new file mode 100644 index 000000000000..15f51d3fa1b6 --- /dev/null +++ b/layouts/default/60_ansi/readme.md @@ -0,0 +1,3 @@ +# 60_ansi + + LAYOUT_60_ansi \ No newline at end of file diff --git a/layouts/default/60_iso/default_60_iso/keymap.c b/layouts/default/60_iso/default_60_iso/keymap.c new file mode 100644 index 000000000000..b9d932e7703f --- /dev/null +++ b/layouts/default/60_iso/default_60_iso/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, + KC_LCTRL, KC_LALT, KC_LGUI, KC_SPACE, KC_NO, KC_RGUI, KC_RALT, KC_MENU, KC_RCTL + ) +}; \ No newline at end of file diff --git a/layouts/default/60_iso/layout.json b/layouts/default/60_iso/layout.json new file mode 100644 index 000000000000..2b8493fca758 --- /dev/null +++ b/layouts/default/60_iso/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +[{w:1.25},"","","","","","","","","","","","",{w:2.75},""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] diff --git a/layouts/default/60_iso/readme.md b/layouts/default/60_iso/readme.md new file mode 100644 index 000000000000..42ff805fb68e --- /dev/null +++ b/layouts/default/60_iso/readme.md @@ -0,0 +1,3 @@ +# 60_iso + + LAYOUT_60_iso \ No newline at end of file diff --git a/layouts/default/ergodox/default_ergodox/keymap.c b/layouts/default/ergodox/default_ergodox/keymap.c new file mode 100644 index 000000000000..697b53f9f5ea --- /dev/null +++ b/layouts/default/ergodox/default_ergodox/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ergodox( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_EQL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, + KC_LCTL, KC_F4, KC_F5, KC_LGUI,KC_LALT, + KC_C, KC_V, + KC_PGUP, + KC_BSPC, KC_BSPC, KC_DEL, + + KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N , KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_A, + KC_PGDN, + KC_RCTL, KC_ENT, KC_SPC + ), +}; \ No newline at end of file diff --git a/layouts/default/ergodox/layout.json b/layouts/default/ergodox/layout.json new file mode 100644 index 000000000000..5348e91a68f2 --- /dev/null +++ b/layouts/default/ergodox/layout.json @@ -0,0 +1,26 @@ +[{x:3.5,a:7},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"","",{x:4.5},"",""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{x:6.5},""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""], +[{y:-0.75,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.875,x:5.5},"",{x:6.5},""], +[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""], +[{y:-0.375,x:3.5},"",{x:10.5},""], +[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""], +[{y:-0.75,x:0.5},"","",{x:14.5},"",""], +[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""], +[{h:2},"",{h:2},"",""], +[{x:2},""], +[{r:-30,rx:13,y:-1,x:-3},"",""], +[{x:-3},"",{h:2},"",{h:2},""], +[{x:-3},""] diff --git a/layouts/default/ergodox/readme.md b/layouts/default/ergodox/readme.md new file mode 100644 index 000000000000..ddbe1933c237 --- /dev/null +++ b/layouts/default/ergodox/readme.md @@ -0,0 +1,3 @@ +# ergodox + + LAYOUT_ergodox \ No newline at end of file diff --git a/layouts/default/ortho_4x12/default_ortho_4x12/keymap.c b/layouts/default/ortho_4x12/default_ortho_4x12/keymap.c new file mode 100644 index 000000000000..4a2f8fd955ec --- /dev/null +++ b/layouts/default/ortho_4x12/default_ortho_4x12/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x12( + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L + ) +}; \ No newline at end of file diff --git a/layouts/default/ortho_4x12/layout.json b/layouts/default/ortho_4x12/layout.json new file mode 100644 index 000000000000..9439b6e0bede --- /dev/null +++ b/layouts/default/ortho_4x12/layout.json @@ -0,0 +1,4 @@ +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""] \ No newline at end of file diff --git a/layouts/default/ortho_4x12/readme.md b/layouts/default/ortho_4x12/readme.md new file mode 100644 index 000000000000..6963727c6e2f --- /dev/null +++ b/layouts/default/ortho_4x12/readme.md @@ -0,0 +1,3 @@ +# ortho_4x12 + + LAYOUT_ortho_4x12 \ No newline at end of file diff --git a/layouts/default/ortho_4x4/default_ortho_4x4/keymap.c b/layouts/default/ortho_4x4/default_ortho_4x4/keymap.c new file mode 100644 index 000000000000..79581fa618bc --- /dev/null +++ b/layouts/default/ortho_4x4/default_ortho_4x4/keymap.c @@ -0,0 +1,10 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_A, KC_B, KC_C, KC_D, + KC_A, KC_B, KC_C, KC_D, + KC_A, KC_B, KC_C, KC_D, + KC_A, KC_B, KC_C, KC_D + ) +}; \ No newline at end of file diff --git a/layouts/default/ortho_4x4/layout.json b/layouts/default/ortho_4x4/layout.json new file mode 100644 index 000000000000..ef2a095267a3 --- /dev/null +++ b/layouts/default/ortho_4x4/layout.json @@ -0,0 +1,4 @@ +["","","",""], +["","","",""], +["","","",""], +["","","",""] diff --git a/layouts/default/ortho_4x4/readme.md b/layouts/default/ortho_4x4/readme.md new file mode 100644 index 000000000000..b7afef7b88d8 --- /dev/null +++ b/layouts/default/ortho_4x4/readme.md @@ -0,0 +1,3 @@ +# ortho_4x4 + + LAYOUT_ortho_4x4 \ No newline at end of file diff --git a/layouts/default/ortho_5x12/default_ortho_5x12/keymap.c b/layouts/default/ortho_5x12/default_ortho_5x12/keymap.c new file mode 100644 index 000000000000..89ad14bba7c0 --- /dev/null +++ b/layouts/default/ortho_5x12/default_ortho_5x12/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x12( + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L + ) +}; \ No newline at end of file diff --git a/layouts/default/ortho_5x12/layout.json b/layouts/default/ortho_5x12/layout.json new file mode 100644 index 000000000000..9b12fa18250c --- /dev/null +++ b/layouts/default/ortho_5x12/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""], +["","","","","","","","","","","",""] diff --git a/layouts/default/ortho_5x12/readme.md b/layouts/default/ortho_5x12/readme.md new file mode 100644 index 000000000000..b5037efecd7b --- /dev/null +++ b/layouts/default/ortho_5x12/readme.md @@ -0,0 +1,3 @@ +# ortho_5x12 + + LAYOUT_ortho_5x12 \ No newline at end of file diff --git a/layouts/default/ortho_5x15/default_ortho_5x15/keymap.c b/layouts/default/ortho_5x15/default_ortho_5x15/keymap.c new file mode 100644 index 000000000000..f67f32473806 --- /dev/null +++ b/layouts/default/ortho_5x15/default_ortho_5x15/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x15( + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, KC_J, KC_K, KC_L, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, KC_K, KC_L, KC_J, KC_K, KC_L + ) +}; \ No newline at end of file diff --git a/layouts/default/ortho_5x15/layout.json b/layouts/default/ortho_5x15/layout.json new file mode 100644 index 000000000000..e7703827e88f --- /dev/null +++ b/layouts/default/ortho_5x15/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""] diff --git a/layouts/default/ortho_5x15/readme.md b/layouts/default/ortho_5x15/readme.md new file mode 100644 index 000000000000..137af0aeb09c --- /dev/null +++ b/layouts/default/ortho_5x15/readme.md @@ -0,0 +1,3 @@ +# ortho_5x15 + + LAYOUT_ortho_5x15 \ No newline at end of file diff --git a/lib/chibios b/lib/chibios index 8fce03b3a75c..d34e8eb83101 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 8fce03b3a75c743e5d5c40b9d59c1637c59d22a7 +Subproject commit d34e8eb83101a95f98892bf68605fe545821f320 diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c924f2bd58e2..8e8570d26c58 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include #include //#include @@ -98,7 +99,6 @@ uint16_t note_position = 0; float (* notes_pointer)[][2]; uint16_t notes_count; bool notes_repeat; -float notes_rest; bool note_resting = false; uint8_t current_note = 0; @@ -119,9 +119,17 @@ audio_config_t audio_config; uint16_t envelope_index = 0; bool glissando = true; +#ifndef STARTUP_SONG + #define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +float startup_song[][2] = STARTUP_SONG; + void audio_init() { + if (audio_initialized) + return; + // Check EEPROM if (!eeconfig_is_enabled()) { @@ -169,6 +177,11 @@ void audio_init() #endif audio_initialized = true; + + if (audio_config.enable) { + PLAY_SONG(startup_song); + } + } void stop_all_notes() @@ -402,9 +415,12 @@ ISR(TIMER3_COMPA_vect) note_position++; bool end_of_note = false; if (TIMER_3_PERIOD > 0) { - end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF)); + if (!note_resting) + end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF - 1)); + else + end_of_note = (note_position >= (note_length)); } else { - end_of_note = (note_position >= (note_length * 0x7FF)); + end_of_note = (note_position >= (note_length)); } if (end_of_note) { @@ -419,11 +435,16 @@ ISR(TIMER3_COMPA_vect) return; } } - if (!note_resting && (notes_rest > 0)) { + if (!note_resting) { note_resting = true; - note_frequency = 0; - note_length = notes_rest; current_note--; + if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { + note_frequency = 0; + note_length = 1; + } else { + note_frequency = (*notes_pointer)[current_note][0]; + note_length = 1; + } } else { note_resting = false; envelope_index = 0; @@ -534,9 +555,12 @@ ISR(TIMER1_COMPA_vect) note_position++; bool end_of_note = false; if (TIMER_1_PERIOD > 0) { - end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF)); + if (!note_resting) + end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1)); + else + end_of_note = (note_position >= (note_length)); } else { - end_of_note = (note_position >= (note_length * 0x7FF)); + end_of_note = (note_position >= (note_length)); } if (end_of_note) { @@ -551,11 +575,16 @@ ISR(TIMER1_COMPA_vect) return; } } - if (!note_resting && (notes_rest > 0)) { + if (!note_resting) { note_resting = true; - note_frequency = 0; - note_length = notes_rest; current_note--; + if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { + note_frequency = 0; + note_length = 1; + } else { + note_frequency = (*notes_pointer)[current_note][0]; + note_length = 1; + } } else { note_resting = false; envelope_index = 0; @@ -624,7 +653,7 @@ void play_note(float freq, int vol) { } -void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) +void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) { if (!audio_initialized) { @@ -649,7 +678,6 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) notes_pointer = np; notes_count = n_count; notes_repeat = n_repeat; - notes_rest = n_rest; place = 0; current_note = 0; diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 27fdc2ab63de..79e0da2295fa 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -86,7 +86,7 @@ void play_sample(uint8_t * s, uint16_t l, bool r); void play_note(float freq, int vol); void stop_note(float freq); void stop_all_notes(void); -void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest); +void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat); #define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ @@ -98,8 +98,10 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) // length. This works around the limitation of C's sizeof operation on pointers. // The global float array for the song must be used here. #define NOTE_ARRAY_SIZE(x) ((int16_t)(sizeof(x) / (sizeof(x[0])))) -#define PLAY_NOTE_ARRAY(note_array, note_repeat, note_rest_style) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat), (note_rest_style)); - +#define PLAY_NOTE_ARRAY(note_array, note_repeat, deprecated_arg) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat)); \ + _Pragma ("message \"'PLAY_NOTE_ARRAY' macro is deprecated\"") +#define PLAY_SONG(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), false) +#define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true) bool is_playing_notes(void); diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index a3aaa2f1998b..647b69564016 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -51,12 +51,6 @@ #define ED_NOTE(n) EIGHTH_DOT_NOTE(n) #define SD_NOTE(n) SIXTEENTH_DOT_NOTE(n) -// Note Styles -// Staccato makes sure there is a rest between each note. Think: TA TA TA -// Legato makes notes flow together. Think: TAAA -#define STACCATO 0.01 -#define LEGATO 0 - // Note Timbre // Changes how the notes sound #define TIMBRE_12 0.125 @@ -65,7 +59,6 @@ #define TIMBRE_75 0.750 #define TIMBRE_DEFAULT TIMBRE_50 - // Notes - # = Octave #define NOTE_REST 0.00 diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index db2d1a94cd1c..f355d371bd35 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -18,9 +18,7 @@ #ifndef SONG_LIST_H #define SONG_LIST_H -#define COIN_SOUND \ - E__NOTE(_A5 ),\ - HD_NOTE(_E6 ), +#define NO_SOUND #define ODE_TO_JOY \ Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ @@ -55,18 +53,29 @@ E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \ E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), +#define STARTUP_SOUND \ + E__NOTE(_E6), \ + E__NOTE(_A6), \ + ED_NOTE(_E7), + #define GOODBYE_SOUND \ E__NOTE(_E7), \ E__NOTE(_A6), \ ED_NOTE(_E6), -#define STARTUP_SOUND \ +#define PLANCK_SOUND \ ED_NOTE(_E7 ), \ E__NOTE(_CS7), \ E__NOTE(_E6 ), \ E__NOTE(_A6 ), \ M__NOTE(_CS7, 20), +#define PREONIC_SOUND \ + M__NOTE(_B5, 20), \ + E__NOTE(_B6), \ + M__NOTE(_DS6, 20), \ + E__NOTE(_B6), + #define QWERTY_SOUND \ E__NOTE(_GS6 ), \ E__NOTE(_A6 ), \ @@ -107,7 +116,8 @@ S__NOTE(_REST), \ ED_NOTE(_E7 ), -#define MUSIC_SCALE_SOUND \ + +#define MUSIC_ON_SOUND \ E__NOTE(_A5 ), \ E__NOTE(_B5 ), \ E__NOTE(_CS6), \ @@ -117,6 +127,50 @@ E__NOTE(_GS6), \ E__NOTE(_A6 ), +#define MUSIC_SCALE_SOUND MUSIC_ON_SOUND + +#define MUSIC_OFF_SOUND \ + E__NOTE(_A6 ), \ + E__NOTE(_GS6 ), \ + E__NOTE(_FS6), \ + E__NOTE(_E6 ), \ + E__NOTE(_D6 ), \ + E__NOTE(_CS6), \ + E__NOTE(_B5), \ + E__NOTE(_A5 ), + +#define VOICE_CHANGE_SOUND \ + Q__NOTE(_A5 ), \ + Q__NOTE(_CS6), \ + Q__NOTE(_E6 ), \ + Q__NOTE(_A6 ), + +#define CHROMATIC_SOUND \ + Q__NOTE(_A5 ), \ + Q__NOTE(_AS5 ), \ + Q__NOTE(_B5), \ + Q__NOTE(_C6 ), \ + Q__NOTE(_CS6 ), + +#define MAJOR_SOUND \ + Q__NOTE(_A5 ), \ + Q__NOTE(_B5 ), \ + Q__NOTE(_CS6), \ + Q__NOTE(_D6 ), \ + Q__NOTE(_E6 ), + +#define GUITAR_SOUND \ + Q__NOTE(_E5 ), \ + Q__NOTE(_A5), \ + Q__NOTE(_D6 ), \ + Q__NOTE(_G6 ), + +#define VIOLIN_SOUND \ + Q__NOTE(_G5 ), \ + Q__NOTE(_D6), \ + Q__NOTE(_A6 ), \ + Q__NOTE(_E7 ), + #define CAPS_LOCK_ON_SOUND \ E__NOTE(_A3), \ E__NOTE(_B3), @@ -141,6 +195,16 @@ E__NOTE(_E5), \ E__NOTE(_D5), +#define AG_NORM_SOUND \ + E__NOTE(_A5), \ + E__NOTE(_A5), + +#define AG_SWAP_SOUND \ + SD_NOTE(_B5), \ + SD_NOTE(_A5), \ + SD_NOTE(_B5), \ + SD_NOTE(_A5), + #define UNICODE_WINDOWS \ E__NOTE(_B5), \ S__NOTE(_E6), diff --git a/quantum/config_common.h b/quantum/config_common.h index c88e02d918ae..4c6a702af460 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -100,4 +100,6 @@ #define API_SYSEX_MAX_SIZE 32 +#include "song_list.h" + #endif diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 1c522e8b8bae..b1460c53cceb 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -169,6 +169,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) } // translates key to keycode +__attribute__ ((weak)) uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) { // Read entire word (16bits) diff --git a/quantum/keymap_extras/keymap_steno.h b/quantum/keymap_extras/keymap_steno.h new file mode 100644 index 000000000000..4ce91cc13520 --- /dev/null +++ b/quantum/keymap_extras/keymap_steno.h @@ -0,0 +1,76 @@ +/* Copyright 2017 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef KEYMAP_STENO_H +#define KEYMAP_STENO_H + +#include "keymap.h" + +// List of keycodes for the steno keyboard. To prevent +// errors, this must be <= 42 total entries in order to +// support the GeminiPR protocol. +enum steno_keycodes { + STN__MIN = QK_STENO, + STN_FN = STN__MIN, + STN_NUM, + STN_N1 = STN_NUM, + STN_N2, + STN_N3, + STN_N4, + STN_N5, + STN_N6, + STN_SL, + STN_S1 = STN_SL, + STN_S2, + STN_TL, + STN_KL, + STN_PL, + STN_WL, + STN_HL, + STN_RL, + STN_A, + STN_O, + STN_STR, + STN_ST1 = STN_STR, + STN_ST2, + STN_RES1, + STN_RE1 = STN_RES1, + STN_RES2, + STN_RE2 = STN_RES2, + STN_PWR, + STN_ST3, + STN_ST4, + STN_E, + STN_U, + STN_FR, + STN_RR, + STN_PR, + STN_BR, + STN_LR, + STN_GR, + STN_TR, + STN_SR, + STN_DR, + STN_N7, + STN_N8, + STN_N9, + STN_NA, + STN_NB, + STN_NC, + STN_ZR, + STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT +}; + +#endif diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 0b6380ed39ab..32057ae8dc3e 100644 --- a/quantum/process_keycode/process_audio.c +++ b/quantum/process_keycode/process_audio.c @@ -1,10 +1,19 @@ #include "audio.h" #include "process_audio.h" +#ifndef VOICE_CHANGE_SONG + #define VOICE_CHANGE_SONG SONG(VOICE_CHANGE_SOUND) +#endif +float voice_change_song[][2] = VOICE_CHANGE_SONG; + +#ifndef PITCH_STANDARD_A + #define PITCH_STANDARD_A 440.0f +#endif + static float compute_freq_for_midi_note(uint8_t note) { // https://en.wikipedia.org/wiki/MIDI_tuning_standard - return pow(2.0, (note - 69) / 12.0) * 440.0f; + return pow(2.0, (note - 69) / 12.0) * PITCH_STANDARD_A; } bool process_audio(uint16_t keycode, keyrecord_t *record) { @@ -20,12 +29,9 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) { } if (keycode == AU_TOG && record->event.pressed) { - if (is_audio_on()) - { + if (is_audio_on()) { audio_off(); - } - else - { + } else { audio_on(); } return false; @@ -33,13 +39,13 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) { if (keycode == MUV_IN && record->event.pressed) { voice_iterate(); - music_scale_user(); + PLAY_SONG(voice_change_song); return false; } if (keycode == MUV_DE && record->event.pressed) { voice_deiterate(); - music_scale_user(); + PLAY_SONG(voice_change_song); return false; } diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c new file mode 100644 index 000000000000..d7978f91c7a2 --- /dev/null +++ b/quantum/process_keycode/process_key_lock.c @@ -0,0 +1,138 @@ +/* Copyright 2017 Fredric Silberberg + * + * 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 "inttypes.h" +#include "stdint.h" +#include "process_key_lock.h" + +#define BV_64(shift) (((uint64_t)1) << (shift)) +#define GET_KEY_ARRAY(code) (((code) < 0x40) ? key_state[0] : \ + ((code) < 0x80) ? key_state[1] : \ + ((code) < 0xC0) ? key_state[2] : key_state[3]) +#define GET_CODE_INDEX(code) (((code) < 0x40) ? (code) : \ + ((code) < 0x80) ? (code) - 0x40 : \ + ((code) < 0xC0) ? (code) - 0x80 : (code) - 0xC0) +#define KEY_STATE(code) (GET_KEY_ARRAY(code) & BV_64(GET_CODE_INDEX(code))) == BV_64(GET_CODE_INDEX(code)) +#define SET_KEY_ARRAY_STATE(code, val) do { \ + switch (code) { \ + case 0x00 ... 0x3F: \ + key_state[0] = (val); \ + break; \ + case 0x40 ... 0x7F: \ + key_state[1] = (val); \ + break; \ + case 0x80 ... 0xBF: \ + key_state[2] = (val); \ + break; \ + case 0xC0 ... 0xFF: \ + key_state[3] = (val); \ + break; \ + } \ +} while(0) +#define SET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code) | BV_64(GET_CODE_INDEX(code)))) +#define UNSET_KEY_STATE(code) SET_KEY_ARRAY_STATE(code, (GET_KEY_ARRAY(code)) & ~(BV_64(GET_CODE_INDEX(code)))) +#define IS_STANDARD_KEYCODE(code) ((code) <= 0xFF) + +// Locked key state. This is an array of 256 bits, one for each of the standard keys supported qmk. +uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 }; +bool watching = false; + +// Translate any OSM keycodes back to their unmasked versions. +uint16_t inline translate_keycode(uint16_t keycode) { + if (keycode > QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX) { + return keycode ^ QK_ONE_SHOT_MOD; + } else { + return keycode; + } +} + +bool process_key_lock(uint16_t *keycode, keyrecord_t *record) { + // We start by categorizing the keypress event. In the event of a down + // event, there are several possibilities: + // 1. The key is not being locked, and we are not watching for new keys. + // In this case, we bail immediately. This is the common case for down events. + // 2. The key was locked, and we need to unlock it. In this case, we will + // reset the state in our map and return false. When the user releases the + // key, the up event will no longer be masked and the OS will observe the + // released key. + // 3. KC_LOCK was just pressed. In this case, we set up the state machine + // to watch for the next key down event, and finish processing + // 4. The keycode is below 0xFF, and we are watching for new keys. In this case, + // we will send the key down event to the os, and set the key_state for that + // key to mask the up event. + // 5. The keycode is above 0xFF, and we're wathing for new keys. In this case, + // the user pressed a key that we cannot "lock", as it's a series of keys, + // or a macro invocation, or a layer transition, or a custom-defined key, or + // or some other arbitrary code. In this case, we bail immediately, reset + // our watch state, and return true. + // + // In the event of an up event, there are these possibilities: + // 1. The key is not being locked. In this case, we return true and bail + // immediately. This is the common case. + // 2. The key is being locked. In this case, we will mask the up event + // by returning false, so the OS never sees that the key was released + // until the user pressed the key again. + + // We translate any OSM keycodes back to their original keycodes, so that if the key being + // one-shot modded is a standard keycode, we can handle it. This is the only set of special + // keys that we handle + uint16_t translated_keycode = translate_keycode(*keycode); + + if (record->event.pressed) { + // Non-standard keycode, reset and return + if (!(IS_STANDARD_KEYCODE(translated_keycode) || translated_keycode == KC_LOCK)) { + watching = false; + return true; + } + + // If we're already watching, turn off the watch. + if (translated_keycode == KC_LOCK) { + watching = !watching; + return false; + } + + if (IS_STANDARD_KEYCODE(translated_keycode)) { + // We check watching first. This is so that in the following scenario, we continue to + // hold the key: KC_LOCK, KC_F, KC_LOCK, KC_F + // If we checked in reverse order, we'd end up holding the key pressed after the second + // KC_F press is registered, when the user likely meant to hold F + if (watching) { + watching = false; + SET_KEY_STATE(translated_keycode); + // We need to set the keycode passed in to be the translated keycode, in case we + // translated a OSM back to the original keycode. + *keycode = translated_keycode; + // Let the standard keymap send the keycode down event. The up event will be masked. + return true; + } + + if (KEY_STATE(translated_keycode)) { + UNSET_KEY_STATE(translated_keycode); + // The key is already held, stop this process. The up event will be sent when the user + // releases the key. + return false; + } + } + + // Either the key isn't a standard key, or we need to send the down event. Continue standard + // processing + return true; + } else { + // Stop processing if it's a standard key and we're masking up. + return !(IS_STANDARD_KEYCODE(translated_keycode) && KEY_STATE(translated_keycode)); + } +} + diff --git a/quantum/process_keycode/process_key_lock.h b/quantum/process_keycode/process_key_lock.h new file mode 100644 index 000000000000..876db4a324c4 --- /dev/null +++ b/quantum/process_keycode/process_key_lock.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Fredric Silberberg + * + * 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 PROCESS_KEY_LOCK_H +#define PROCESS_KEY_LOCK_H + +#include "quantum.h" + +bool process_key_lock(uint16_t *keycode, keyrecord_t *record); + +#endif // PROCESS_KEY_LOCK_H diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index 473906d65784..e0fe4765483e 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -14,6 +14,8 @@ * along with this program. If not, see . */ +#ifndef DISABLE_LEADER + #include "process_leader.h" __attribute__ ((weak)) @@ -52,3 +54,5 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) { } return true; } + +#endif diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 217dca28076f..63841d1e8754 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -27,6 +27,7 @@ bool music_activated = false; uint8_t music_starting_note = 0x0C; int music_offset = 7; +uint8_t music_mode = MUSIC_MODE_CHROMATIC; // music sequencer static bool music_sequence_recording = false; @@ -39,6 +40,39 @@ static uint8_t music_sequence_position = 0; static uint16_t music_sequence_timer = 0; static uint16_t music_sequence_interval = 100; +#ifdef AUDIO_ENABLE + #ifndef MUSIC_ON_SONG + #define MUSIC_ON_SONG SONG(MUSIC_ON_SOUND) + #endif + #ifndef MUSIC_OFF_SONG + #define MUSIC_OFF_SONG SONG(MUSIC_OFF_SOUND) + #endif + #ifndef CHROMATIC_SONG + #define CHROMATIC_SONG SONG(CHROMATIC_SOUND) + #endif + #ifndef GUITAR_SONG + #define GUITAR_SONG SONG(GUITAR_SOUND) + #endif + #ifndef VIOLIN_SONG + #define VIOLIN_SONG SONG(VIOLIN_SOUND) + #endif + #ifndef MAJOR_SONG + #define MAJOR_SONG SONG(MAJOR_SOUND) + #endif + float music_mode_songs[NUMBER_OF_MODES][5][2] = { + CHROMATIC_SONG, + GUITAR_SONG, + VIOLIN_SONG, + MAJOR_SONG + }; + float music_on_song[][2] = MUSIC_ON_SONG; + float music_off_song[][2] = MUSIC_OFF_SONG; +#endif + +#ifndef MUSIC_MASK + #define MUSIC_MASK keycode < 0xFF +#endif + static void music_noteon(uint8_t note) { #ifdef AUDIO_ENABLE process_audio_noteon(note); @@ -79,70 +113,71 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { } if (keycode == MU_TOG && record->event.pressed) { - if (music_activated) - { + if (music_activated) { music_off(); - } - else - { + } else { music_on(); } return false; } - if (music_activated) { + if (keycode == MU_MOD && record->event.pressed) { + music_mode_cycle(); + return false; + } - if (keycode == KC_LCTL && record->event.pressed) { // Start recording - music_all_notes_off(); - music_sequence_recording = true; - music_sequence_recorded = false; - music_sequence_playing = false; - music_sequence_count = 0; - return false; - } + if (music_activated) { + if (record->event.pressed) { + if (keycode == KC_LCTL) { // Start recording + music_all_notes_off(); + music_sequence_recording = true; + music_sequence_recorded = false; + music_sequence_playing = false; + music_sequence_count = 0; + return false; + } - if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing - music_all_notes_off(); - if (music_sequence_recording) { // was recording - music_sequence_recorded = true; + if (keycode == KC_LALT) { // Stop recording/playing + music_all_notes_off(); + if (music_sequence_recording) { // was recording + music_sequence_recorded = true; + } + music_sequence_recording = false; + music_sequence_playing = false; + return false; } - music_sequence_recording = false; - music_sequence_playing = false; - return false; - } - if (keycode == KC_LGUI && record->event.pressed && music_sequence_recorded) { // Start playing - music_all_notes_off(); - music_sequence_recording = false; - music_sequence_playing = true; - music_sequence_position = 0; - music_sequence_timer = 0; - return false; - } + if (keycode == KC_LGUI && music_sequence_recorded) { // Start playing + music_all_notes_off(); + music_sequence_recording = false; + music_sequence_playing = true; + music_sequence_position = 0; + music_sequence_timer = 0; + return false; + } - if (keycode == KC_UP) { - if (record->event.pressed) - music_sequence_interval-=10; - return false; - } + if (keycode == KC_UP) { + music_sequence_interval-=10; + return false; + } - if (keycode == KC_DOWN) { - if (record->event.pressed) - music_sequence_interval+=10; - return false; + if (keycode == KC_DOWN) { + music_sequence_interval+=10; + return false; + } } - #define MUSIC_MODE_GUITAR - - #ifdef MUSIC_MODE_CHROMATIC - uint8_t note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); - #elif defined(MUSIC_MODE_GUITAR) - uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); - #elif defined(MUSIC_MODE_VIOLIN) - uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row); - #else - uint8_t note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row); - #endif + uint8_t note; + if (music_mode == MUSIC_MODE_CHROMATIC) + note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row); + else if (music_mode == MUSIC_MODE_GUITAR) + note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row); + else if (music_mode == MUSIC_MODE_VIOLIN) + note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row); + else if (music_mode == MUSIC_MODE_MAJOR) + note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row); + else + note = music_starting_note; if (record->event.pressed) { music_noteon(note); @@ -154,7 +189,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { music_noteoff(note); } - if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through + if (MUSIC_MASK) return false; } @@ -175,12 +210,26 @@ void music_toggle(void) { void music_on(void) { music_activated = 1; + #ifdef AUDIO_ENABLE + PLAY_SONG(music_on_song); + #endif music_on_user(); } void music_off(void) { - music_activated = 0; music_all_notes_off(); + music_activated = 0; + #ifdef AUDIO_ENABLE + PLAY_SONG(music_off_song); + #endif +} + +void music_mode_cycle(void) { + music_all_notes_off(); + music_mode = (music_mode + 1) % NUMBER_OF_MODES; + #ifdef AUDIO_ENABLE + PLAY_SONG(music_mode_songs[music_mode]); + #endif } void matrix_scan_music(void) { diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 8dfbf041f4a2..ee027197c2e7 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -21,6 +21,14 @@ #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) +enum music_modes { + MUSIC_MODE_CHROMATIC, + MUSIC_MODE_GUITAR, + MUSIC_MODE_VIOLIN, + MUSIC_MODE_MAJOR, + NUMBER_OF_MODES +}; + bool process_music(uint16_t keycode, keyrecord_t *record); bool is_music_on(void); @@ -31,6 +39,7 @@ void music_off(void); void music_on_user(void); void music_scale_user(void); void music_all_notes_off(void); +void music_mode_cycle(void); void matrix_scan_music(void); diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c new file mode 100644 index 000000000000..16bbf154fd0c --- /dev/null +++ b/quantum/process_keycode/process_steno.c @@ -0,0 +1,165 @@ +/* Copyright 2017 Joseph Wasson + * + * 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 "process_steno.h" +#include "quantum_keycodes.h" +#include "eeprom.h" +#include "keymap_steno.h" +#include "virtser.h" + +// TxBolt Codes +#define TXB_NUL 0 +#define TXB_S_L 0b00000001 +#define TXB_T_L 0b00000010 +#define TXB_K_L 0b00000100 +#define TXB_P_L 0b00001000 +#define TXB_W_L 0b00010000 +#define TXB_H_L 0b00100000 +#define TXB_R_L 0b01000001 +#define TXB_A_L 0b01000010 +#define TXB_O_L 0b01000100 +#define TXB_STR 0b01001000 +#define TXB_E_R 0b01010000 +#define TXB_U_R 0b01100000 +#define TXB_F_R 0b10000001 +#define TXB_R_R 0b10000010 +#define TXB_P_R 0b10000100 +#define TXB_B_R 0b10001000 +#define TXB_L_R 0b10010000 +#define TXB_G_R 0b10100000 +#define TXB_T_R 0b11000001 +#define TXB_S_R 0b11000010 +#define TXB_D_R 0b11000100 +#define TXB_Z_R 0b11001000 +#define TXB_NUM 0b11010000 + +#define TXB_GRP0 0b00000000 +#define TXB_GRP1 0b01000000 +#define TXB_GRP2 0b10000000 +#define TXB_GRP3 0b11000000 +#define TXB_GRPMASK 0b11000000 + +#define TXB_GET_GROUP(code) ((code & TXB_GRPMASK) >> 6) + +#define BOLT_STATE_SIZE 4 +#define GEMINI_STATE_SIZE 6 +#define MAX_STATE_SIZE GEMINI_STATE_SIZE + +uint8_t state[MAX_STATE_SIZE] = {0}; +uint8_t pressed = 0; +steno_mode_t mode; + +uint8_t boltmap[64] = { + TXB_NUL, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, + TXB_S_L, TXB_S_L, TXB_T_L, TXB_K_L, TXB_P_L, TXB_W_L, TXB_H_L, + TXB_R_L, TXB_A_L, TXB_O_L, TXB_STR, TXB_STR, TXB_NUL, TXB_NUL, + TXB_NUL, TXB_STR, TXB_STR, TXB_E_R, TXB_U_R, TXB_F_R, TXB_R_R, + TXB_P_R, TXB_B_R, TXB_L_R, TXB_G_R, TXB_T_R, TXB_S_R, TXB_D_R, + TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R +}; + +void steno_clear_state(void) { + __builtin_memset(state, 0, sizeof(state)); +} + +void steno_init() { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + mode = eeprom_read_byte(EECONFIG_STENOMODE); +} + +void steno_set_mode(steno_mode_t new_mode) { + steno_clear_state(); + mode = new_mode; + eeprom_update_byte(EECONFIG_STENOMODE, mode); +} + +void send_steno_state(uint8_t size, bool send_empty) { + for (uint8_t i = 0; i < size; ++i) { + if (state[i] || send_empty) { + virtser_send(state[i]); + } + } + steno_clear_state(); +} + +bool update_state_bolt(uint8_t key) { + uint8_t boltcode = boltmap[key]; + state[TXB_GET_GROUP(boltcode)] |= boltcode; + return false; +} + +bool send_state_bolt(void) { + send_steno_state(BOLT_STATE_SIZE, false); + virtser_send(0); // terminating byte + return false; +} + +bool update_state_gemini(uint8_t key) { + state[key / 7] |= 1 << (6 - (key % 7)); + return false; +} + +bool send_state_gemini(void) { + state[0] |= 0x80; // Indicate start of packet + send_steno_state(GEMINI_STATE_SIZE, true); + return false; +} + +bool process_steno(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_STENO_BOLT: + if (IS_PRESSED(record->event)) { + steno_set_mode(STENO_MODE_BOLT); + } + return false; + + case QK_STENO_GEMINI: + if (IS_PRESSED(record->event)) { + steno_set_mode(STENO_MODE_GEMINI); + } + return false; + + case STN__MIN...STN__MAX: + if (IS_PRESSED(record->event)) { + uint8_t key = keycode - QK_STENO; + ++pressed; + switch(mode) { + case STENO_MODE_BOLT: + return update_state_bolt(key); + case STENO_MODE_GEMINI: + return update_state_gemini(key); + default: + return false; + } + } else { + --pressed; + if (pressed <= 0) { + pressed = 0; + switch(mode) { + case STENO_MODE_BOLT: + return send_state_bolt(); + case STENO_MODE_GEMINI: + return send_state_gemini(); + default: + return false; + } + } + } + + } + return true; +} diff --git a/quantum/process_keycode/process_steno.h b/quantum/process_keycode/process_steno.h new file mode 100644 index 000000000000..3bbcbeaaf8a5 --- /dev/null +++ b/quantum/process_keycode/process_steno.h @@ -0,0 +1,31 @@ +/* Copyright 2017 Joseph Wasson + * + * 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 PROCESS_STENO_H +#define PROCESS_STENO_H + +#include "quantum.h" + +#if defined(STENO_ENABLE) && !defined(VIRTSER_ENABLE) + #error "must have virtser enabled to use steno" +#endif + +typedef enum { STENO_MODE_BOLT, STENO_MODE_GEMINI } steno_mode_t; + +bool process_steno(uint16_t keycode, keyrecord_t *record); +void steno_init(void); +void steno_set_mode(steno_mode_t mode); + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 4fd45810bb54..00870c4e7f54 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -41,6 +41,24 @@ void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data) { } } +void qk_tap_dance_dual_role_finished (qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data; + + if (state->count == 1) { + register_code16 (pair->kc); + } else if (state->count == 2) { + layer_invert (pair->layer); + } +} + +void qk_tap_dance_dual_role_reset (qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *pair = (qk_tap_dance_dual_role_t *)user_data; + + if (state->count == 1) { + unregister_code16 (pair->kc); + } +} + static inline void _process_tap_dance_action_fn (qk_tap_dance_state_t *state, void *user_data, qk_tap_dance_user_fn_t fn) diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index f42c154a056d..37a27c5366f8 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -54,11 +54,22 @@ typedef struct uint16_t kc2; } qk_tap_dance_pair_t; +typedef struct +{ + uint16_t kc; + uint8_t layer; +} qk_tap_dance_dual_role_t; + #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ } +#define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) { \ + .fn = { NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, \ + .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer }), \ + } + #define ACTION_TAP_DANCE_FN(user_fn) { \ .fn = { NULL, user_fn, NULL }, \ .user_data = NULL, \ @@ -86,6 +97,9 @@ void reset_tap_dance (qk_tap_dance_state_t *state); void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data); void qk_tap_dance_pair_reset (qk_tap_dance_state_t *state, void *user_data); +void qk_tap_dance_dual_role_finished (qk_tap_dance_state_t *state, void *user_data); +void qk_tap_dance_dual_role_reset (qk_tap_dance_state_t *state, void *user_data); + #else #define TD(n) KC_NO diff --git a/quantum/quantum.c b/quantum/quantum.c index 36e586d3160a..65213eaea7b3 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -30,6 +30,24 @@ extern backlight_config_t backlight_config; #include "fauxclicky.h" #endif +#ifdef AUDIO_ENABLE + #ifndef GOODBYE_SONG + #define GOODBYE_SONG SONG(GOODBYE_SOUND) + #endif + #ifndef AG_NORM_SONG + #define AG_NORM_SONG SONG(AG_NORM_SOUND) + #endif + #ifndef AG_SWAP_SONG + #define AG_SWAP_SONG SONG(AG_SWAP_SOUND) + #endif + float goodbye_song[][2] = GOODBYE_SONG; + float ag_norm_song[][2] = AG_NORM_SONG; + float ag_swap_song[][2] = AG_SWAP_SONG; + #ifdef DEFAULT_LAYER_SONGS + float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; + #endif +#endif + static void do_code16 (uint16_t code, void (*f) (uint8_t)) { switch (code) { case QK_MODS ... QK_MODS_MAX: @@ -116,9 +134,15 @@ void reset_keyboard(void) { clear_keyboard(); #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_ENABLE_BASIC)) music_all_notes_off(); + uint16_t timer_start = timer_read(); + PLAY_SONG(goodbye_song); shutdown_user(); -#endif + while(timer_elapsed(timer_start) < 250) + wait_ms(1); + stop_all_notes(); +#else wait_ms(250); +#endif #ifdef CATERINA_BOOTLOADER *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific #endif @@ -137,6 +161,11 @@ void reset_keyboard(void) { static bool shift_interrupted[2] = {0, 0}; static uint16_t scs_timer[2] = {0, 0}; +/* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. + * Used to ensure that the correct keycode is released if the key is released. + */ +static bool grave_esc_was_shifted = false; + bool process_record_quantum(keyrecord_t *record) { /* This gets the keycode from the key pressed */ @@ -168,6 +197,10 @@ bool process_record_quantum(keyrecord_t *record) { // } if (!( + #if defined(KEY_LOCK_ENABLE) + // Must run first to be able to mask key_up events. + process_key_lock(&keycode, record) && + #endif process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && @@ -175,6 +208,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef AUDIO_ENABLE process_audio(keycode, record) && #endif + #ifdef STENO_ENABLE + process_steno(keycode, record) && + #endif #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif @@ -351,6 +387,9 @@ bool process_record_quantum(keyrecord_t *record) { case MAGIC_SWAP_ALT_GUI: keymap_config.swap_lalt_lgui = true; keymap_config.swap_ralt_rgui = true; + #ifdef AUDIO_ENABLE + PLAY_SONG(ag_swap_song); + #endif break; case MAGIC_UNSWAP_CONTROL_CAPSLOCK: keymap_config.swap_control_capslock = false; @@ -379,6 +418,9 @@ bool process_record_quantum(keyrecord_t *record) { case MAGIC_UNSWAP_ALT_GUI: keymap_config.swap_lalt_lgui = false; keymap_config.swap_ralt_rgui = false; + #ifdef AUDIO_ENABLE + PLAY_SONG(ag_norm_song); + #endif break; case MAGIC_TOGGLE_NKRO: keymap_config.nkro = !keymap_config.nkro; @@ -438,12 +480,25 @@ bool process_record_quantum(keyrecord_t *record) { // break; } case GRAVE_ESC: { - void (*method)(uint8_t) = (record->event.pressed) ? &add_key : &del_key; uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT) |MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))); - method(shifted ? KC_GRAVE : KC_ESCAPE); - send_keyboard_report(); +#ifdef GRAVE_ESC_CTRL_OVERRIDE + // if CTRL is pressed, ESC is always read as ESC, even if SHIFT or GUI is pressed. + // this is handy for the ctrl+shift+esc shortcut on windows, among other things. + if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))) + shifted = 0; +#endif + + if (record->event.pressed) { + grave_esc_was_shifted = shifted; + add_key(shifted ? KC_GRAVE : KC_ESCAPE); + } + else { + del_key(grave_esc_was_shifted ? KC_GRAVE : KC_ESCAPE); + } + + send_keyboard_report(); } default: { shift_interrupted[0] = true; @@ -521,6 +576,14 @@ void send_string_with_delay(const char *str, uint8_t interval) { } } +void set_single_persistent_default_layer(uint8_t default_layer) { + #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) + PLAY_SONG(default_layer_songs[default_layer]); + #endif + eeconfig_update_default_layer(1U<> 4) + 2) &= ~_BV(backlight_pin & 0xF); // #endif #endif - } + } #ifndef NO_BACKLIGHT_CLOCK else if ( level == BACKLIGHT_LEVELS ) { // Turn on PWM control of backlight pin TCCR1A |= _BV(COM1x1); // Set the brightness OCR1x = 0xFFFF; - } + } else { // Turn on PWM control of backlight pin TCCR1A |= _BV(COM1x1); @@ -705,7 +771,7 @@ uint8_t backlight_tick = 0; void backlight_task(void) { #ifdef NO_BACKLIGHT_CLOCK - if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { #if BACKLIGHT_ON_STATE == 0 // PORTx &= ~n _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); diff --git a/quantum/quantum.h b/quantum/quantum.h index e00fe234644b..9a6d691a1556 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -56,9 +56,14 @@ extern uint32_t default_layer_state; #endif // MIDI_ENABLE #ifdef AUDIO_ENABLE + #include "audio.h" #include "process_audio.h" #endif +#ifdef STENO_ENABLE + #include "process_steno.h" +#endif + #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) #include "process_music.h" #endif @@ -94,6 +99,10 @@ extern uint32_t default_layer_state; #include "process_combo.h" #endif +#ifdef KEY_LOCK_ENABLE + #include "process_key_lock.h" +#endif + #define SEND_STRING(str) send_string(PSTR(str)) extern const bool ascii_to_shift_lut[0x80]; extern const uint8_t ascii_to_keycode_lut[0x80]; @@ -103,6 +112,8 @@ void send_string_with_delay(const char *str, uint8_t interval); // For tri-layer void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); +void set_single_persistent_default_layer(uint8_t default_layer); + void tap_random_base64(void); #define IS_LAYER_ON(layer) (layer_state & (1UL << (layer))) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 6038e31c46b5..1bb6706ba4c0 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -26,6 +26,10 @@ #endif #endif +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + enum quantum_keycodes { // Ranges used in shortucuts - not to be used directly QK_TMK = 0x0000, @@ -67,6 +71,12 @@ enum quantum_keycodes { QK_TAP_DANCE_MAX = 0x57FF, QK_LAYER_TAP_TOGGLE = 0x5800, QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, +#ifdef STENO_ENABLE + QK_STENO = 0x5A00, + QK_STENO_BOLT = 0x5A30, + QK_STENO_GEMINI = 0x5A31, + QK_STENO_MAX = 0x5A3F, +#endif QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, #if defined(UNICODEMAP_ENABLE) && defined(UNICODE_ENABLE) @@ -128,6 +138,9 @@ enum quantum_keycodes { MU_OFF, MU_TOG, + // Music mode cycle + MU_MOD, + // Music voice iterate MUV_IN, MUV_DE, @@ -406,6 +419,10 @@ enum quantum_keycodes { OUT_BT, #endif +#ifdef KEY_LOCK_ENABLE + KC_LOCK, +#endif + // always leave at the end SAFE_RANGE }; diff --git a/quantum/template/config.h b/quantum/template/config.h index dbca45765d1f..700a56f527cd 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -67,6 +67,11 @@ along with this program. If not, see . /* 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 * diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk index 102d23b7effe..671b63ea2ca2 100644 --- a/quantum/visualizer/visualizer.mk +++ b/quantum/visualizer/visualizer.mk @@ -91,7 +91,7 @@ GDISP_DRIVER_LIST := $(subst $(GDISP_LIST_SPACE),$(GDISP_LIST_COMMA),$(GDISP_DRI GFXDEFS +=-DGDISP_DRIVER_LIST="$(GDISP_DRIVER_LIST)" ifneq ("$(wildcard $(KEYMAP_PATH)/visualizer.c)","") - SRC += keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/visualizer.c + SRC += $(KEYMAP_PATH)/visualizer.c else ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/visualizer.c)","") ifeq ("$(wildcard $(SUBPROJECT_PATH)/visualizer.c)","") diff --git a/readme.md b/readme.md index 6cdce72400cc..781b9f615dd7 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,6 @@ # Quantum Mechanical Keyboard Firmware +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) [![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware) [![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) diff --git a/secrets.tar.enc b/secrets.tar.enc index 03fdf41c8bdc..6c613fed98cc 100644 Binary files a/secrets.tar.enc and b/secrets.tar.enc differ diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 4af34ba57419..95aa973aa916 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -144,6 +144,24 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep fi $(DFU_PROGRAMMER) $(MCU) reset +avrdude: $(BUILD_DIR)/$(TARGET).hex + if grep -q -s Microsoft /proc/version; then \ + echo 'ERROR: Pro Micros can not be flashed within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ + else \ + ls /dev/tty* > /tmp/1; \ + echo "Detecting Pro Micro port, reset your Pro Micro now.\c"; \ + while [ -z $$USB ]; do \ + sleep 1; \ + echo ".\c"; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + echo ""; \ + echo "Detected Pro Micro port at $$USB"; \ + sleep 1; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + fi + # Convert hex to bin. flashbin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 58d919a04d50..c6a166a823e6 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -188,10 +188,10 @@ action_t store_or_get_action(bool pressed, keypos_t key) int8_t layer_switch_get_layer(keypos_t key) { +#ifndef NO_ACTION_LAYER action_t action; action.code = ACTION_TRANSPARENT; -#ifndef NO_ACTION_LAYER uint32_t layers = layer_state | default_layer_state; /* check top layer first */ for (int8_t i = 31; i >= 0; i--) { diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 140d2b85bb9f..e2eb4a38e3d2 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -19,6 +19,9 @@ void eeconfig_init(void) #ifdef RGBLIGHT_ENABLE eeprom_update_dword(EECONFIG_RGBLIGHT, 0); #endif +#ifdef STENO_ENABLE + eeprom_update_byte(EECONFIG_STENOMODE, 0); +#endif } void eeconfig_enable(void) diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 280dc7ab67e7..1397a90c79ff 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -34,6 +34,9 @@ along with this program. If not, see . #define EECONFIG_AUDIO (uint8_t *)7 #define EECONFIG_RGBLIGHT (uint32_t *)8 #define EECONFIG_UNICODEMODE (uint8_t *)12 +#define EECONFIG_STENOMODE (uint8_t *)13 +// EEHANDS for two handed boards +#define EECONFIG_HANDEDNESS (uint8_t *)14 /* debug bit */ diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 97a8f1cd8c4e..9466e10e2d41 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -51,6 +51,9 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE # include "rgblight.h" #endif +#ifdef STENO_ENABLE +# include "process_steno.h" +#endif #ifdef FAUXCLICKY_ENABLE # include "fauxclicky.h" #endif @@ -139,6 +142,9 @@ void keyboard_init(void) { #ifdef RGBLIGHT_ENABLE rgblight_init(); #endif +#ifdef STENO_ENABLE + steno_init(); +#endif #ifdef FAUXCLICKY_ENABLE fauxclicky_init(); #endif diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 54e9c322c1df..a1e0bc9a47fe 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -94,6 +94,9 @@ along with this program. If not, see . #define KC_JYEN KC_INT3 #define KC_HENK KC_INT4 #define KC_MHEN KC_INT5 +/* Korean specific */ +#define KC_HAEN KC_LANG1 +#define KC_HANJ KC_LANG2 /* Keypad */ #define KC_P1 KC_KP_1 #define KC_P2 KC_KP_2 @@ -113,6 +116,11 @@ along with this program. If not, see . #define KC_PPLS KC_KP_PLUS #define KC_PEQL KC_KP_EQUAL #define KC_PENT KC_KP_ENTER +/* Unix function key */ +#define KC_EXEC KC_EXECUTE +#define KC_SLCT KC_SELECT +#define KC_AGIN KC_AGAIN +#define KC_PSTE KC_PASTE /* Mousekey */ #define KC_MS_U KC_MS_UP #define KC_MS_D KC_MS_DOWN diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 23469476e264..aa128f0e87dd 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -55,6 +55,14 @@ uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; static uint16_t last_timer = 0; +inline int8_t times_inv_sqrt2(int8_t x) +{ + // 181/256 is pretty close to 1/sqrt(2) + // 0.70703125 0.707106781 + // 1 too small for x=99 and x=198 + // This ends up being a mult and discard lower 8 bits + return (x * 181) >> 8; +} static uint8_t move_unit(void) { @@ -111,10 +119,10 @@ void mousekey_task(void) if (mouse_report.y > 0) mouse_report.y = move_unit(); if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; - /* diagonal move [1/sqrt(2) = 0.7] */ + /* diagonal move [1/sqrt(2)] */ if (mouse_report.x && mouse_report.y) { - mouse_report.x *= 0.7; - mouse_report.y *= 0.7; + mouse_report.x = times_inv_sqrt2(mouse_report.x); + mouse_report.y = times_inv_sqrt2(mouse_report.y); } if (mouse_report.v > 0) mouse_report.v = wheel_unit(); diff --git a/tmk_core/protocol/lufa/descriptor.h b/tmk_core/protocol/lufa/descriptor.h index cde44abc9be8..43001c977817 100644 --- a/tmk_core/protocol/lufa/descriptor.h +++ b/tmk_core/protocol/lufa/descriptor.h @@ -238,7 +238,8 @@ typedef struct # define CDC_OUT_EPNUM MIDI_STREAM_OUT_EPNUM #endif -#if defined(__AVR_ATmega32U2__) && CDC_OUT_EPNUM > 4 +#if (defined(__AVR_ATmega32U2__) && CDC_OUT_EPNUM > 4) || \ + (defined(__AVR_ATmega32U4__) && CDC_OUT_EPNUM > 6) # error "Endpoints are not available enough to support all functions. Remove some in Makefile.(MOUSEKEY, EXTRAKEY, CONSOLE, NKRO, MIDI, SERIAL)" #endif diff --git a/tmk_core/protocol/usb_hid.mk b/tmk_core/protocol/usb_hid.mk index 1f79bda3bd64..e7200809790d 100644 --- a/tmk_core/protocol/usb_hid.mk +++ b/tmk_core/protocol/usb_hid.mk @@ -43,7 +43,6 @@ SRC += $(USB_HID_DIR)/override_Serial.cpp # replace arduino/wiring.c SRC += $(USB_HID_DIR)/override_wiring.c -SRC += common/avr/timer.c SRC += $(USB_HOST_SHIELD_SRC) SRC += $(ARDUINO_CORES_SRC) diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/readme.md b/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/README.md similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/readme.md rename to tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/README.md diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/readme.md b/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/readme.md rename to tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md diff --git a/tmk_core/protocol/usb_hid/parser.cpp b/tmk_core/protocol/usb_hid/parser.cpp index 1a152ff3f2a1..94e747ca4b83 100644 --- a/tmk_core/protocol/usb_hid/parser.cpp +++ b/tmk_core/protocol/usb_hid/parser.cpp @@ -4,30 +4,14 @@ #include "debug.h" -report_keyboard_t usb_hid_keyboard_report; -uint16_t usb_hid_time_stamp; - - void KBDReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) { - bool is_error = false; - report_keyboard_t *report = (report_keyboard_t *)buf; + ::memcpy(&report, buf, sizeof(report_keyboard_t)); + time_stamp = millis(); - dprintf("KBDReport: %02X %02X", report->mods, report->reserved); + dprintf("input %d: %02X %02X", hid->GetAddress(), report.mods, report.reserved); for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - if (IS_ERROR(report->keys[i])) { - is_error = true; - } - dprintf(" %02X", report->keys[i]); + dprintf(" %02X", report.keys[i]); } dprint("\r\n"); - - // ignore error and not send report to computer - if (is_error) { - dprint("Error usage! \r\n"); - return; - } - - ::memcpy(&usb_hid_keyboard_report, buf, sizeof(report_keyboard_t)); - usb_hid_time_stamp = millis(); } diff --git a/tmk_core/protocol/usb_hid/parser.h b/tmk_core/protocol/usb_hid/parser.h index 703eb1ed4ce6..036281fa6613 100644 --- a/tmk_core/protocol/usb_hid/parser.h +++ b/tmk_core/protocol/usb_hid/parser.h @@ -2,11 +2,14 @@ #define PARSER_H #include "hid.h" +#include "report.h" class KBDReportParser : public HIDReportParser { public: - virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); + report_keyboard_t report; + uint16_t time_stamp; + virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); }; #endif diff --git a/tmk_core/protocol/usb_hid/test/Makefile b/tmk_core/protocol/usb_hid/test/Makefile index c093bbd4c1b2..83bf2aed67ab 100644 --- a/tmk_core/protocol/usb_hid/test/Makefile +++ b/tmk_core/protocol/usb_hid/test/Makefile @@ -1,4 +1,42 @@ - +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- # Target file name (without extension). TARGET = usb_hid_test diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index b7cb0a559aa0..aef4d5e5520c 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -247,8 +247,8 @@ gccversion : $(eval CMD=$(HEX) $< $@) @$(BUILD_CMD) @if $(AUTOGEN); then \ - $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(KEYBOARD)_$(KEYMAP).hex\n"; \ - $(COPY) $@ $(KEYMAP_PATH)/$(KEYBOARD)_$(KEYMAP).hex; \ + $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(TARGET).hex\n"; \ + $(COPY) $@ $(KEYMAP_PATH)/$(TARGET).hex; \ else \ $(COPY) $@ $(TARGET).hex; \ fi @@ -382,7 +382,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) # Listing of phony targets. -.PHONY : all finish sizebefore sizeafter gccversion \ -build elf hex eep lss sym coff extcoff \ +.PHONY : all finish sizebefore sizeafter qmkversion \ +gccversion build elf hex eep lss sym coff extcoff \ clean clean_list debug gdb-config show_path \ program teensy dfu flip dfu-ee flip-ee dfu-start \ No newline at end of file diff --git a/util/2-setup-environment-win.bat b/util/2-setup-environment-win.bat index 3e54cc776c4e..22a2e17f70f7 100644 --- a/util/2-setup-environment-win.bat +++ b/util/2-setup-environment-win.bat @@ -34,14 +34,14 @@ ECHO ------------------------------------------ ECHO Installing dfu-programmer. ECHO ------------------------------------------ ECHO. -wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' >> %STARTINGDIR%\environment-setup.log +wget --no-check-certificate 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' >> %STARTINGDIR%\environment-setup.log unzip -o dfu-programmer-win-0.7.2.zip >> %STARTINGDIR%\environment-setup.log COPY dfu-programmer.exe .. >> %STARTINGDIR%\environment-setup.log ECHO ------------------------------------------ ECHO Downloading driver ECHO ------------------------------------------ -wget http://downloads.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log +wget --no-check-certificate http://downloads.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log unzip -o libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll >> %STARTINGDIR%\environment-setup.log diff --git a/util/install_dependencies.sh b/util/install_dependencies.sh index 1b73a8b3bfa3..227c86f87fb3 100755 --- a/util/install_dependencies.sh +++ b/util/install_dependencies.sh @@ -111,4 +111,8 @@ elif [[ -n "$(type -P pkg)" ]]; then arm-none-eabi-binutils \ arm-none-eabi-newlib \ diffutils +elif [[ -n "$(type -P emerge)" ]]; then + echo 'Please check that your gcc is built with the multilib use flag enabled.' + emerge -vq sys-devel/crossdev + USE="-openmp -hardened -sanitize -vtv" crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 4936ca0ba714..abfec4ecd2c0 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -13,10 +13,16 @@ openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_i tar xvf secrets.tar chmod 600 id_rsa_qmk_firmware -chmod 600 qmk.fm +chmod 600 id_rsa_qmk.fm eval `ssh-agent -s` ssh-add id_rsa_qmk_firmware +# convert to unix line-endings +git checkout master +git diff --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix +git diff --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add +git commit -m "convert to unix line-endings [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master + increment_version () { declare -a part=( ${1//\./ } ) @@ -42,24 +48,19 @@ fi if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then - make ergodox-ez AUTOGEN=true - cd .. git clone git@github.com:qmk/qmk.fm.git cd qmk.fm - mv ../qmk_firmware/qmk.fm qmk.fm - ssh-add qmk.fm - #git submodule update --init --recursive - #rm -rf keyboard - #rm -rf keyboards - #yes | cp -rf ../qmk_firmware/keyboards . - #mkdir keyboards/ergodox_ez/ - #cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html - #cp ../qmk_firmware/readme.md qmk_readme.md - #./generate.sh - rm -f _compiled/*.hex - for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done - for file in ../qmk_firmware/keyboards/*/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done + mv ../qmk_firmware/id_rsa_qmk.fm id_rsa_qmk.fm + ssh-add -D + eval `ssh-agent -s` + ssh-add id_rsa_qmk.fm + + rm -f compiled/*.hex + + # ignore errors here + for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "compiled/${file##*/}" || true; done + for file in ../qmk_firmware/keyboards/*/*/keymaps/*/*.hex; do mv -v "$file" "compiled/${file##*/}" || true; done git add -A git commit -m "generated from qmk/qmk_firmware@${rev}"