diff --git a/.gitignore b/.gitignore index a8dd97ef..971e9045 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ quantum/version.h .idea/ CMakeLists.txt cmake-build-debug +doxygen/ .DS_STORE /util/wsl_downloaded /util/win_downloaded @@ -65,4 +66,4 @@ util/Win_Check_Output.txt # things travis sees secrets.tar id_rsa_* -/.vs \ No newline at end of file +/.vs diff --git a/.travis.yml b/.travis.yml index 125e8f33..7ff4060a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,11 +15,13 @@ before_install: install: - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin" + - npm install -g moxygen before_script: - avr-gcc --version script: - make test:all AUTOGEN=false - bash util/travis_build.sh +- bash util/travis_docs.sh addons: apt: packages: @@ -30,6 +32,7 @@ addons: - libnewlib-arm-none-eabi - diffutils - dos2unix + - doxygen after_success: bash util/travis_compiled_push.sh notifications: diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 00000000..218d77b4 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,266 @@ +# Doxyfile 1.8.14 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for qmk_firmware (github.com/qmk/qmk_firmware) +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "QMK Firmware" +PROJECT_NUMBER = https://github.com/qmk/qmk_firmware +PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families" +OUTPUT_DIRECTORY = doxygen +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 2 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = YES +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +INPUT = tmk_core quantum drivers +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to disabled outputs +#--------------------------------------------------------------------------- + +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_RTF = NO +GENERATE_MAN = NO +GENERATE_DOCBOOK = NO +GENERATE_AUTOGEN_DEF = NO +GENERATE_PERLMOD = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +GENERATE_XML = YES +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/Makefile b/Makefile index 8350d5ce..9ef82bbd 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,12 @@ generate-keyboards-file: $(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD))) exit 0 +clean: + echo -n 'Deleting .build ... ' + rm -rf $(BUILD_DIR) + echo 'done' + exit 0 + #Compatibility with the old make variables, anything you specify directly on the command line # always overrides the detected folders ifdef keyboard diff --git a/build_keyboard.mk b/build_keyboard.mk index 921159a5..5a82abd3 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -204,6 +204,10 @@ endif # User space stuff USER_PATH := users/$(KEYMAP) -include $(USER_PATH)/rules.mk +ifneq ("$(wildcard users/$(KEYMAP)/config.h)","") + CONFIG_H += users/$(KEYMAP)/config.h +endif + # Object files directory # To put object files in current directory, use a dot (.), do NOT make diff --git a/common_features.mk b/common_features.mk index 1c0b3546..9b99edd7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -132,6 +132,9 @@ endif ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) OPT_DEFS += -DAUTO_SHIFT_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c + ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes) + OPT_DEFS += -DAUTO_SHIFT_MODIFIERS + endif endif ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) diff --git a/docs/_summary.md b/docs/_summary.md index 50d9a37a..318c526a 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -87,3 +87,12 @@ * Other Topics * [Using Eclipse with QMK](eclipse.md) + +* QMK Internals (In Progress) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Midi Device](internals_midi_device.md) + * [Midi Device Setup Process](internals_midi_device_setup_process.md) + * [Midi Util](internals_midi_util.md) + * [Send Functions](internals_send_functions.md) + * [Sysex Tools](internals_sysex_tools.md) diff --git a/docs/config_options.md b/docs/config_options.md index 055531b6..af8602c3 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -31,9 +31,8 @@ This is a C header file that is one of the first things included, and will persi #include "config_common.h" -## `config.h` Options -### Hardware Options +## Hardware Options * `#define VENDOR_ID 0x1234` * defines your VID, and for most DIY projects, can be whatever you want * `#define PRODUCT_ID 0x5678` @@ -83,7 +82,7 @@ This is a C header file that is one of the first things included, and will persi * `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )` * key combination that allows the use of magic commands (useful for debugging) -### Features That Can Be Disabled +## Features That Can Be Disabled If you define these options you will disable the associated feature, which can save on code size. @@ -102,7 +101,7 @@ If you define these options you will disable the associated feature, which can s * `#define NO_ACTION_FUNCTION` * disable the action function (deprecated) -### Features That Can Be Enabled +## Features That Can Be Enabled If you define these options you will enable the associated feature, which may increase your code size. @@ -111,7 +110,7 @@ If you define these options you will enable the associated feature, which may in * `#define PREVENT_STUCK_MODIFIERS` * when switching layers, this will release all mods -### Behaviors That Can Be Configured +## Behaviors That Can Be Configured * `#define TAPPING_TERM 200` * how long before a tap becomes a hold @@ -139,7 +138,7 @@ If you define these options you will enable the associated feature, which may in few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. -### RGB Light Configuration +## RGB Light Configuration * `#define RGB_DI_PIN D7` * pin the DI on the ws2812 is hooked-up to @@ -156,7 +155,7 @@ If you define these options you will enable the associated feature, which may in * `#define RGBW_BB_TWI` * bit-bangs TWI to EZ RGBW LEDs (only required for Ergodox EZ) -### Mouse Key Options +## Mouse Key Options * `#define MOUSEKEY_INTERVAL 20` * `#define MOUSEKEY_DELAY 0` @@ -168,9 +167,7 @@ If you define these options you will enable the associated feature, which may in This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. -## `rules.mk` Options - -### Build Options +## Build Options * `DEFAULT_FOLDER` * Used to specify a default folder when a keyboard has more than one sub-folder. @@ -179,7 +176,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i * `LAYOUTS` * A list of [layouts](feature_layouts.md) this keyboard supports. -### AVR MCU Options +## AVR MCU Options * `MCU = atmega32u4` * `F_CPU = 16000000` * `ARCH = AVR8` @@ -193,7 +190,7 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i * `caterina` * `bootloadHID` -### Feature Options +## Feature Options Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU. diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 98478733..6d741b6c 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -207,7 +207,7 @@ uint32_t layer_state_set_user(uint32_t state) { return state; } ``` -### `matrix_init_*` Function Documentation +### `layer_state_set_*` Function Documentation * Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)` * Keymap: `uint32_t layer_state_set_user(uint32_t state)` diff --git a/docs/faq_build.md b/docs/faq_build.md index ff409f9c..2d1b91b6 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -88,3 +88,19 @@ Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=2048 ``` + +## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS +This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. + +The solution is to remove and reinstall all affected modules. + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install gcc-arm-none-eabi +brew install avrdude +``` diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index ceee7fad..2db313e7 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -25,7 +25,8 @@ These functions allow you to activate layers in various ways. * `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. +* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you repeatedly tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. +* `LM(layer, mod)` - Momentary switch to *layer* (like MO), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers. # Working with Layers @@ -49,7 +50,7 @@ Once you have a good feel for how layers work and what you can do, you can get m 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. -Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h). +Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h). # Modifier Keys @@ -153,9 +154,11 @@ You can control the behavior of one shot keys by defining these in `config.h`: * `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*. -Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429). +Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429). -## Permissive Hold +If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop. + +# Permissive Hold As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index ae821431..484c506f 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -28,10 +28,7 @@ Yes, unfortunately. characters, you could press and hold the 'a' key for a second or two. This no longer works with Auto Shift because it is timing your depressed time instead of emitting a depressed key state to your operating system. -2. Auto Shift is disabled for any key press that is accompanied by one or more - modifiers. Thus, Ctrl+A that you hold for a really long time is not the same - as Ctrl+Shift+A. -3. You will have characters that are shifted when you did not intend on shifting, and +2. You will have characters that are shifted when you did not intend on shifting, and other characters you wanted shifted, but were not. This simply comes down to practice. As we get in a hurry, we think we have hit the key long enough for a shifted version, but we did not. On the other hand, we may think we are @@ -48,6 +45,18 @@ If no `rules.mk` exists, you can create one. Then compile and install your new firmware with Auto Key enabled! That's it! +## Modifiers + +By default, Auto Shift is disabled for any key press that is accompanied by one or more +modifiers. Thus, Ctrl+A that you hold for a really long time is not the same +as Ctrl+Shift+A. + +You can re-enable Auto Shift for modifiers by adding another rule to your `rules.mk` + + AUTO_SHIFT_MODIFIERS = yes + +In which case, Ctrl+A held past the `AUTO_SHIFT_TIMEOUT` will be sent as Ctrl+Shift+A + ## Configuring Auto Shift If desired, there is some configuration that can be done to change the @@ -112,7 +121,7 @@ Map three keys temporarily in your keymap: | KC_ASRP | Report your current Auto Shift timeout value | | KC_ASON | Turns on the Auto Shift Function | | KC_ASOFF | Turns off the Auto Shift Function | -| KC_ASTG | Toggles the statn of the Auto Shift feature | +| KC_ASTG | Toggles the state of the Auto Shift feature | Compile and upload your new firmware. diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index f96fa877..0f1e649e 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -42,6 +42,8 @@ You can change the behavior of the RGB Lighting by setting these configuration v | `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. | | `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. | | `RGBLIGHT_LIMIT_VAL` | 255 | Limit the val of HSV to limit the maximum brightness simply. | +| `RGBLIGHT_SLEEP` | | `#define` this will shut off the lights when the host goes to sleep | + ### Animations @@ -90,10 +92,11 @@ rgblight_disable(); // turn all lights off rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM) rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color -rgblight_sethsv(h, s, v); // HSV color control +rgblight_sethsv(h, s, v); // HSV color control - h is a value from 0..360 and s/v is a value from 0..255 rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM ``` +You can find a list of predefined colors at [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Free to add to this list! ## RGB Lighting Keycodes diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index 42f9e086..92e8e3b1 100644 --- a/docs/feature_swap_hands.md +++ b/docs/feature_swap_hands.md @@ -1,6 +1,6 @@ # Swap-Hands Action -The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd` +The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd` ## Configuration @@ -17,15 +17,14 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing. -## Advanced Swap Commands +## Swap Keycodes -|Macro | Description | -|------|-------------| -| `ACTION_SWAP_HANDS()` | Swaps hands when pressed, returns to normal when released (momentary). | -| `ACTION_SWAP_HANDS_TOGGLE()` | Toggles swap on and off with every key press. | -| `ACTION_SWAP_HANDS_TAP_TOGGLE()` | Toggles with a tap; momentary when held. | -| `ACTION_SWAP_HANDS_TAP_KEY(key)`| Sends `key` with a tap; momentary swap when held. | -| `ACTION_SWAP_HANDS_ON_OFF()` | Alias for `ACTION_SWAP_HANDS()` | -| `ACTION_SWAP_HANDS_OFF_ON()` | Momentarily turns off swap. | -| `ACTION_SWAP_HANDS_ON()` | Turns on swapping and leaves it on. | -| `ACTION_SWAP_HANDS_OFF()` | Turn off swapping and leaves it off. Good for returning to a known state. | \ No newline at end of file +|Key |Description | +|-----------|-------------------------------------------------------------------------| +|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. | +|`SW_ON` |Turns on swapping and leaves it on. | +|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.| +|`SW_MON` |Swaps hands when pressed, returns to normal when released (momentary). | +|`SW_MOFF` |Momentarily turns off swap. | +|`SH_TG` |Toggles swap on and off with every key press. | +|`SH_TT` |Toggles with a tap; momentary when held. | diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 95037742..454481cb 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -3,10 +3,11 @@ If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, ``) with the following structure: * `/users//` (added to the path automatically) - * `readme.md` + * `readme.md` (optional, recommended) * `rules.mk` (included automatically) * `.h` (optional) * `.c` (optional) + * `config.h` (optional) `.c` will need to be added to the SRC in `rules.mk` like this: @@ -24,10 +25,31 @@ For example, Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`. +Additionally, `config.h` here will be processed like the same file in your keymap folder. This is handled separately from the `.h` file. + +The reason for this, is that `.h` won't be added in time to add settings (such as `#define TAPPING_TERM 100`), and including the `` file in any `config.h` files will result in compile issues. + +So you should use the `config.h` for QMK settings, and the `.h` file for user or keymap specific settings. + ## Readme Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). +## `Config.h` + +If you do add a `config,h` file, you want to make sure that it only gets processed once. So you may want to start off with something like this: + +```c +#ifndef USERSPACE_CONFIG_H +#define USERSPACE_CONFIG_H + +// Put normal config.h settings here: + +#endif // !USERSPACE_CONFIG_H +``` + +You can use any option hre that you could use in your keymap's `config.h` file. You can find a list of vales [here](config_options.md). + ## Example For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` . diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 0892f85c..3ecf7ad1 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -22,7 +22,7 @@ Given the amount of functionality that QMK exposes it's very easy to confuse new ### Bootmagic and Command -(Bootmagic)[feature_bootmagic.md) and (Command)[feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. +[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in. @@ -30,7 +30,7 @@ If your keyboard does not have 2 shift keys you should provide a working default ## Custom Keyboard Programming -As documented on (Customizing Functionality)[custom_quantum_functions.md] you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`. +As documented on [Customizing Functionality](custom_quantum_functions.md) you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`. ## Keyboard Metadata @@ -63,7 +63,9 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai * `lufa-dfu` * `qmk-dfu` * `stm32-dfu-util` - * (FIXME: This list is incomplete.) + * `caterina` + * `halfkay` + * `bootloadHID` * `maintainer` * GitHub username of the maintainer, or `qmk` for community maintained boards * `width` diff --git a/docs/internals_defines.md b/docs/internals_defines.md new file mode 100644 index 00000000..fdcb5535 --- /dev/null +++ b/docs/internals_defines.md @@ -0,0 +1,78 @@ +# group `defines` {#group__defines} + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) | +`define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) | +`define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) | +`define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) | +`define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) | +`define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) | +`define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) | +`define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) | +`define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) | +`define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) | +`define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) | +`define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) | +`define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) | +`define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) | +`define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) | +`define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) | +`define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) | +`define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) | +`define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) | +`define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) | +`define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) | +`define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) | +`define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) | + +## Members + +#### `define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) {#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79} + +#### `define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) {#group__defines_1ga753706d1d28e6f96d7caf1973e80feed} + +#### `define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) {#group__defines_1gab78a1c818a5f5dab7a8946543f126c69} + +#### `define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) {#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909} + +#### `define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) {#group__defines_1ga45f116a1daab76b3c930c2cecfaef215} + +#### `define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) {#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7} + +#### `define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) {#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc} + +#### `define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) {#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f} + +#### `define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) {#group__defines_1gabcc799504e8064679bca03f232223af4} + +#### `define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) {#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42} + +#### `define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) {#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe} + +#### `define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) {#group__defines_1gafa5e4e295aafd15ab7893344599b3b89} + +#### `define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) {#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7} + +#### `define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) {#group__defines_1ga8233631c85823aa546f932ad8975caa4} + +#### `define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) {#group__defines_1gab24430f0081e27215b0da84dd0ee745c} + +#### `define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) {#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62} + +#### `define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) {#group__defines_1gacd88ed42dba52bb4b2052c5656362677} + +#### `define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) {#group__defines_1ga02947f30ca62dc332fdeb10c5868323b} + +#### `define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) {#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31} + +#### `define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) {#group__defines_1ga412f6ed33a2150051374bee334ee1705} + +#### `define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) {#group__defines_1gafcab254838b028365ae0259729e72c4e} + +#### `define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) {#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795} + +#### `define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) {#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f} + diff --git a/docs/internals_input_callback_reg.md b/docs/internals_input_callback_reg.md new file mode 100644 index 00000000..4ea132a8 --- /dev/null +++ b/docs/internals_input_callback_reg.md @@ -0,0 +1,169 @@ +# group `input_callback_reg` {#group__input__callback__reg} + +These are the functions you use to register your input callbacks. + +The functions are called when the appropriate midi message is matched on the associated device's input. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a control change message (cc) callback. +`public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a note on callback. +`public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a note off callback. +`public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register an after touch callback. +`public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a pitch bend callback. +`public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | Register a song position callback. +`public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a program change callback. +`public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a channel pressure callback. +`public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a song select callback. +`public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | Register a tc quarter frame callback. +`public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | Register a realtime callback. +`public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | Register a tune request callback. +`public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` | Register a sysex callback. +`public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | Register fall through callback. +`public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | Register a catch all callback. + +## Members + +#### `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718} + +Register a control change message (cc) callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga3962f276c17618923f1152779552103e} + +Register a note on callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d} + +Register a note off callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f} + +Register an after touch callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48} + +Register a pitch bend callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6} + +Register a song position callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127} + +Register a program change callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5} + +Register a channel pressure callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72} + +Register a song select callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e} + +Register a tc quarter frame callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a} + +Register a realtime callback. + +The callback will be called for all of the real time message types. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1} + +Register a tune request callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` {#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48} + +Register a sysex callback. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94} + +Register fall through callback. + +This is only called if a more specific callback is not matched and called. For instance, if you don't register a note on callback but you get a note on message the fall through callback will be called, if it is registered. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + +#### `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99} + +Register a catch all callback. + +If registered, the catch all callback is called for every message that is matched, even if a more specific or the fallthrough callback is registered. + +#### Parameters +* `device` the device associate with + +* `func` the callback function to register + diff --git a/docs/internals_midi_device.md b/docs/internals_midi_device.md new file mode 100644 index 00000000..5b57abd4 --- /dev/null +++ b/docs/internals_midi_device.md @@ -0,0 +1,143 @@ +# group `midi_device` {#group__midi__device} + +You use the functions when you are implementing your own midi device. + +You set a send function to actually send bytes via your device, this method is called when you call a send function with this device, for instance midi_send_cc + +You use the midi_device_input to process input data from the device and pass it through the device's associated callbacks. + +You use the midi_device_set_pre_input_process_func if you want to have a function called at the beginning of the device's process function, generally to poll for input and pass that into midi_device_input + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) | +`enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) | +`public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` | Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input. +`public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` | Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking. +`public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` | Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device. +`struct `[`_midi_device`](docs/api_midi_device.md#struct__midi__device) | This structure represents the input and output functions and processing data for a midi device. + +## Members + +#### `define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) {#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8} + +#### `enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) {#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621} + + Values | Descriptions +--------------------------------|--------------------------------------------- +IDLE | +ONE_BYTE_MESSAGE | +TWO_BYTE_MESSAGE | +THREE_BYTE_MESSAGE | +SYSEX_MESSAGE | + +#### `public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` {#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db} + +Process input bytes. This function parses bytes and calls the appropriate callbacks associated with the given device. You use this function if you are creating a custom device and you want to have midi input. + +#### Parameters +* `device` the midi device to associate the input with + +* `cnt` the number of bytes you are processing + +* `input` the bytes to process + +#### `public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` {#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673} + +Set the callback function that will be used for sending output data bytes. This is only used if you're creating a custom device. You'll most likely want the callback function to disable interrupts so that you can call the various midi send functions without worrying about locking. + +#### Parameters +* `device` the midi device to associate this callback with + +* `send_func` the callback function that will do the sending + +#### `public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` {#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69} + +Set a callback which is called at the beginning of the midi_device_process call. This can be used to poll for input data and send the data through the midi_device_input function. You'll probably only use this if you're creating a custom device. + +#### Parameters +* `device` the midi device to associate this callback with + +* `midi_no_byte_func_t` the actual callback function + +# struct `_midi_device` {#struct__midi__device} + +This structure represents the input and output functions and processing data for a midi device. + +A device can represent an actual physical device [serial port, usb port] or something virtual. You should not need to modify this structure directly. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) | +`public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) | +`public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) | +`public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) | +`public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) | +`public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) | +`public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) | +`public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) | +`public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) | +`public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) | +`public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) | +`public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) | +`public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) | +`public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) | +`public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) | +`public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) | +`public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) | +`public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) | +`public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) | +`public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) | +`public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) | +`public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) | + +## Members + +#### `public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) {#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9} + +#### `public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) {#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1} + +#### `public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) {#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c} + +#### `public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) {#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84} + +#### `public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) {#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f} + +#### `public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) {#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18} + +#### `public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) {#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586} + +#### `public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) {#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da} + +#### `public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) {#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7} + +#### `public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) {#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f} + +#### `public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) {#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0} + +#### `public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) {#struct__midi__device_1a9448eba4afb7e43650434748db3777be} + +#### `public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) {#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d} + +#### `public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) {#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2} + +#### `public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) {#struct__midi__device_1abb974ec6d734001b4a0e370f292be503} + +#### `public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) {#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8} + +#### `public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) {#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754} + +#### `public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) {#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a} + +#### `public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) {#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39} + +#### `public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) {#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d} + +#### `public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) {#struct__midi__device_1ada41de021135dc423abedcbb30f366ff} + +#### `public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) {#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f} + diff --git a/docs/internals_midi_device_setup_process.md b/docs/internals_midi_device_setup_process.md new file mode 100644 index 00000000..ae82197c --- /dev/null +++ b/docs/internals_midi_device_setup_process.md @@ -0,0 +1,31 @@ +# group `midi_device_setup_process` {#group__midi__device__setup__process} + +These are method that you must use to initialize and run a device. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Initialize a device. +`public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Process input data. + +## Members + +#### `public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9} + +Initialize a device. + +You must call this before using the device in question. + +#### Parameters +* `device` the device to initialize + +#### `public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b} + +Process input data. + +This method drives the input processing, you must call this method frequently if you expect to have your input callbacks called. + +#### Parameters +* `device` the device to process + diff --git a/docs/internals_midi_util.md b/docs/internals_midi_util.md new file mode 100644 index 00000000..97821bd1 --- /dev/null +++ b/docs/internals_midi_util.md @@ -0,0 +1,54 @@ +# group `midi_util` {#group__midi__util} + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) | An enumeration of the possible packet length values. +`public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` | Test to see if the byte given is a status byte. +`public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` | Test to see if the byte given is a realtime message. +`public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` | Find the length of the packet associated with the status byte given. + +## Members + +#### `enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) {#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e} + + Values | Descriptions +--------------------------------|--------------------------------------------- +UNDEFINED | +ONE | +TWO | +THREE | + +An enumeration of the possible packet length values. + +#### `public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` {#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5} + +Test to see if the byte given is a status byte. + +#### Parameters +* `theByte` the byte to test + +#### Returns +true if the byte given is a midi status byte + +#### `public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` {#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7} + +Test to see if the byte given is a realtime message. + +#### Parameters +* `theByte` the byte to test + +#### Returns +true if it is a realtime message, false otherwise + +#### `public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` {#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175} + +Find the length of the packet associated with the status byte given. + +#### Parameters +* `status` the status byte + +#### Returns +the length of the packet, will return UNDEFINED if the byte is not a status byte or if it is a sysex status byte + diff --git a/docs/internals_send_functions.md b/docs/internals_send_functions.md new file mode 100644 index 00000000..b3315080 --- /dev/null +++ b/docs/internals_send_functions.md @@ -0,0 +1,241 @@ +# group `send_functions` {#group__send__functions} + +These are the functions you use to send midi data through a device. + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` | Send a control change message (cc) via the given device. +`public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | Send a note on message via the given device. +`public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | Send a note off message via the given device. +`public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` | Send an after touch message via the given device. +`public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` | Send a pitch bend message via the given device. +`public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` | Send a program change message via the given device. +`public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` | Send a channel pressure message via the given device. +`public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a clock message via the given device. +`public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a tick message via the given device. +`public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a start message via the given device. +`public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a continue message via the given device. +`public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a stop message via the given device. +`public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send an active sense message via the given device. +`public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a reset message via the given device. +`public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` | Send a tc quarter frame message via the given device. +`public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` | Send a song position message via the given device. +`public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` | Send a song select message via the given device. +`public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` | Send a tune request message via the given device. +`public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` | Send a byte via the given device. +`public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` | Send up to 3 bytes of data. +`public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` | Send an array of formatted midi data. + +## Members + +#### `public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` {#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960} + +Send a control change message (cc) via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `num` the cc num + +* `val` the value of that cc num + +#### `public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775} + +Send a note on message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `num` the note number + +* `vel` the note velocity + +#### `public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49} + +Send a note off message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `num` the note number + +* `vel` the note velocity + +#### `public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` {#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f} + +Send an after touch message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `note_num` the note number + +* `amt` the after touch amount + +#### `public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` {#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491} + +Send a pitch bend message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `amt` the bend amount range: -8192..8191, 0 means no bend + +#### `public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` {#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86} + +Send a program change message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `num` the program to change to + +#### `public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` {#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b} + +Send a channel pressure message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `chan` the channel to send on, 0-15 + +* `amt` the amount of channel pressure + +#### `public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa} + +Send a clock message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga2b43c7d433d940c5b907595aac947972} + +Send a tick message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc} + +Send a start message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120} + +Send a continue message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988} + +Send a stop message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37} + +Send an active sense message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b} + +Send a reset message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` {#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a} + +Send a tc quarter frame message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `time` the time of this quarter frame, range 0..16383 + +#### `public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` {#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f} + +Send a song position message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `pos` the song position + +#### `public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` {#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50} + +Send a song select message via the given device. + +#### Parameters +* `device` the device to use for sending + +* `song` the song to select + +#### `public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656} + +Send a tune request message via the given device. + +#### Parameters +* `device` the device to use for sending + +#### `public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` {#group__send__functions_1ga857e85eb90b288385642d4d991e09881} + +Send a byte via the given device. + +This is a generic method for sending data via the given midi device. This would be useful for sending sysex data or messages that are not implemented in this API, if there are any. Please contact the author if you find some so we can add them. + +#### Parameters +* `device` the device to use for sending + +* `b` the byte to send + +#### `public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` {#group__send__functions_1ga36e2f2e45369d911b76969361679054b} + +Send up to 3 bytes of data. + +% 4 is applied to count so that you can use this to pass sysex through + +#### Parameters +* `device` the device to use for sending + +* `count` the count of bytes to send, %4 is applied + +* `byte0` the first byte + +* `byte1` the second byte, ignored if cnt % 4 != 2 + +* `byte2` the third byte, ignored if cnt % 4 != 3 + +#### `public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` {#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead} + +Send an array of formatted midi data. + +Can be used for sysex. + +#### Parameters +* `device` the device to use for sending + +* `count` the count of bytes to send + +* `array` the array of bytes + diff --git a/docs/internals_sysex_tools.md b/docs/internals_sysex_tools.md new file mode 100644 index 00000000..55dbe9e1 --- /dev/null +++ b/docs/internals_sysex_tools.md @@ -0,0 +1,61 @@ +# group `sysex_tools` {#group__sysex__tools} + +## Summary + + Members | Descriptions +--------------------------------|--------------------------------------------- +`public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` | Compute the length of a message after it is encoded. +`public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` | Compute the length of a message after it is decoded. +`public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` | Encode data so that it can be transmitted safely in a sysex message. +`public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` | Decode encoded data. + +## Members + +#### `public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` {#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a} + +Compute the length of a message after it is encoded. + +#### Parameters +* `decoded_length` The length, in bytes, of the message to encode. + +#### Returns +The length, in bytes, of the message after encodeing. + +#### `public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` {#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0} + +Compute the length of a message after it is decoded. + +#### Parameters +* `encoded_length` The length, in bytes, of the encoded message. + +#### Returns +The length, in bytes, of the message after it is decoded. + +#### `public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742} + +Encode data so that it can be transmitted safely in a sysex message. + +#### Parameters +* `encoded` The output data buffer, must be at least sysex_encoded_length(length) bytes long. + +* `source` The input buffer of data to be encoded. + +* `length` The number of bytes from the input buffer to encode. + +#### Returns +number of bytes encoded. + +#### `public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229} + +Decode encoded data. + +#### Parameters +* `decoded` The output data buffer, must be at least sysex_decoded_length(length) bytes long. + +* `source` The input buffer of data to be decoded. + +* `length` The number of bytes from the input buffer to decode. + +#### Returns +number of bytes decoded. + diff --git a/docs/keycodes.md b/docs/keycodes.md index 030b2382..dad645cf 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -6,189 +6,189 @@ This is a reference only. Each group of keys links to the page documenting their ## [Basic Keycodes](keycodes_basic.md) -|Key |Aliases |Description | -|-----------------------|----------|-----------------------------------------------| -|`KC_1` | |`1` and `!` | -|`KC_2` | |`2` and `@` | -|`KC_3` | |`3` and `#` | -|`KC_4` | |`4` and `$` | -|`KC_5` | |`5` and `%` | -|`KC_6` | |`6` and `^` | -|`KC_7` | |`7` and `&` | -|`KC_8` | |`8` and `*` | -|`KC_9` | |`9` and `(` | -|`KC_0` | |`0` and `)` | -|`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` | |`a` and `A` | -|`KC_B` | |`b` and `B` | -|`KC_C` | |`c` and `C` | -|`KC_D` | |`d` and `D` | -|`KC_E` | |`e` and `E` | -|`KC_F` | |`f` and `F` | -|`KC_G` | |`g` and `G` | -|`KC_H` | |`h` and `H` | -|`KC_I` | |`i` and `I` | -|`KC_J` | |`j` and `J` | -|`KC_K` | |`k` and `K` | -|`KC_L` | |`l` and `L` | -|`KC_M` | |`m` and `M` | -|`KC_N` | |`n` and `N` | -|`KC_O` | |`o` and `O` | -|`KC_P` | |`p` and `P` | -|`KC_Q` | |`q` and `Q` | -|`KC_R` | |`r` and `R` | -|`KC_S` | |`s` and `S` | -|`KC_T` | |`t` and `T` | -|`KC_U` | |`u` and `U` | -|`KC_V` | |`v` and `V` | -|`KC_W` | |`w` and `W` | -|`KC_X` | |`x` and `X` | -|`KC_Y` | |`y` and `Y` | -|`KC_Z` | |`z` and `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` |JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN` |JIS `¥` | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | -|`KC_GRAVE` |`KC_GRV` |` and `~` | -|`KC_COMMA` |`KC_COMM` |`,` and `<` | -|`KC_DOT` | |`.` and `>` | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock | -|`KC_LCTRL` |`KC_LCTL` |Left Control | -|`KC_LSHIFT` |`KC_LSFT` |Left Shift | -|`KC_LALT` | |Left Alt | -|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL` |Right Control | -|`KC_RSHIFT` |`KC_RSFT` |Right Shift | -|`KC_RALT` | |Right Alt | -|`KC_RGUI` | |Right GUI (Windows/Command/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 Henkan | -|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock | -|`KC_PAUSE` |`KC_PAUS` |Pause | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | -|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_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. Recommended over `KC_POWER`.| -|`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 (macOS) | -|`KC__VOLUP` | |Volume Up (macOS) | -|`KC__VOLDOWN` | |Volume Down (macOS) | -|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) | -|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) | -|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) | -|`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` |Stop Track | -|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | -|`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 Page Down | -|`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 Page Up | -|`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 `,` | -|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | -|`KC_NO` | |Ignore this key (NOOP) | -|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key | +|Key |Aliases |Description | +|-----------------------|--------------------|-----------------------------------------------| +|`KC_1` | |`1` and `!` | +|`KC_2` | |`2` and `@` | +|`KC_3` | |`3` and `#` | +|`KC_4` | |`4` and `$` | +|`KC_5` | |`5` and `%` | +|`KC_6` | |`6` and `^` | +|`KC_7` | |`7` and `&` | +|`KC_8` | |`8` and `*` | +|`KC_9` | |`9` and `(` | +|`KC_0` | |`0` and `)` | +|`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` | |`a` and `A` | +|`KC_B` | |`b` and `B` | +|`KC_C` | |`c` and `C` | +|`KC_D` | |`d` and `D` | +|`KC_E` | |`e` and `E` | +|`KC_F` | |`f` and `F` | +|`KC_G` | |`g` and `G` | +|`KC_H` | |`h` and `H` | +|`KC_I` | |`i` and `I` | +|`KC_J` | |`j` and `J` | +|`KC_K` | |`k` and `K` | +|`KC_L` | |`l` and `L` | +|`KC_M` | |`m` and `M` | +|`KC_N` | |`n` and `N` | +|`KC_O` | |`o` and `O` | +|`KC_P` | |`p` and `P` | +|`KC_Q` | |`q` and `Q` | +|`KC_R` | |`r` and `R` | +|`KC_S` | |`s` and `S` | +|`KC_T` | |`t` and `T` | +|`KC_U` | |`u` and `U` | +|`KC_V` | |`v` and `V` | +|`KC_W` | |`w` and `W` | +|`KC_X` | |`x` and `X` | +|`KC_Y` | |`y` and `Y` | +|`KC_Z` | |`z` and `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` |JIS Katakana/Hiragana | +|`KC_INT3` |`KC_JYEN` |JIS `¥` | +|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | +|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | +|`KC_GRAVE` |`KC_GRV` |` and `~` | +|`KC_COMMA` |`KC_COMM` |`,` and `<` | +|`KC_DOT` | |`.` and `>` | +|`KC_SLASH` |`KC_SLSH` |`/` and `?` | +|`KC_CAPSLOCK` |`KC_CAPS` |Caps Lock | +|`KC_LCTRL` |`KC_LCTL` |Left Control | +|`KC_LSHIFT` |`KC_LSFT` |Left Shift | +|`KC_LALT` | |Left Alt | +|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | +|`KC_RCTRL` |`KC_RCTL` |Right Control | +|`KC_RSHIFT` |`KC_RSFT` |Right Shift | +|`KC_RALT` | |Right Alt | +|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/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 Henkan | +|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | +|`KC_PSCREEN` |`KC_PSCR` |Print Screen | +|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock | +|`KC_PAUSE` |`KC_PAUS` |Pause | +|`KC_INSERT` |`KC_INS` |Insert | +|`KC_HOME` | |Home | +|`KC_PGUP` | |Page Up | +|`KC_DELETE` |`KC_DEL` |Forward Delete | +|`KC_END` | |End | +|`KC_PGDOWN` |`KC_PGDN` |Page Down | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow | +|`KC_LEFT` | |Left Arrow | +|`KC_DOWN` | |Down Arrow | +|`KC_UP` | |Up Arrow | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | +|`KC_POWER` | |Deprecated by MS in favor of `KC_SYSTEM_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. Recommended over `KC_POWER`.| +|`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 (macOS) | +|`KC__VOLUP` | |Volume Up (macOS) | +|`KC__VOLDOWN` | |Volume Down (macOS) | +|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute (Windows/macOS/Linux) | +|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up (Windows/macOS/Linux) | +|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down (Windows/macOS/Linux) | +|`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` |Stop Track | +|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | +|`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 Page Down | +|`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 Page Up | +|`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 `,` | +|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | +|`KC_NO` | |Ignore this key (NOOP) | +|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key | ## [Mouse Keys](feature_mouse_keys.md) @@ -301,44 +301,44 @@ This is a reference only. Each group of keys links to the page documenting their ## [Modifiers](quantum_keycodes.md#modifiers) -|Key |Aliases |Description | -|----------|----------|----------------------------------------------------| -|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI | -|`KC_MEH` | |Hold Left Control, Shift and Alt | -|`LCTL(kc)`| |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`| |Hold Left Alt and press `kc` | -|`LGUI(kc)`| |Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`| |Hold Right Alt and press `kc` | -|`RGUI(kc)`| |Hold Right GUI and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` | -|`SCMD(kc)`|`SWIN(kc)`|Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|Key |Aliases |Description | +|----------|---------- |----------------------------------------------------| +|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI | +|`KC_MEH` | |Hold Left Control, Shift and Alt | +|`LCTL(kc)`| |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`| |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`| |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | ## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys) -|Key |Aliases |Description | -|------------|------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)`|Right Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`GUI_T(kc)` |Left GUI when held, `kc` when tapped | -|`RGUI_T(kc)`| |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SCMD_T(kc)`|`SWIN_T(kc)`|Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|Key |Aliases |Description | +|------------|---------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) @@ -368,14 +368,15 @@ This is a reference only. Each group of keys links to the page documenting their ## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers) -|Key |Description | -|---------------|----------------------------------------------------------------------------------| -|`LT(layer, kc)`|Turn on `layer` when held, `kc` when tapped | -|`TO(layer)` |Turn on `layer` when pressed | -|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)| -|`DF(layer)` |Set the base (default) layer | -|`TG(layer)` |Toggle `layer` on or off | -|`TT(layer)` |Tap toggle? idk FIXME | +|Key |Description | +|----------------|----------------------------------------------------------------------------------| +|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped | +|`TO(layer)` |Turn on `layer` when pressed | +|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)| +|`DF(layer)` |Set the base (default) layer | +|`TG(layer)` |Toggle `layer` on or off | +|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on | +|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. | ## [One Shot Keys](quantum_keycodes.md#one-shot-keys) @@ -390,3 +391,15 @@ This is a reference only. Each group of keys links to the page documenting their |------------|-------|-------------------------------------------------| |`UNICODE(n)`|`UC(n)`|Send Unicode character `n` | |`X(n)` | |Send Unicode character `n` via a different method| + +## [Swap Hands](feature_swap_hands.md) + +|Key |Description | +|-----------|-------------------------------------------------------------------------| +|`SH_T(key)`|Sends `key` with a tap; momentary swap when held. | +|`SW_ON` |Turns on swapping and leaves it on. | +|`SW_OFF` |Turn off swapping and leaves it off. Good for returning to a known state.| +|`SH_MON` |Swaps hands when pressed, returns to normal when released (momentary). | +|`SH_MOFF` |Momentarily turns off swap. | +|`SH_TG` |Toggles swap on and off with every key press. | +|`SH_TT` |Toggles with a tap; momentary when held. | diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index d4719ed4..57b0f922 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -101,21 +101,21 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## Modifiers -|Key |Aliases |Description | -|-------------------|---------|------------------------------------| -|`KC_LCTRL` |`KC_LCTL`|Left Control | -|`KC_LSHIFT` |`KC_LSFT`|Left Shift | -|`KC_LALT` | |Left Alt | -|`KC_LGUI` | |Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL`|Right Control | -|`KC_RSHIFT` |`KC_RSFT`|Right Shift | -|`KC_RALT` | |Right Alt | -|`KC_RGUI` | |Right GUI (Windows/Command/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 Henkan | -|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | +|Key |Aliases |Description | +|-------------------|--------------------|------------------------------------| +|`KC_LCTRL` |`KC_LCTL` |Left Control | +|`KC_LSHIFT` |`KC_LSFT` |Left Shift | +|`KC_LALT` | |Left Alt | +|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | +|`KC_RCTRL` |`KC_RCTL` |Right Control | +|`KC_RSHIFT` |`KC_RSFT` |Right Shift | +|`KC_RALT` | |Right Alt | +|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/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 Henkan | +|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | ## Commands diff --git a/docs/keymap.md b/docs/keymap.md index 090a9266..b28d21a2 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -171,6 +171,8 @@ In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which > This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation. +You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h). + #### `action_function()` To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`. diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index c466a4e4..4cd7c5c4 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -1,8 +1,14 @@ -# Flashing Your Keyboard With QMK Toolbox +# Flashing Your Keyboard Now that you've built a custom firmware file you'll want to flash your keyboard. -## Load The File Into QMK Toolbox +## Flashing Your Keyboard with QMK Toolbox + +The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). + +However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), you'll have to use the [method outlined below](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### Load The File Into QMK Toolbox Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory. @@ -28,7 +34,7 @@ For example, the `plank/rev5` with a `default` keymap will have this filename: Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. -## Put Your Keyboard Into DFU (Bootloader) Mode +### Put Your Keyboard Into DFU (Bootloader) Mode In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written. @@ -47,7 +53,7 @@ When you are successful you will see a message similar to this in QMK Toolbox: *** DFU device connected ``` -## Flash Your Keyboard +### Flash Your Keyboard Click the `Flash` button in QMK Toolbox. You will see output similar to the following: @@ -72,6 +78,163 @@ Click the `Flash` button in QMK Toolbox. You will see output similar to the foll *** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 ``` +## Flash your Keyboard from the Command Line + +First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU. + +You can find more information about the bootloaders in the [Flashing Instructions and Bootloader Information](flashing.md) page. + +If you know what bootloader that you're using, then when compiling the firmware, you can actually add some extra text to the `make` command to automate the flashing process. + +### DFU + +For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command: + + make ::dfu + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command: + + make planck/rev5:xyverz:dfu + +Once it finishes compiling, it should output the following: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it. + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +Once it does this, you'll want to reset the controller. It should then show output similiar to this: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +If you have any issues with this, you may need to this: + + sudo make ::dfu + +### Caterina + +For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: + + make ::avrdude + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev2 Lets Split, you'll use this command: + + make lets_split/rev2:xyverz:avrdude + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +At this point, reset the board and then the script will detect the bootloader and then flash the board. The output should look something like this: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +If you have any issues with this, you may need to this: + + sudo make ::avrdude + +## HalfKay + +For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: + + make ::teensy + +For example, if your keymap is named "xyverz" and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command: + + make erdogox_ez:xyverz:teensy + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + + At this point, reset your board. Once you've done that, you'll see output like this: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + + ## Test It Out! Congrats! Your custom firmware has been programmed to your keyboard! diff --git a/doxygen-todo b/doxygen-todo new file mode 100644 index 00000000..d5ae8405 --- /dev/null +++ b/doxygen-todo @@ -0,0 +1,32 @@ +tmk_core/protocol +tmk_core/protocol/bluefruit +tmk_core/protocol/chibios +tmk_core/protocol/iwrap +tmk_core/protocol/lufa +tmk_core/protocol/mbed +tmk_core/protocol/midi +tmk_core/protocol/midi/bytequeue +tmk_core/protocol/midi/Config +tmk_core/protocol/pjrc +tmk_core/protocol/usb_hid +tmk_core/protocol/vusb +tmk_core/tool +tmk_core/tool/chibios +quantum +quantum/api +quantum/audio +quantum/keymap_extras +quantum/process_keycode +quantum/serial_link +quantum/serial_link/protocol +quantum/serial_link/system +quantum/serial_link/tests +quantum/tools +quantum/visualizer +quantum/visualizer/resources +drivers +drivers/avr +drivers/ugfx +drivers/ugfx/gdisp +drivers/ugfx/gdisp/is31fl3731c +drivers/ugfx/gdisp/st7565 diff --git a/keyboards/1up60rgb/info.json b/keyboards/1up60rgb/info.json new file mode 100644 index 00000000..a3b218dc --- /dev/null +++ b/keyboards/1up60rgb/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "1up60rgb", + "manufacturer": "1UP Keyboards", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/amj40/keymaps/myee/build.sh b/keyboards/amj40/keymaps/myee/build.sh new file mode 100644 index 00000000..6b4b4568 --- /dev/null +++ b/keyboards/amj40/keymaps/myee/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/myee/config.h b/keyboards/amj40/keymaps/myee/config.h new file mode 100644 index 00000000..8e6c4dfa --- /dev/null +++ b/keyboards/amj40/keymaps/myee/config.h @@ -0,0 +1,10 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H +#include "../../config.h" + +#define TAPPING_TERM 25 +#define RETRO_TAPPING +#define PERMISSIVE_HOLD + + +#endif \ No newline at end of file diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c new file mode 100644 index 00000000..b36d6c61 --- /dev/null +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -0,0 +1,114 @@ + + + +#include "amj40.h" + +// Keymap myee +// 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] = { + + [_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,\ + F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_LCTL, KC_LGUI,KC_LALT, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \ + ), + + [_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \ + _______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \ + _______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_RAISE] = KEYMAP( \ + KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \ + ), + + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + 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_TAB), + +}; + +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/myee/readme.md b/keyboards/amj40/keymaps/myee/readme.md new file mode 100644 index 00000000..2659292a --- /dev/null +++ b/keyboards/amj40/keymaps/myee/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/myee/rules.mk b/keyboards/amj40/keymaps/myee/rules.mk new file mode 100644 index 00000000..034e697b --- /dev/null +++ b/keyboards/amj40/keymaps/myee/rules.mk @@ -0,0 +1,27 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = 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/myee/updatemerge.sh b/keyboards/amj40/keymaps/myee/updatemerge.sh new file mode 100644 index 00000000..da5457e1 --- /dev/null +++ b/keyboards/amj40/keymaps/myee/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/amj96/amj96.c b/keyboards/amj96/amj96.c new file mode 100644 index 00000000..959e321c --- /dev/null +++ b/keyboards/amj96/amj96.c @@ -0,0 +1,43 @@ +/* Copyright 2017 MechMerlin + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "amj96.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/amj96/amj96.h b/keyboards/amj96/amj96.h new file mode 100644 index 00000000..37bb6566 --- /dev/null +++ b/keyboards/amj96/amj96.h @@ -0,0 +1,43 @@ +/* Copyright 2017 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef AMJ96_H +#define AMJ96_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K09, K0A, K0C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K0B, K0F, K6F,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K0D, K6D,\ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K6E,\ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K0E, K07,\ + K60, K61, K62, K63, K64, K65, K66, K68, K69, K6A, K6B, K6C\ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K07, KC_NO, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F}, \ + { 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_##K1F}, \ + { 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_##K2F}, \ + { 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_##K3F}, \ + { 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, KC_##K4F}, \ + { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F}, \ + { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_NO, KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F} \ +} + + +#endif diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h new file mode 100644 index 00000000..1ba35b54 --- /dev/null +++ b/keyboards/amj96/config.h @@ -0,0 +1,203 @@ +/* +Copyright 2017 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6074 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Han Chen +#define PRODUCT AMJ96 +#define DESCRIPTION 96 key custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN D4 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* number of backlight levels */ +#ifdef BREATHING_LED_ENABLE +#ifdef FADING_LED_ENABLE +#define BACKLIGHT_LEVELS 8 +#else +#define BACKLIGHT_LEVELS 6 +#endif +#else +#define BACKLIGHT_LEVELS 3 +#endif +#define BACKLIGHT_CUSTOM + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGB_DI_PIN D3 + +#endif diff --git a/keyboards/amj96/info.json b/keyboards/amj96/info.json new file mode 100644 index 00000000..13bcd6a9 --- /dev/null +++ b/keyboards/amj96/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "AMJ96", + "manufacturer": "AMJ", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 19, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Scroll Lock", "x":14, "y":0}, {"label":"Pause", "x":15, "y":0}, {"label":"Num Lock", "x":16, "y":0}, {"label":"/", "x":17, "y":0}, {"label":"*", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Insert", "x":15, "y":1}, {"label":"Home", "x":16, "y":1}, {"label":"PgUp", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Delete", "x":15, "y":2}, {"label":"End", "x":16, "y":2}, {"label":"PgDn", "x":17, "y":2}, {"label":"7", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"8", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"1", "x":14, "y":4}, {"label":"\u2191", "x":15, "y":4}, {"label":"\u2190", "x":16, "y":4}, {"label":"\u2193", "x":17, "y":4}, {"label":"\u2192", "x":18, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}, {"label":"2", "x":15, "y":5}, {"label":".", "x":16, "y":5}, {"label":"3", "x":17, "y":5}, {"label":"9", "x":18, "y":5}] + } + } +} diff --git a/keyboards/amj96/keymaps/default/config.h b/keyboards/amj96/keymaps/default/config.h new file mode 100644 index 00000000..5e346088 --- /dev/null +++ b/keyboards/amj96/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 MechMerlin + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/amj96/keymaps/default/keymap.c b/keyboards/amj96/keymaps/default/keymap.c new file mode 100644 index 00000000..72a44eed --- /dev/null +++ b/keyboards/amj96/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2017 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "amj96.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,PAUS, INS, DEL, PGUP,PGDN, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC,NO, NLCK,PSLS,PAST,PMNS, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, P7, P8, P9, PPLS, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, \ + LSFT,NO, Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT,UP, P1, P2, P3, PENT,\ + LCTL,LGUI,LALT, SPC, RALT,FN0, LEFT,DOWN, RGHT,P0, PDOT, PENT), + + LAYOUT( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,NO, TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,\ + TRNS,NO, TRNS,TRNS, TRNS, TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/amj96/keymaps/default/readme.md b/keyboards/amj96/keymaps/default/readme.md new file mode 100644 index 00000000..478ab996 --- /dev/null +++ b/keyboards/amj96/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for amj96 diff --git a/keyboards/amj96/matrix.c b/keyboards/amj96/matrix.c new file mode 100644 index 00000000..e41bbec7 --- /dev/null +++ b/keyboards/amj96/matrix.c @@ -0,0 +1,222 @@ +/* +Copyright 2014 Kai Ryu + +This 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 "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#ifdef UART_RGB_ENABLE +#include "uart_rgb.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void init_rows(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + +#ifdef UART_RGB_ENABLE + uart_rgb_init(); +#endif + // disable JTAG + MCUCR = _BV(JTD); + MCUCR = _BV(JTD); + + // 85 REST + DDRD |= _BV(PD7); + PORTD |= _BV(PD7); + + // initialize row and col + init_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } +} + +uint8_t matrix_scan(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<| + ------------------------------------------------------------- + Hm: Home + MoL1: Mo(L1) + */ + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( + // row 1 + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, \ + KC_DEL, \ + // row 2 + 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, \ + // row 3 + 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, \ + // row 4 + 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, \ + // row 5 + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(LAYER_1), KC_BSPC, KC_HOME, KC_END, KC_LEFT, KC_DOWN, \ + KC_RIGHT + ), + + /* + ------------------------------------------------------------- + |LED| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Ins| + ------------------------------------------------------------- + | | | | @ | | | | | | | |BDn|BUp| | + ------------------------------------------------------------- + | | | | | | | | | | | | | | + ------------------------------------------------------------- + | | | |Cal| |www| |Mut| | | | |VUp| + ------------------------------------------------------------- + | | | | Pause | | |PUp|PDn|PTk|VDn|NTk| + ------------------------------------------------------------- + @: Email + BDn: LED brightness down + BUp: LED brightness up + Cal: Calculator + Ins: Insert + Mut: Mute + NTk: Next track + PDn: Page down + PTk: Previous track + PUp: Page up + VDn: Volume down + VUp: Volume up + www: Browser home page + */ + [LAYER_1] = KEYMAP_HHKB_ARROW( + // row 1 + BL_TOGG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_F12, KC_TRNS, KC_INS, \ + // row 2 + KC_TRNS, KC_TRNS, KC_TRNS, KC_MAIL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_DEC, BL_INC, KC_TRNS, \ + // row 3 + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, \ + // row 4 + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_WHOM, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_VOLU, \ + // row 5 + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_MPRV, KC_VOLD, \ + KC_MNXT + ) +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_ansi/readme.md b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/readme.md new file mode 100644 index 00000000..664a0a04 --- /dev/null +++ b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/readme.md @@ -0,0 +1,66 @@ +Yida's keymap for BananaSplit +=== + +Hightlight: split backspace, split space, arrows on bottom right, and +backlighting support (capslock's backlighting cannot be controlled separately). + +Note that "Previous track" and "next track" might only work with Windows. + +Default layer: + +``` + ------------------------------------------------------------- + |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` |Del| + ------------------------------------------------------------- + | 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| Up| + ------------------------------------------------------------- + |Ctrl| GUI| Alt| Space |MoL1| Backspc| Hm|End| <-|Dwn| ->| + ------------------------------------------------------------- + Hm: Home + MoL1: Mo(L1) +``` + +Layer_1: + +``` + ------------------------------------------------------------- + |LED| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Ins| + ------------------------------------------------------------- + | | | | @ | | | | | | | |BDn|BUp| | + ------------------------------------------------------------- + | | | | | | | | | | | | | | + ------------------------------------------------------------- + | | | |Cal| |www| |Mut| | | | |VUp| + ------------------------------------------------------------- + | | | | Pause | | |PUp|PDn|PTk|VDn|NTk| + ------------------------------------------------------------- + @: Email + BDn: LED brightness down + BUp: LED brightness up + Cal: Calculator + Ins: Insert + Mut: Mute + NTk: Next track + PDn: Page down + PTk: Previous track + PUp: Page up + VDn: Volume down + VUp: Volume up + www: Browser home page +``` + +Compile and flash: + +`cd` to `/qmk_firmware` folder, then +``` +make bananasplit:jockyxu1122_ansi +``` + +A .hex file will be generated under `/qmk_firmware` folder. + + +To flash, use QMK Toolbox. diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c b/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c new file mode 100644 index 00000000..d73b4851 --- /dev/null +++ b/keyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c @@ -0,0 +1,105 @@ +/* + Author: jockyxu1122 + + Hightlight: split backspace, ISO Enter, split space, arrows on bottom right, + and toggable capslock backlight. + + Note that "Previous track" and "next track" might only work with Windows. +*/ + +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + ------------------------------------------------------------- + |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` |Del| + ------------------------------------------------------------- + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Ent | + -------------------------------------------------------- - + | Caps | A | S | D | F | G | H | J | K | L | ; | ' | \ | | + ------------------------------------------------------------- + | Shift | Z | X | C | V | B | N | M | , | . | Shift| Up| / | + ------------------------------------------------------------- + |Ctrl| GUI| Alt| Space |MoL1| Backspc| Hm|End| <-|Dwn| ->| + ------------------------------------------------------------- + Hm: Home + MoL1: Mo(L1) + */ + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( + // row 1 + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, \ + KC_DEL, \ + // row 2 + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, \ + // row 3 + 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_BSLS, \ + // row 4 + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, \ + // row 5 + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(LAYER_1), KC_BSPC, KC_HOME, KC_END, KC_LEFT, KC_DOWN, \ + KC_RIGHT + ), + + /* + ------------------------------------------------------------- + | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Ins| + ------------------------------------------------------------- + | | | | @ | | | | | | | | | | | + -------------------------------------------------------- - + | | | | | | | | | | | | | | | + ------------------------------------------------------------- + | | | |Cal| |www| |Mut| | | |VUp| | + ------------------------------------------------------------- + | | | | Pause | | |PUp|PDn|PTk|VDn|NTk| + ------------------------------------------------------------- + @: Email + Cal: Calculator + Ins: Insert + Mut: Mute + NTk: Next track + PDn: Page down + PTk: Previous track + PUp: Page up + VDn: Volume down + VUp: Volume up + www: Browser home page + */ + [LAYER_1] = KEYMAP_HHKB_ARROW( + // row 1 + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_F12, KC_TRNS, KC_INS, \ + // row 2 + KC_TRNS, KC_TRNS, KC_TRNS, KC_MAIL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + // row 3 + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, \ + // row 4 + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_WHOM, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLU, KC_TRNS, \ + // row 5 + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_MPRV, KC_VOLD, \ + KC_MNXT + ) +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +/* +Capslock's led cannot be controlled separately on bananasplit and you can only turn on/off all + leds at once. If you only install led for capslock, it will look like capslock has toggable + backlight. +*/ +void led_set_user(uint8_t usb_led) { + if (usb_led && (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 7); + PORTB |= (1 << 7); + } else { + DDRB &= ~(1 << 7); + PORTB &= ~(1 << 7); + } +} diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_iso/readme.md b/keyboards/bananasplit/keymaps/jockyxu1122_iso/readme.md new file mode 100644 index 00000000..e135f73e --- /dev/null +++ b/keyboards/bananasplit/keymaps/jockyxu1122_iso/readme.md @@ -0,0 +1,61 @@ +Yida's keymap for BananaSplit +=== + +Hightlight: split backspace, ISO Enter, split space, arrows on bottom right, and toggable capslock backlight. + +Note that "Previous track" and "next track" might only work with Windows. + +Default layer: +``` + ------------------------------------------------------------- + |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` |Del| + ------------------------------------------------------------- + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Ent | + -------------------------------------------------------- - + | Caps | A | S | D | F | G | H | J | K | L | ; | ' | \ | | + ------------------------------------------------------------- + | Shift | Z | X | C | V | B | N | M | , | . | Shift| Up| / | + ------------------------------------------------------------- + |Ctrl| GUI| Alt| Space |MoL1| Backspc| Hm|End| <-|Dwn| ->| + ------------------------------------------------------------- + Hm: Home + MoL1: Mo(L1) +``` + +Layer_1: +``` + ------------------------------------------------------------- + | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Ins| + ------------------------------------------------------------- + | | | | @ | | | | | | | | | | | + -------------------------------------------------------- - + | | | | | | | | | | | | | | | + ------------------------------------------------------------- + | | | |Cal| |www| |Mut| | | |VUp| | + ------------------------------------------------------------- + | | | | Pause | | |PUp|PDn|PTk|VDn|NTk| + ------------------------------------------------------------- + @: Email + Cal: Calculator + Ins: Insert + Mut: Mute + NTk: Next track + PDn: Page down + PTk: Previous track + PUp: Page up + VDn: Volume down + VUp: Volume up + www: Browser home page +``` + +Compile and flash: + +`cd` to `/qmk_firmware` folder, then +``` +make bananasplit:jockyxu1122_iso +``` + +A .hex file will be generated under `/qmk_firmware` folder. + + +To flash, use QMK Toolbox. diff --git a/keyboards/bfake/keymaps/mechmerlin/keymap.c b/keyboards/bfake/keymaps/mechmerlin/keymap.c new file mode 100644 index 00000000..705339b9 --- /dev/null +++ b/keyboards/bfake/keymaps/mechmerlin/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "bfake.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_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + [1] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [3] = 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/bfake/keymaps/mechmerlin/readme.md b/keyboards/bfake/keymaps/mechmerlin/readme.md new file mode 100644 index 00000000..b85b6537 --- /dev/null +++ b/keyboards/bfake/keymaps/mechmerlin/readme.md @@ -0,0 +1,18 @@ +MechMerlin's FaceW Sprit Edition Layout +====================== + +This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin). + +## Keyboard Notes +- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com) +- Uses ps2avru instead of ps2avrgb +- To put in reset mode hold `q` while inserting the USB cable +- Use flashing instructions from ps2avrgb QMK port + +## Keymap Notes +- Does not support any form of inswitch lighting as Merlin hates them. +- Arrow toggle switch to the right of right shift +- Reset is FN + Left Shift + R + +### Build +To build this keymap, simply run `make bfake:mechmerlin` from the qmk_firmware directory. diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c new file mode 100644 index 00000000..91f4826f --- /dev/null +++ b/keyboards/ca66/ca66.c @@ -0,0 +1 @@ +#include "ca66.h" diff --git a/keyboards/ca66/ca66.h b/keyboards/ca66/ca66.h new file mode 100644 index 00000000..9e3638aa --- /dev/null +++ b/keyboards/ca66/ca66.h @@ -0,0 +1,20 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K414, \ + K401, K402, K403, K404, K406, K408, K409, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \ +} + +#endif diff --git a/keyboards/ca66/config.h b/keyboards/ca66/config.h new file mode 100644 index 00000000..f00b5109 --- /dev/null +++ b/keyboards/ca66/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Barry +#define PRODUCT CA66 +#define DESCRIPTION CA66 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 } +#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 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/ca66/keymaps/default/keymap.c b/keyboards/ca66/keymaps/default/keymap.c new file mode 100644 index 00000000..7feb0afb --- /dev/null +++ b/keyboards/ca66/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include "ca66.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_BSPC, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, RGB_TOG, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME, + KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= (1 << 1); PORTD &= ~(1 << 1); + } else { + DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); + } +} diff --git a/keyboards/ca66/readme.md b/keyboards/ca66/readme.md new file mode 100644 index 00000000..f8464fdd --- /dev/null +++ b/keyboards/ca66/readme.md @@ -0,0 +1,13 @@ +CA66 +== + +Custom 65% + +Keyboard Maintainer: QMK Community +Hardware Supported: CA66 + +Make example for this keyboard (after setting up your build environment): + + make ca66: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/ca66/rules.mk b/keyboards/ca66/rules.mk new file mode 100644 index 00000000..d3ad3d20 --- /dev/null +++ b/keyboards/ca66/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= yes diff --git a/keyboards/clueboard/2x1800/2x1800.c b/keyboards/clueboard/2x1800/2x1800.c new file mode 100644 index 00000000..4ad78899 --- /dev/null +++ b/keyboards/clueboard/2x1800/2x1800.c @@ -0,0 +1,62 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +void matrix_init_kb(void) { + // Set our LED pins as output + DDRB |= (1<<4); // Numlock + DDRB |= (1<<5); // Capslock + DDRB |= (1<<6); // Scroll Lock + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TWOX1800_H +#define TWOX1800_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, k04, k06, k07, k08, k09, k0a, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k90, k91, k92, k93, k94, k95, k97, k98, k99, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, ka0, ka1, ka2, ka3, ka4, ka5, k96, ka7, ka8, ka9, kaa, \ + k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, kb0, kb1, kb2, kb3, kb4, kb5, ka6, kb6, kb7, kb8, kb9 \ +) \ +{ \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09, k0a }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a }, \ + { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9, kaa }, \ + { kb0, kb1, kb2, kb3, kb4, kb5, kb6, kb7, kb8, kb9, KC_NO } \ +} + +#define LAYOUT_4U_SPACE( \ + k00, k01, k02, k03, k04, k06, k07, k08, k09, k0a, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k90, k91, k92, k93, k94, k95, k97, k98, k99, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, ka0, ka1, ka2, ka3, ka4, ka5, k96, ka7, ka8, ka9, kaa, \ + k51, k52, k53, k54, k55, k56, k57, k58, kb0, kb2, kb3, kb4, kb5, ka6, kb6, kb7, kb8, kb9 \ +) \ +{ \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09, k0a }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a }, \ + { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, KC_NO, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9, kaa }, \ + { kb0, KC_NO, kb2, kb3, kb4, kb5, kb6, kb7, kb8, kb9, KC_NO } \ +} + +#define LAYOUT_7U_SPACE( \ + k00, k01, k02, k03, k04, k06, k07, k08, k09, k0a, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k90, k91, k92, k93, k94, k95, k97, k98, k99, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, ka0, ka1, ka2, ka3, ka4, ka5, k96, ka7, ka8, ka9, kaa, \ + k51, k52, k53, k54, k55, k56, k57, kb0, kb4, kb5, ka6, kb6, kb7, kb8, kb9 \ +) \ +{ \ + { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09, k0a }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a }, \ + { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, KC_NO, KC_NO, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9, kaa }, \ + { kb0, KC_NO, KC_NO, KC_NO, kb4, kb5, kb6, kb7, kb8, kb9, KC_NO } \ +} + +#endif diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h new file mode 100644 index 00000000..0aff9397 --- /dev/null +++ b/keyboards/clueboard/2x1800/config.h @@ -0,0 +1,192 @@ +/* +Copyright 2017 Zach White + +This 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 0xC1ED +#define PRODUCT_ID 0x23A0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT Double 1800 +#define DESCRIPTION What does it mean? + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 11 + +/* + * 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 { C0, C1, C2, C3, C7, F7, B1, F2, F3, F4, F5, F6 } +#define MATRIX_COL_PINS { D2, D3, D4, D5, D7, E0, E1, B0, E6, B3, B2 } +#define UNUSED_PINS { D0, D1, D6, C5, C6, E4, E5, E7, F0, F1, A0, A1, A2, A3, A4, A5, A6, A7 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* audio support */ +#define B7_AUDIO +#define C4_AUDIO + +/* number of backlight levels */ +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/clueboard/2x1800/info.json b/keyboards/clueboard/2x1800/info.json new file mode 100644 index 00000000..0a669da2 --- /dev/null +++ b/keyboards/clueboard/2x1800/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "CB 2x1800", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "at90usb1286", + "bootloader": "teensy", + "width": 24, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Home", "x":0, "y":0}, {"label":"End", "x":1, "y":0}, {"label":"PgUp", "x":2, "y":0}, {"label":"PgDn", "x":3, "y":0}, {"label":"Esc", "x":4.75, "y":0}, {"label":"F1", "x":6.25, "y":0}, {"label":"F2", "x":7.25, "y":0}, {"label":"F3", "x":8.25, "y":0}, {"label":"F4", "x":9.25, "y":0}, {"label":"F5", "x":10.75, "y":0}, {"label":"F6", "x":11.75, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15.25, "y":0}, {"label":"F10", "x":16.25, "y":0}, {"label":"F11", "x":17.25, "y":0}, {"label":"F12", "x":18.25, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"Insert", "x":23, "y":0}, {"label":"-", "x":0, "y":1.25}, {"label":"Num Lock", "x":1, "y":1.25}, {"label":"/", "x":2, "y":1.25}, {"label":"*", "x":3, "y":1.25}, {"label":"~", "x":4.5, "y":1.25}, {"label":"!", "x":5.5, "y":1.25}, {"label":"@", "x":6.5, "y":1.25}, {"label":"#", "x":7.5, "y":1.25}, {"label":"$", "x":8.5, "y":1.25}, {"label":"%", "x":9.5, "y":1.25}, {"label":"^", "x":10.5, "y":1.25}, {"label":"&", "x":11.5, "y":1.25}, {"label":"*", "x":12.5, "y":1.25}, {"label":"(", "x":13.5, "y":1.25}, {"label":")", "x":14.5, "y":1.25}, {"label":"_", "x":15.5, "y":1.25}, {"label":"+", "x":16.5, "y":1.25}, {"label":"Backspace", "x":17.5, "y":1.25, "w":2}, {"label":"Num Lock", "x":20, "y":1.25}, {"label":"/", "x":21, "y":1.25}, {"label":"*", "x":22, "y":1.25}, {"label":"-", "x":23, "y":1.25}, {"label":"+", "x":0, "y":2.25, "h":2}, {"label":"7", "x":1, "y":2.25}, {"label":"8", "x":2, "y":2.25}, {"label":"9", "x":3, "y":2.25}, {"label":"Tab", "x":4.5, "y":2.25, "w":1.5}, {"label":"Q", "x":6, "y":2.25}, {"label":"W", "x":7, "y":2.25}, {"label":"E", "x":8, "y":2.25}, {"label":"R", "x":9, "y":2.25}, {"label":"T", "x":10, "y":2.25}, {"label":"Y", "x":11, "y":2.25}, {"label":"U", "x":12, "y":2.25}, {"label":"I", "x":13, "y":2.25}, {"label":"O", "x":14, "y":2.25}, {"label":"P", "x":15, "y":2.25}, {"label":"{", "x":16, "y":2.25}, {"label":"}", "x":17, "y":2.25}, {"label":"|", "x":18, "y":2.25, "w":1.5}, {"label":"7", "x":20, "y":2.25}, {"label":"8", "x":21, "y":2.25}, {"label":"9", "x":22, "y":2.25}, {"label":"+", "x":23, "y":2.25, "h":2}, {"label":"4", "x":1, "y":3.25}, {"label":"5", "x":2, "y":3.25}, {"label":"6", "x":3, "y":3.25}, {"label":"Caps Lock", "x":4.5, "y":3.25, "w":1.75}, {"label":"A", "x":6.25, "y":3.25}, {"label":"S", "x":7.25, "y":3.25}, {"label":"D", "x":8.25, "y":3.25}, {"label":"F", "x":9.25, "y":3.25}, {"label":"G", "x":10.25, "y":3.25}, {"label":"H", "x":11.25, "y":3.25}, {"label":"J", "x":12.25, "y":3.25}, {"label":"K", "x":13.25, "y":3.25}, {"label":"L", "x":14.25, "y":3.25}, {"label":":", "x":15.25, "y":3.25}, {"label":"\"", "x":16.25, "y":3.25}, {"label":"Enter", "x":17.25, "y":3.25, "w":2.25}, {"label":"4", "x":20, "y":3.25}, {"label":"5", "x":21, "y":3.25}, {"label":"6", "x":22, "y":3.25}, {"label":"Enter", "x":0, "y":4.25, "h":2}, {"label":"1", "x":1, "y":4.25}, {"label":"2", "x":2, "y":4.25}, {"label":"3", "x":3, "y":4.25}, {"label":"\u2191", "x":4.25, "y":4.5}, {"label":"Shift", "x":5.5, "y":4.25, "w":1.25}, {"label":"Z", "x":6.75, "y":4.25}, {"label":"X", "x":7.75, "y":4.25}, {"label":"C", "x":8.75, "y":4.25}, {"label":"V", "x":9.75, "y":4.25}, {"label":"B", "x":10.75, "y":4.25}, {"label":"N", "x":11.75, "y":4.25}, {"label":"M", "x":12.75, "y":4.25}, {"label":"<", "x":13.75, "y":4.25}, {"label":">", "x":14.75, "y":4.25}, {"label":"?", "x":15.75, "y":4.25}, {"label":"Shift", "x":16.75, "y":4.25, "w":1.75}, {"label":"\u2191", "x":18.75, "y":4.5}, {"label":"1", "x":20, "y":4.25}, {"label":"2", "x":21, "y":4.25}, {"label":"3", "x":22, "y":4.25}, {"label":"Enter", "x":23, "y":4.25, "h":2}, {"label":"0", "x":1, "y":5.25}, {"label":".", "x":2, "y":5.25}, {"label":"\u2190", "x":3.25, "y":5.5}, {"label":"\u2193", "x":4.25, "y":5.5}, {"label":"\u2192", "x":5.25, "y":5.5}, {"label":"Ctrl", "x":6.5, "y":5.25}, {"label":"Win", "x":7.5, "y":5.25}, {"label":"Alt", "x":8.5, "y":5.25}, {"label":"7u", "x":8.5, "y":5.25, "w":7}, {"label":"1u", "x":9.5, "y":5.25}, {"label":"4u", "x":9.5, "y":5.25, "w":4}, {"label":"1u", "x":10.5, "y":5.25}, {"label":"1u", "x":11.5, "y":5.25}, {"label":"1u", "x":12.5, "y":5.25}, {"label":"Alt", "x":13.5, "y":5.25}, {"label":"Win", "x":14.5, "y":5.25}, {"label":"Menu", "x":15.5, "y":5.25}, {"label":"Ctrl", "x":16.5, "y":5.25}, {"label":"\u2190", "x":17.75, "y":5.5}, {"label":"\u2193", "x":18.75, "y":5.5}, {"label":"\u2192", "x":19.75, "y":5.5}, {"label":"0", "x":21, "y":5.25}, {"label":".", "x":22, "y":5.25}] + } + } +} diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/default/keymap.c b/keyboards/clueboard/2x1800/keymaps/default/keymap.c new file mode 100644 index 00000000..f0b7184e --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PSLS, \ + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; diff --git a/keyboards/clueboard/2x1800/keymaps/default/readme.md b/keyboards/clueboard/2x1800/keymaps/default/readme.md new file mode 100644 index 00000000..4e3457ef --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for 2x1800 diff --git a/keyboards/clueboard/2x1800/keymaps/default_4u/config.h b/keyboards/clueboard/2x1800/keymaps/default_4u/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_4u/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/default_4u/keymap.c b/keyboards/clueboard/2x1800/keymaps/default_4u/keymap.c new file mode 100644 index 00000000..d12a3fc8 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_4u/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_4U_SPACE( + KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PSLS, \ + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; diff --git a/keyboards/clueboard/2x1800/keymaps/default_4u/readme.md b/keyboards/clueboard/2x1800/keymaps/default_4u/readme.md new file mode 100644 index 00000000..a696972e --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_4u/readme.md @@ -0,0 +1 @@ +# The default keymap for 2x1800 with 4u Spacebar diff --git a/keyboards/clueboard/2x1800/keymaps/default_7u/config.h b/keyboards/clueboard/2x1800/keymaps/default_7u/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c b/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c new file mode 100644 index 00000000..5df6fe0f --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_7U_SPACE( + KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PSLS, \ + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; diff --git a/keyboards/clueboard/2x1800/keymaps/default_7u/readme.md b/keyboards/clueboard/2x1800/keymaps/default_7u/readme.md new file mode 100644 index 00000000..f5718e84 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/readme.md @@ -0,0 +1 @@ +# The default keymap for 2x1800 with 7u spacebar diff --git a/keyboards/clueboard/2x1800/keymaps/macroboard/config.h b/keyboards/clueboard/2x1800/keymaps/macroboard/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/macroboard/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/macroboard/keymap.c b/keyboards/clueboard/2x1800/keymaps/macroboard/keymap.c new file mode 100644 index 00000000..2d8ef349 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/macroboard/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +enum custom_keycodes { + MACRO01 = SAFE_RANGE, + MACRO02, + MACRO03, + MACRO04, + MACRO05, + MACRO06, + MACRO07, + MACRO08, + MACRO09, + MACRO10, + MACRO11, + MACRO12, + MACRO13, + MACRO14, + MACRO15, + MACRO16, + MACRO17, + MACRO18, + MACRO19, + MACRO20, + MACRO21, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + MACRO01, MACRO02, MACRO03, MACRO04, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + MACRO05, MACRO06, MACRO07, MACRO08, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + MACRO09, MACRO10, MACRO11, MACRO12, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PSLS, \ + MACRO13, MACRO14, MACRO15, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + MACRO16, MACRO17, MACRO18, MACRO19, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + MACRO20, MACRO21, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case MACRO01: + SEND_STRING("This is macro 01"); + return false; + case MACRO02: + SEND_STRING("This is macro 02"); + return false; + case MACRO03: + SEND_STRING("This is macro 03"); + return false; + case MACRO04: + SEND_STRING("This is macro 04"); + return false; + case MACRO05: + SEND_STRING("This is macro 05"); + return false; + case MACRO06: + SEND_STRING("This is macro 06"); + return false; + case MACRO07: + SEND_STRING("This is macro 07"); + return false; + case MACRO08: + SEND_STRING("This is macro 08"); + return false; + case MACRO09: + SEND_STRING("This is macro 09"); + return false; + case MACRO10: + SEND_STRING("This is macro 10"); + return false; + case MACRO11: + SEND_STRING("This is macro 11"); + return false; + case MACRO12: + SEND_STRING("This is macro 12"); + return false; + case MACRO13: + SEND_STRING("This is macro 13"); + return false; + case MACRO14: + SEND_STRING("This is macro 14"); + return false; + case MACRO15: + SEND_STRING("This is macro 15"); + return false; + case MACRO16: + SEND_STRING("This is macro 16"); + return false; + case MACRO17: + SEND_STRING("This is macro 17"); + return false; + case MACRO18: + SEND_STRING("This is macro 18"); + return false; + case MACRO19: + SEND_STRING("This is macro 19"); + return false; + case MACRO20: + SEND_STRING("This is macro 20"); + return false; + case MACRO21: + SEND_STRING("This is macro 21"); + return false; + } + } + return true; +}; diff --git a/keyboards/clueboard/2x1800/keymaps/macroboard/readme.md b/keyboards/clueboard/2x1800/keymaps/macroboard/readme.md new file mode 100644 index 00000000..61c9468e --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/macroboard/readme.md @@ -0,0 +1 @@ +# A macro keymap template diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/keymap.c b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/keymap.c new file mode 100644 index 00000000..d4108a77 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + KC_NO, KC_NO, KC_BTN4, KC_BTN5, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_WH_U, KC_NO, KC_MS_U, 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_P7, KC_P8, KC_P9, KC_PSLS, \ + KC_MS_L, KC_BTN3, KC_MS_R, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_WH_D, KC_BTN1, KC_MS_D, KC_BTN2, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_WH_L, KC_WH_R, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/readme.md b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/readme.md new file mode 100644 index 00000000..41304eca --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/readme.md @@ -0,0 +1 @@ +# Mouse keys in the left numpad diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk new file mode 100644 index 00000000..6c605dae --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h new file mode 100644 index 00000000..f5eccb22 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/keymap.c b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/keymap.c new file mode 100644 index 00000000..ee255e23 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2017 Zach White + * + * This 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 "2x1800.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ + \ + KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, \ + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_NO, KC_MS_U, KC_NO, KC_WH_U, \ + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_MS_L, KC_BTN3, KC_MS_R, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_BTN1, KC_MS_D, KC_BTN2, KC_WH_D, \ + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_WH_L, KC_WH_R \ +) +}; diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/readme.md b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/readme.md new file mode 100644 index 00000000..51939d63 --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/readme.md @@ -0,0 +1 @@ +# Mouse keys in the right numpad diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk new file mode 100644 index 00000000..6c605dae --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/2x1800/readme.md b/keyboards/clueboard/2x1800/readme.md new file mode 100644 index 00000000..a820852c --- /dev/null +++ b/keyboards/clueboard/2x1800/readme.md @@ -0,0 +1,13 @@ +# Clueboard 2x1800 + +Clueboard Double 1800 All The Way + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Clueboard 2x1800 PCB +* Hardware Availability: 2018 Apr 1 Group Buy + +Make example for this keyboard (after setting up your build environment): + + make 2x1800:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/2x1800/rules.mk b/keyboards/clueboard/2x1800/rules.mk new file mode 100644 index 00000000..2f09f9b9 --- /dev/null +++ b/keyboards/clueboard/2x1800/rules.mk @@ -0,0 +1,63 @@ +# 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=1024 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md index 5dfa1e35..226bc079 100644 --- a/keyboards/clueboard/readme.md +++ b/keyboards/clueboard/readme.md @@ -1,5 +1,3 @@ -# Clueboard - ![Clueboard Logo](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/59c9703318b27d1ab34f40df/1508257572555/) Clueboard makes fully customizable custom keyboards in a variety of formfactors. Inside this directory you'll find support for the entire line of Clueboard products. @@ -9,5 +7,6 @@ Clueboard makes fully customizable custom keyboards in a variety of formfactors. * [`17`](17/): Clueboard "Cluepad" PCB * [`60`](60/): Clueboard 60% PCB * [`66`](66/): Clueboard 66% PCB + * [`2x1800`](2x1800/): Clueboard 2x1800 PCB * [`card`](card/): Special Cluecard PCB * Hardware Availability: [clueboard.co](https://clueboard.co/) diff --git a/keyboards/contra/info.json b/keyboards/contra/info.json new file mode 100644 index 00000000..97b7cddf --- /dev/null +++ b/keyboards/contra/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Contra", + "manufacturer": "Cartel Keyboards", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "caterina", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_mit": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3, "w":2}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + }, + + "LAYOUT_ortho_4x12": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back Space", "x":11, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + } + } +} diff --git a/keyboards/contra/keymaps/basic/config.h b/keyboards/contra/keymaps/basic/config.h new file mode 100644 index 00000000..a1635f2b --- /dev/null +++ b/keyboards/contra/keymaps/basic/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/contra/keymaps/basic/keymap.c b/keyboards/contra/keymaps/basic/keymap.c new file mode 100644 index 00000000..95a96426 --- /dev/null +++ b/keyboards/contra/keymaps/basic/keymap.c @@ -0,0 +1,169 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "contra.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Tab | Alt | GUI |Lower | Space |Raise | Left |Right | Up |Down | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {KC_ESC, KC_TAB, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_RGHT, KC_UP, KC_DOWN} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Tab | Alt | GUI |Lower | Space |Raise | Left |Right | Up |Down | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_GRV, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {KC_ESC, KC_TAB, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_RGHT, KC_UP, KC_DOWN} +}, + +/* 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} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |AGnorm|AGswap|Qwerty|Colemk| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/contra/keymaps/basic/readme.md b/keyboards/contra/keymaps/basic/readme.md new file mode 100644 index 00000000..195bc2c1 --- /dev/null +++ b/keyboards/contra/keymaps/basic/readme.md @@ -0,0 +1,72 @@ +# A Basic Contra Layout + +The *default* layout currently (as of Mar 19, 2018) has a lot of components from Planck's default layout and is not very suitable for a basic Contra board. This basic layout is developed from Planck's default layout but has removed the parts that's irrelevant to a Contra board. + +My other keyboard is a HHKB and I don't use `Tab` or `Esc` key that much and hence the unusual placements for those keys. + +## QWERTY (Normal) Layer +``` +,-----------------------------------------------------------------------------------. + | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Esc | Tab | Alt | GUI |Lower | Space |Raise | Left |Right | Up |Down | + `-----------------------------------------------------------------------------------' +``` + +## Colemak Layer +Switch from `Adjust` layer. +``` +,-----------------------------------------------------------------------------------. + | ` | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | H | N | E | I | O | ' | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Esc | Tab | Alt | GUI |Lower | Space |Raise | Left |Right | Up |Down | + `-----------------------------------------------------------------------------------' +``` + +## Lower +``` +,-----------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' +``` + +## 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 | + `-----------------------------------------------------------------------------------' +``` + +## Adjust +`AGnorm` and `AGswap` switches `alt` and `os` key on the keyboard. +``` +,-----------------------------------------------------------------------------------. + | | | | | | | | | | | | Del | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | |AGnorm|AGswap|Qwerty|Colemk| | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | | | | | | | | + `-----------------------------------------------------------------------------------' +``` \ No newline at end of file diff --git a/keyboards/contra/keymaps/ryanm101/config.h b/keyboards/contra/keymaps/ryanm101/config.h new file mode 100644 index 00000000..9a458b89 --- /dev/null +++ b/keyboards/contra/keymaps/ryanm101/config.h @@ -0,0 +1,45 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_TERM 200 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/contra/keymaps/ryanm101/keymap.c b/keyboards/contra/keymaps/ryanm101/keymap.c new file mode 100644 index 00000000..f8fbb960 --- /dev/null +++ b/keyboards/contra/keymaps/ryanm101/keymap.c @@ -0,0 +1,261 @@ +#include "contra.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom Key Combos +#define LCKSCR LCTL(LGUI(KC_Q)) +//#define KC_CAD LCTL(LALT(KC_DEL)) // CTL+ALT+DEL (windows) +//#define KC_CAE LGUI(LALT(KC_ESC)) // CMD+ALT+ESC (Force Close) +//#define KC_SCREENSHOT LGUI(S(KC_4)) // CMD+SHIFT+4 (Mac Screenshot) + +#define _QWERTY 0 +#define _QWERTYMAC 1 +#define _L1 2 +#define _L2 3 +#define _L3 4 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + QWERTYMAC, + L1, + L2, + L3 +}; + +//Tap Dance Declarations +#define COLON TD(CLN) +#define QUOTE TD(QUOT) +#define PARAN TD(PAR) +#define CURLY TD(CUR) +#define SQUAR TD(SQU) +#define ANGUL TD(ANG) +#define TMUX TD(TD_TMUX) +#define CADCAE TD(CAD_CAE) +#define SHIFTSLASHPIPE TD(TD_SHIFTSLASHPIPE) + +enum { + CLN = 0, + QUOT, + CAD_CAE, + PAR, + CUR, + SQU, + ANG, + TD_TMUX, + TD_SHIFTSLASHPIPE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ;: | '@ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | ,< | .> | /? |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | \| | L1 | | | L2 | 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, COLON, QUOTE}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, + {KC_LCTL, KC_LGUI, KC_LALT, KC_NONUS_BSLASH, MO(_L1), XXXXXXX, KC_SPC, MO(_L2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* QwertyMAC + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ;: | '@ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | ,< | .> | /? |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | \| | L1 | | | L2 | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTYMAC] = { + {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, COLON, QUOTE}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT}, + {KC_LCTL, KC_LALT, KC_LGUI, KC_NONUS_BSLASH, MO(_L1), XXXXXXX,KC_SPC, MO(_L2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* L1 + * ,-----------------------------------------------------------------------------------. + * | `¬ |INSERT| PGUP | HOME | <> | | () | 7& | 8* | 9( | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |DELETE| PGDN | END | [] | {} | =+ | 4$ | 5% | 6^ | * | LMAC | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |LSHIFT|PSCRN | |CADCAE| L3 |LCKSCR| -_ | 1! | 2" | 3£ | /? |ENTER | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | #~ | | | | | 0) | .> | | MENU | + * `-----------------------------------------------------------------------------------' + */ +[_L1] = { + {KC_GRV, KC_INSERT, KC_PGUP, KC_HOME, ANGUL, XXXXXXX, PARAN, KC_7, KC_8, KC_9, XXXXXXX, KC_BSPC}, + {XXXXXXX, KC_DELETE, KC_PGDOWN, KC_END, SQUAR, CURLY, KC_EQL, KC_4, KC_5, KC_6, S(KC_8), TG(_QWERTYMAC)}, + {_______, KC_PSCREEN, XXXXXXX, CADCAE, MO(_L3), LCKSCR, KC_MINS, KC_1, KC_2, KC_3, KC_SLSH, KC_ENT}, + {_______, _______, _______, KC_NUHS, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_0, ALGR_T(KC_DOT), XXXXXXX, KC_MENU} +}, + +/* L2 + * ,-----------------------------------------------------------------------------------. + * |Sysreq| F9 | F10 | F11 | F12 | |NUMLK | 7 | 8 | 9 | * |Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | / | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | | | 1 | 2 | 3 | + |KP_ENT| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | | | | | | 0 | . | - | | + * `-----------------------------------------------------------------------------------' + */ + [_L2] = { + {KC_SYSREQ, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NUMLOCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_BSPC}, + {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, _______}, + {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ENTER}, + {_______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_KP_0, KC_KP_DOT, KC_KP_MINUS, _______} + }, + +/* L3 + * ,-----------------------------------------------------------------------------------. + * |RGBTOG|RGBHUI|RGBHUD|RGBSAI|RGBSAD| | | PGDN | PGUP | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |BLTOG |BLSTEP|RGBVAI|RGBVAD|RGBMOD|RGBRMD| Left | Down | Up | Right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | TMUX | | | | | | | | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_L3] = { + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDOWN, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX}, + {TMUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT}, + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + } + +}; + +// Parantheses +void paranthesis_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("()"); register_code(KC_LEFT); unregister_code(KC_LEFT); + } else if (state->count == 2) { + SEND_STRING("("); + } else if (state->count == 3) { + SEND_STRING(")"); + } +} + +void curly_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("{}"); register_code(KC_LEFT); unregister_code(KC_LEFT); + } else if (state->count == 2) { + SEND_STRING("{"); + } else if (state->count == 3) { + SEND_STRING("}"); + } +} + +void square_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("[]"); register_code(KC_LEFT); unregister_code(KC_LEFT); + } else if (state->count == 2) { + SEND_STRING("["); + } else if (state->count == 3) { + SEND_STRING("]"); + } +} + +void angular_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("<>"); register_code(KC_LEFT); unregister_code(KC_LEFT); + } else if (state->count == 2) { + SEND_STRING("<"); + } else if (state->count == 3) { + SEND_STRING(">"); + } +} + +void tmux_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("tmux"); register_code(KC_ENT); unregister_code(KC_ENT); + } else if (state->count == 2) { + register_mods(MOD_BIT(KC_LCTRL)); + register_code(KC_B); unregister_code(KC_B); + unregister_mods(MOD_BIT(KC_LCTRL)); + register_mods(MOD_BIT(KC_LSHIFT)); + register_code(KC_5); unregister_code(KC_5); + unregister_mods(MOD_BIT(KC_LSHIFT)); + } +} + +void cmd_dance (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_mods(MOD_BIT(KC_LCTRL)); + register_mods(MOD_BIT(KC_LALT)); + register_code(KC_DELETE); + unregister_mods(MOD_BIT(KC_LCTRL)); + unregister_mods(MOD_BIT(KC_LALT)); + unregister_code(KC_DELETE); + } else if (state->count == 2) { + register_mods(MOD_BIT(KC_LGUI)); + register_mods(MOD_BIT(KC_LALT)); + register_code(KC_ESC); + unregister_mods(MOD_BIT(KC_LGUI)); + unregister_mods(MOD_BIT(KC_LALT)); + unregister_code(KC_ESC); + } else if (state->count == 3) { + register_mods(MOD_BIT(KC_LGUI)); + register_mods(MOD_BIT(KC_LSHIFT)); + register_code(KC_4); + unregister_mods(MOD_BIT(KC_LGUI)); + unregister_mods(MOD_BIT(KC_LSHIFT)); + unregister_code(KC_4); + } +} + +void cmd_sft_slash_pipe_down (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (state->interrupted || state->pressed==0) { + register_code (KC_NONUS_BSLASH); + } else { + register_code (KC_LSFT); + } + } else if (state->count == 2) { + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_NONUS_BSLASH); + } +} + +void cmd_sft_slash_pipe_up (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + unregister_code (KC_LSFT); + } else { + unregister_code (KC_NONUS_BSLASH); + } + } else if (state->count == 2) { + unregister_mods(MOD_BIT(KC_LSFT)); + unregister_code(KC_NONUS_BSLASH); + } +} + + //All tap dance functions would go here. Only showing this one. + qk_tap_dance_action_t tap_dance_actions[] = { + [CLN] = ACTION_TAP_DANCE_DOUBLE (KC_SCLN, S(KC_SCLN )) + ,[QUOT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOT, S(KC_2)) + ,[CAD_CAE] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, cmd_dance ) + ,[PAR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, paranthesis_dance ) + ,[CUR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, curly_dance ) + ,[SQU] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, square_dance ) + ,[ANG] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, angular_dance ) + ,[TD_TMUX] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, tmux_dance ) + ,[TD_SHIFTSLASHPIPE] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, cmd_sft_slash_pipe_down, cmd_sft_slash_pipe_up) + }; diff --git a/keyboards/contra/keymaps/ryanm101/readme.md b/keyboards/contra/keymaps/ryanm101/readme.md new file mode 100644 index 00000000..a289eefc --- /dev/null +++ b/keyboards/contra/keymaps/ryanm101/readme.md @@ -0,0 +1,11 @@ +# Layout Info +Map is from my JJ40 but Contra has been done with a grid vs my JJ's MIT layout. Map will be updated as soon as i figure out what to do with the addional key. + +- Uses non-US keys +- Keymap can be seen: Keymap -> http://www.keyboard-layout-editor.com/#/gists/7d111d72b138c3ef03ea4ffac4ddb7e4 + +# Notes + +- .> on lower layer if tapped but ALTGR if held +- RAISE -> uses TT() so tap to enter (NUMPAD Usage) or hold for momentary (F Keys) +- LOWER on _RAISE goes straight to qwerty layout (Base layer) diff --git a/keyboards/contra/keymaps/ryanm101/rules.mk b/keyboards/contra/keymaps/ryanm101/rules.mk new file mode 100644 index 00000000..f5e8c3d6 --- /dev/null +++ b/keyboards/contra/keymaps/ryanm101/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes \ No newline at end of file diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 664aaaaa..ad002684 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -3,6 +3,8 @@ #include "quantum.h" +// Corresponding changes to the layout names and/or definitions must also be made to info.json + // 标准配列 #define KEYMAP( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json new file mode 100644 index 00000000..dfb0bbbd --- /dev/null +++ b/keyboards/dz60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "DZ60", + "manufacturer": "KBDFans", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "KEYMAP_HHKB": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] + }, + + "KEYMAP_TRUE_HHKB": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] + }, + + "KEYMAP_2_SHIFTS": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "KEYMAP_DIRECTIONAL": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/dz60/keymaps/LEdiodes/keymap.c b/keyboards/dz60/keymaps/LEdiodes/keymap.c index dbf2a75f..4405b20d 100644 --- a/keyboards/dz60/keymaps/LEdiodes/keymap.c +++ b/keyboards/dz60/keymaps/LEdiodes/keymap.c @@ -9,6 +9,12 @@ #define _______ KC_TRNS +enum { + TD_SPC_ENT = 0, + TD_KC_LSFT_CAPS, + TD_KC_RSFT_CAPS +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -49,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TO(_L1), \ - KC_LCTL, KC_LGUI, KC_LALT, TD(LT(_L3,KC_SPACE)),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, TO(_L2), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, LT(_L3,KC_SPACE),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, TO(_L2), KC_LEFT, KC_DOWN, KC_RIGHT), /* Keymap _L1: (Layer 1) This is function layer 1 * This layer is activated while the Fn key is being held down. @@ -121,13 +127,6 @@ void matrix_scan_user(void) { // Empty }; -//Tap Dance Declarations -enum { - TD_SPC_ENT = 0, - TD_KC_LSFT_CAPS = 0, - TD_KC_RSFT_CAPS = 0 -}; - //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { diff --git a/keyboards/dz60/keymaps/LEdiodes/rules.mk b/keyboards/dz60/keymaps/LEdiodes/rules.mk index f54d9500..08adc989 100644 --- a/keyboards/dz60/keymaps/LEdiodes/rules.mk +++ b/keyboards/dz60/keymaps/LEdiodes/rules.mk @@ -54,4 +54,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted \ No newline at end of file +AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/dz60/keymaps/atlacat/keymap.c b/keyboards/dz60/keymaps/atlacat/keymap.c new file mode 100644 index 00000000..4c659418 --- /dev/null +++ b/keyboards/dz60/keymaps/atlacat/keymap.c @@ -0,0 +1,79 @@ +#include "dz60.h" + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define RGB_STA RGB_M_P //rgb static +#define RGB_BRE RGB_M_B //rgb breathe +#define RGB_RAI RGB_M_R //rgb rainbow +#define RGB_SWI RGB_M_SW //rgb swirl +#define RGB_SNA RGB_M_SN //rgb snake +#define RGB_KNI RGB_M_K //rgb knight +#define RGB_GRA RGB_M_G //rgb gradient + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap: (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| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS/MO| A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |Gui |MO |Ctrl | + * `-----------------------------------------------------------' + */ + 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 , XXXXXXX, KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, + LT(MO(1), KC_CAPS),KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_LSFT, XXXXXXX, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, XXXXXXX, MO(2) , KC_RCTL), + + /* Keymap : Second Layer (WASD and Media) + * ,-----------------------------------------------------------. + * |ESC| F1| F2| F3 | | | | | | | | | | DEL | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + + 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_SLCK, KC_PAUSE,_______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_INS , KC_HOME, KC_PGUP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Keymap : Third Layer (RGB / Reset) + * ,-----------------------------------------------------------. + * | ` | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + + 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_SLEP, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET , + _______, RGB_STA, RGB_BRE, RGB_RAI, RGB_SWI, RGB_SNA, RGB_KNI, RGB_GRA, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, _______, BL_DEC , BL_TOGG, BL_INC , BL_STEP, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/dz60/keymaps/atlacat/readme.md b/keyboards/dz60/keymaps/atlacat/readme.md new file mode 100644 index 00000000..c4c8702b --- /dev/null +++ b/keyboards/dz60/keymaps/atlacat/readme.md @@ -0,0 +1,4 @@ +// Template made by Atlacat for DZ 60% keyboard + +The design of the keyboard is coppied from other makers but change to be more dynamic. +The main difference is the switching between layers to keep things simple for me diff --git a/keyboards/e6v2/info.json b/keyboards/e6v2/info.json new file mode 100644 index 00000000..6eb5bd18 --- /dev/null +++ b/keyboards/e6v2/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "E6-V2", + "manufacturer": "Exclusive", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "KEYMAP_ANSI": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "KEYMAP_HHKB": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + }, + + "KEYMAP_HHKB_SPLITS": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/eagle_viper/info.json b/keyboards/eagle_viper/info.json index 45dba95b..9668c502 100644 --- a/keyboards/eagle_viper/info.json +++ b/keyboards/eagle_viper/info.json @@ -1,13 +1,25 @@ { - "keyboard_name": "Eagle/Viper", - "manufacturer": "Duck", - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "width": 15, - "height": 5, + "keyboard_name": "Eagle/Viper", + "manufacturer": "Duck", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, "layouts": { - "KEYMAP": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}] + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"iso", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":5}, {"x":9, "y":4}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, {"label":"|", "x":13.75, "y":5}] + }, + + "LAYOUT_eagle": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_eagle_splits": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_viper": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] } } } diff --git a/keyboards/eagle_viper/v2/keymaps/default/keymap.c b/keyboards/eagle_viper/v2/keymaps/default/keymap.c index c76eaa7b..3fdd1cfd 100644 --- a/keyboards/eagle_viper/v2/keymaps/default/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/default/keymap.c @@ -17,14 +17,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ - [0] = KEYMAP(\ + [0] = LAYOUT_all(\ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_NO, KC_RALT, KC_RGUI, KC_RCTL), - [1] = KEYMAP(\ + [1] = LAYOUT_all(\ KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c b/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c index 2dc3f019..a7f14b67 100644 --- a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c @@ -17,26 +17,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ - [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_NO, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_NO, KC_RALT, KC_RGUI, KC_RCTL), + [0] = LAYOUT_eagle(\ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL), - [1] = KEYMAP(\ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + [1] = LAYOUT_eagle(\ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_PGDN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [2] = 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, + [2] = LAYOUT_eagle(\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c index 4141f612..bd53fc3e 100644 --- a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c @@ -17,19 +17,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ - [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_BSLS, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), - KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO), - - [1] = KEYMAP(\ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, - KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, KC_ENT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [0] = LAYOUT_viper(\ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), + + [1] = LAYOUT_viper(\ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/eagle_viper/v2/v2.h b/keyboards/eagle_viper/v2/v2.h index db4d0900..63e52690 100644 --- a/keyboards/eagle_viper/v2/v2.h +++ b/keyboards/eagle_viper/v2/v2.h @@ -18,7 +18,7 @@ #include "../eagle_viper.h" -#define KEYMAP( \ +#define LAYOUT_all( \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2O, \ @@ -31,4 +31,46 @@ { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, }, \ { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O } \ } + +#define LAYOUT_eagle( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2O, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1M, K1N, \ + K0A, K0B, K0C, K0J, K0K, K0M, K0N, K0O \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, KC_NO, K4O, }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, KC_NO, K3O, }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, KC_NO, K2O, }, \ + { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, KC_NO, }, \ + { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, KC_NO, K0M, K0N, K0O } \ +} + +#define LAYOUT_eagle_splits( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2O, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1M, K1N, K1O, \ + K0A, K0B, K0C, K0J, K0K, K0M, K0N, K0O \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, KC_NO, K3O, }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, KC_NO, K2O, }, \ + { K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, }, \ + { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, KC_NO, K0M, K0N, K0O } \ +} + +#define LAYOUT_viper( \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2O, \ + K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1M, K1N, K1O, \ + K0B, K0C, K0J, K0M, K0N \ +) { \ + { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, }, \ + { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, KC_NO, K3O, }, \ + { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, KC_NO, K2O, }, \ + { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, }, \ + { KC_NO, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, KC_NO, KC_NO, K0M, K0N, KC_NO } \ +} #endif diff --git a/keyboards/ergo42/ergo42.c b/keyboards/ergo42/ergo42.c index 9954f5c4..e42dcb22 100644 --- a/keyboards/ergo42/ergo42.c +++ b/keyboards/ergo42/ergo42.c @@ -1,6 +1,6 @@ #include "ergo42.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergo42/rev1/rev1.c b/keyboards/ergo42/rev1/rev1.c index b4c51d55..f2e8abb1 100644 --- a/keyboards/ergo42/rev1/rev1.c +++ b/keyboards/ergo42/rev1/rev1.c @@ -1,10 +1,5 @@ #include "ergo42.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - #ifdef SSD1306OLED void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here @@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) { void matrix_init_kb(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - // // green led on // DDRD |= (1<<5); // PORTD &= ~(1<<5); @@ -30,10 +20,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk index dee7a14e..6acfaf92 100644 --- a/keyboards/ergodone/rules.mk +++ b/keyboards/ergodone/rules.mk @@ -5,7 +5,7 @@ # # make clean = Clean out built project files. # -# That's pretty much all you need. To compile, always go make clean, +# That's pretty much all you need. To compile, always go make clean, # followed by make. # # For advanced users only: @@ -88,7 +88,7 @@ FADING_LED_ENABLE = no # Enable fading backlight BREATHING_LED_ENABLE = no # Enable breathing backlight LEDMAP_ENABLE = no # Enable LED mapping LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom -ONEHAND_ENABLE = no # Disable Onehand +SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no MIDI_ENABLE = no diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 5f197cb2..43741185 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -100,7 +100,7 @@ void ergodox_blink_all_leds(void) mcp23018_status = ergodox_left_leds_update(); } #endif - + //ergodox_led_all_on(); //_delay_ms(333); ergodox_led_all_off(); @@ -185,7 +185,7 @@ uint8_t ergodox_left_leds_update(void) { #endif -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 4433dbe6..d6fa30bb 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -188,6 +188,67 @@ inline void ergodox_led_all_set(uint8_t n) { k0D, k1D, k2D, k3D, k4D, KC_NO } \ } +#define KEYMAP_PRETTY( \ + /* left hand, spatial positions */ /* right hand, spatial positions */ \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L54, R52, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L20, L30, L40, KC_NO }, \ + { L01, L11, L21, L31, L41, L51 }, \ + { L02, L12, L22, L32, L42, L52 }, \ + { L03, L13, L23, L33, L43, L53 }, \ + { L04, L14, L24, L34, L44, L54 }, \ + { L05, L15, L25, L35, KC_NO, L55 }, \ + { L06, L16, KC_NO, L36, KC_NO, L56 }, \ + \ + { R00, R10, KC_NO, R30,KC_NO, R50 }, \ + { R01, R11, R21, R31,KC_NO, R51 }, \ + { R02, R12, R22, R32, R42, R52 }, \ + { R03, R13, R23, R33, R43, R53 }, \ + { R04, R14, R24, R34, R44, R54 }, \ + { R05, R15, R25, R35, R45, R55 }, \ + { R06, R16, R26, R36, R46, KC_NO } \ + } + +#define KEYMAP_PRETTY_80( \ + /* left hand, spatial positions */ /* right hand, spatial positions */ \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L45,L46,L54, R52,R40,R41, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L20, L30, L40, KC_NO }, \ + { L01, L11, L21, L31, L41, L51 }, \ + { L02, L12, L22, L32, L42, L52 }, \ + { L03, L13, L23, L33, L43, L53 }, \ + { L04, L14, L24, L34, L44, L54 }, \ + { L05, L15, L25, L35, L45, L55 }, \ + { L06, L16, KC_NO, L36, L46, L56 }, \ + \ + { R00, R10, KC_NO, R30, R40, R50 }, \ + { R01, R11, R21, R31, R41, R51 }, \ + { R02, R12, R22, R32, R42, R52 }, \ + { R03, R13, R23, R33, R43, R53 }, \ + { R04, R14, R24, R34, R44, R54 }, \ + { R05, R15, R25, R35, R45, R55 }, \ + { R06, R16, R26, R36, R46, KC_NO } \ + } + #define LAYOUT_ergodox KEYMAP +#define LAYOUT_ergodox_pretty KEYMAP_PRETTY #endif diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json new file mode 100644 index 00000000..73110885 --- /dev/null +++ b/keyboards/ergodox_ez/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "ErgoDox EZ", + "manufacturer": "ErgoDox EZ", + "identifier": "FEED:1307:0001", + "url": "ergodox-ez.com", + "maintainer": "erez", + "processor": "atmega32u4", + "bootloader": "halfkay", + "width": 19.5, + "height": 9.375, + "layouts": { + "LAYOUT_ergodox": { + "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + } + "LAYOUT_ergodox_pretty": { + "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + } + "KEYMAP_80": { + "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] + } + "KEYMAP_PRETTY_80": { + "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0, "w":1.5}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] + } + } +} diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk index 6ed55e72..6d20fcf7 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk @@ -2,7 +2,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -ONEHAND_ENABLE = yes # Allow swapping hands of keyboard +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key TAP_DANCE_ENABLE = yes # Enable the tap dance feature. CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index cfae6eff..e9959b99 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -6,6 +6,8 @@ // to build this keymap // make ergodox_ez:dvorak_42_key:teensy +// flashing from rpi: +// sudo teensy_loader_cli -v -w .build/ergodox_ez_dvorak_42_key.hex --mcu atmega32u4 // keeping fork up to date: // https://help.github.com/articles/configuring-a-remote-for-a-fork/ @@ -317,7 +319,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_TAB), + KC_TRNS,KC_TRNS,KC_TRNS), [MOUSE] = KEYMAP( diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 4d2c4610..5ee9d5cb 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -5,7 +5,7 @@ # # make clean = Clean out built project files. # -# That's pretty much all you need. To compile, always go make clean, +# That's pretty much all you need. To compile, always go make clean, # followed by make. # # For advanced users only: @@ -56,7 +56,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = halfkay @@ -79,9 +79,9 @@ 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 +SWAP_HANDS_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 +LAYOUTS = ergodox diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 87e1b524..9fda7991 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -174,7 +174,7 @@ __attribute__ ((weak)) void ergodox_right_led_3_set(uint8_t n) { } -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md b/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md index 98eb7abb..a0e4565b 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md @@ -2,14 +2,19 @@ A basic ErgoDox layout with Planck-like tri-layer support. -![ErgoDox Layout](https://i.imgur.com/9zfKPV7.png) +![ErgoDox Layout](https://i.imgur.com/ae0Phzb.png) ## Features +- Base Layers + - QWERTY + - Workman + - Dvorak + - Colemak - Planck-like tri-layer -- Workman layout - In-progress gaming layer -- Numpad +- Numpad layer + ![numpad layer](https://i.imgur.com/oHDYpzf.png) - LCD colors are linked together, like the default KLL firmware ## Building and flashing diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h new file mode 100644 index 00000000..16195823 --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#undef TAPPING_TOGGLE + +#include "../../config.h" +#include "dudeofawesome.h" + +#include "./visualizer.h" + +#endif diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c index 7d76b25a..cf0b452b 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -4,40 +4,41 @@ #include "version.h" enum custom_layers { - _QWERTY, - _DVORAK, - _WORKMAN, - _GAME, - _MOUSE, - _NUM, - _LOWER, - _RAISE, - _ADJUST, + _QWERTY, + _WORKMAN, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, + _GAME, + _MOUSE, + _NUM, }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - DVORAK, - WORKMAN, - LOWER, - RAISE, - GAME, - MOUSE, - NUM, - EPRM, - VRSN, - RGB_SLD + QWERTY = SAFE_RANGE, + WORKMAN, + DVORAK, + COLEMAK, + LOWER, + RAISE, + GAME, + MOUSE, + EPRM, + VRSN, + RGB_SLD, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic QWERTY layer * * ,---------------------------------------------. ,---------------------------------------------. - * | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| * | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| - * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | '" | + * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' @@ -53,32 +54,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_ergodox( // left hand - KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + 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, KC_LBRACKET, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, - TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), - KC_LALT, - LOWER, KC_BSPACE, KC_LGUI, + KC_MPLY, TG(_MOUSE), + KC_LALT, + KC_BSPACE, LOWER, KC_LGUI, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, - KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER, + KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TG(_NUM), TG(_MOUSE), + TT(_NUM), TG(_MOUSE), KC_LALT, - KC_LGUI, KC_SPACE, RAISE + KC_LGUI, RAISE, KC_SPACE +), + +/* Keymap 0: Basic Workman layer + * + * ,---------------------------------------------. ,--------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | + * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| + * | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | ' | + * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| + * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter | + * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' + * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | + * `------------------------------' `------------------------------' + * ,------------. ,------------. + * |Play |Mouse | | Num |Mouse| + * ,----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |BSPC|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `-----------------' `------------------' + */ +[_WORKMAN] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET, + KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + + KC_MPLY, TG(_MOUSE), + KC_LALT, + KC_BSPACE, LOWER, KC_LGUI, + + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE, + KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, + KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + TT(_NUM), TG(_MOUSE), + KC_LALT, + KC_LGUI, RAISE, KC_SPACE ), /* Keymap 0: Basic Dvorak layer * * ,---------------------------------------------. ,--------------------------------------------. - * | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| * | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| @@ -98,38 +144,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_DVORAK] = LAYOUT_ergodox( // left hand - KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSPO, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1, - TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), - KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_MPLY, TG(_MOUSE), + KC_LALT, + KC_BSPACE, LOWER, KC_LGUI, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE, KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH), - KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENTER, + KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - TG(_NUM), TG(_MOUSE), + TT(_NUM), TG(_MOUSE), KC_LALT, KC_LGUI, RAISE, KC_SPACE ), -/* Keymap 0: Basic Workman layer +/* Keymap 0: Basic Colemak layer * * ,---------------------------------------------. ,--------------------------------------------. - * | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = | + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| - * | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC | + * | Tab | Q | W | F | P | G | [{ | | ]} | J | L | U | Y | ; | BSPC | * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| - * | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | '" | + * | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' | * |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------| - * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter | + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | Enter | * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | * `------------------------------' `------------------------------' @@ -141,28 +187,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | LGUI | | LGUI | | | * `-----------------' `------------------' */ -[_WORKMAN] = LAYOUT_ergodox( +[_COLEMAK] = LAYOUT_ergodox( // left hand - KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, - KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET, - KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1, - TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRACKET, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, - KC_MPLY, TG(_MOUSE), + KC_MPLY, TG(_MOUSE), KC_LALT, - KC_BSPACE, LOWER, KC_LGUI, + KC_BSPACE, LOWER, KC_LGUI, // right hand - KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, - KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE, - KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, - KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER, + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSPACE, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + KC_FN1, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, - NUM, TG(_MOUSE), + TT(_NUM), TG(_MOUSE), KC_LALT, - KC_LGUI, RAISE, KC_SPACE + KC_LGUI, RAISE, KC_SPACE ), /* Lower @@ -176,7 +222,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. * |Animat| | |Toggle|Solid | @@ -189,9 +235,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F6, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, @@ -199,11 +245,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, - _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_F5, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______, _______, @@ -221,7 +267,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. * |Animat| | |Toggle|Solid | @@ -234,9 +280,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_ergodox( // left hand VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F6, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, @@ -244,11 +290,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______, _______, @@ -262,7 +308,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | | + * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -280,7 +326,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand VRSN, _______, _______, _______, _______, _______, _______, _______, RESET, DEBUG, _______, _______, _______, _______, - _______, _______, _______, _______, _______, AG_NORM, + KC_CAPS, _______, _______, _______, _______, AG_NORM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -291,7 +337,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand _______, _______, _______, _______, _______, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, - AG_SWAP, QWERTY, WORKMAN, DVORAK, _______, _______, + AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -386,24 +432,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - TG(_MOUSE), TG(_NUM), + TG(_MOUSE), TT(_NUM), _______, _______, _______, _______ ), - /* Keymap 2: NUMPAD * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * | | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | | ✗ | ✗ | ✗ | / | * | - | | * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | * | | + * | | ✗ | Home | Up | End | PgUp | | | | ✗ | 7 | 8 | 9 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| | 4 | 5 | 6 | + | | + * | | ✗ | Left | Down | Right| PgDn |------| |------| ✗ | 4 | 5 | 6 | + | ✗ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | | 1 | 2 | 3 | \ | | + * | | / | * | - | + | Enter| | | | ✗ | 1 | 2 | 3 | Enter| Enter | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | . | 0 | 0 | = | | + * | | | | | ✗ | | 0 | 0 | . | Enter| = | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -415,22 +460,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NUM] = LAYOUT_ergodox( // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, - _______, _______, _______, _______, _______, + _______, 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_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, + _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______, _______, // right hand - KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, _______, - _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, _______, - _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_SLASH, _______, - KC_KP_DOT, KC_KP_0, KC_KP_0, KC_KP_EQUAL, _______, + KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______, + KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, + KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, _______, _______, _______, @@ -444,15 +489,15 @@ 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; + 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; + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; } return MACRO_NONE; }; @@ -461,23 +506,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); set_single_persistent_default_layer(_QWERTY); } return false; - break; case WORKMAN: if (record->event.pressed) { set_single_persistent_default_layer(_WORKMAN); } return false; - break; case DVORAK: if (record->event.pressed) { set_single_persistent_default_layer(_DVORAK); } return false; - break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -494,7 +540,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -511,19 +556,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; - break; 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 @@ -531,7 +573,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif } return false; - break; } return true; } @@ -550,19 +591,19 @@ 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(); + ergodox_led_lower_off(); + ergodox_led_raise_off(); + ergodox_led_adjust_off(); switch (layer) { case _LOWER: - ergodox_right_led_1_on(); + ergodox_led_lower_on(); break; case _RAISE: - ergodox_right_led_2_on(); + ergodox_led_raise_on(); break; case _ADJUST: - ergodox_right_led_3_on(); + ergodox_led_adjust_on(); break; } }; diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c index 034f1527..d339ecc9 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c @@ -28,7 +28,7 @@ along with this program. If not, see . #error This visualizer needs that LCD is enabled #endif -#include "visualizer.h" +#include "./visualizer.h" #include "visualizer_keyframes.h" #include "lcd_keyframes.h" #include "lcd_backlight_keyframes.h" @@ -295,17 +295,17 @@ void ergodox_board_led_on(void){ // No board led support } -void ergodox_right_led_1_on(void){ +void ergodox_led_lower_on(void){ user_data_keyboard.led_on |= (1u << 0); visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_2_on(void){ +void ergodox_led_raise_on(void){ user_data_keyboard.led_on |= (1u << 1); visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_3_on(void){ +void ergodox_led_adjust_on(void){ user_data_keyboard.led_on |= (1u << 2); visualizer_set_user_data(&user_data_keyboard); } @@ -314,32 +314,32 @@ void ergodox_board_led_off(void){ // No board led support } -void ergodox_right_led_1_off(void){ +void ergodox_led_lower_off(void){ user_data_keyboard.led_on &= ~(1u << 0); visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_2_off(void){ +void ergodox_led_raise_off(void){ user_data_keyboard.led_on &= ~(1u << 1); visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_3_off(void){ +void ergodox_led_adjust_off(void){ user_data_keyboard.led_on &= ~(1u << 2); visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_1_set(uint8_t n) { +void ergodox_led_lower_set(uint8_t n) { user_data_keyboard.led1 = n; visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_2_set(uint8_t n) { +void ergodox_led_raise_set(uint8_t n) { user_data_keyboard.led2 = n; visualizer_set_user_data(&user_data_keyboard); } -void ergodox_right_led_3_set(uint8_t n) { +void ergodox_led_adjust_set(uint8_t n) { user_data_keyboard.led3 = n; visualizer_set_user_data(&user_data_keyboard); } diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h new file mode 100644 index 00000000..740a951e --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h @@ -0,0 +1,35 @@ +/* Copyright 2017 Fred Sundvik + * + * This 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 VISUALIZER_H_ +#define VISUALIZER_H_ + +#include "visualizer.h" +#include "led.h" + +void ergodox_led_lower_on (void); +void ergodox_led_raise_on (void); +void ergodox_led_adjust_on (void); + +void ergodox_led_lower_off (void); +void ergodox_led_raise_off (void); +void ergodox_led_adjust_off (void); + +void ergodox_led_lower_set (uint8_t n); +void ergodox_led_raise_set (uint8_t n); +void ergodox_led_adjust_set (uint8_t n); + +#endif /* VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk b/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk index 74881c98..2d3597ce 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/rules.mk @@ -67,7 +67,7 @@ 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 +SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard STENO_ENABLE = yes #enable plover steno mode CUSTOM_MATRIX = yes # Custom matrix file SERIAL_LINK_ENABLE = yes diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index e1cef51c..c243c258 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -67,7 +67,7 @@ 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 +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard CUSTOM_MATRIX = yes # Custom matrix file SERIAL_LINK_ENABLE = yes @@ -79,11 +79,11 @@ MIDI_ENABLE = no RGBLIGHT_ENABLE = no LCD_DRIVER = st7565 -LCD_WIDTH = 128 +LCD_WIDTH = 128 LCD_HEIGHT = 32 LED_DRIVER = is31fl3731c -LED_WIDTH = 7 +LED_WIDTH = 7 LED_HEIGHT = 7 LAYOUTS = ergodox diff --git a/keyboards/fourier/config.h b/keyboards/fourier/config.h new file mode 100644 index 00000000..8f0524f9 --- /dev/null +++ b/keyboards/fourier/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif + +#endif diff --git a/keyboards/fourier/fourier.c b/keyboards/fourier/fourier.c new file mode 100644 index 00000000..1bd47f98 --- /dev/null +++ b/keyboards/fourier/fourier.c @@ -0,0 +1 @@ +#include "fourier.h" diff --git a/keyboards/fourier/fourier.h b/keyboards/fourier/fourier.h new file mode 100644 index 00000000..dbe1fd72 --- /dev/null +++ b/keyboards/fourier/fourier.h @@ -0,0 +1,23 @@ +#ifndef FOURIER_H +#define FOURIER_H + +#include "quantum.h" + +#ifdef KEYBOARD_fourier_rev1 + #include "rev1.h" +#endif + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ + LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ + ) \ + KEYMAP( \ + KC_##LA1, KC_##LA2, KC_##LA3, KC_##LA4, KC_##LA5, KC_##LA6, KC_##RA1, KC_##RA2, KC_##RA3, KC_##RA4, KC_##RA5, KC_##RA6, KC_##RA7, \ + KC_##LB1, KC_##LB2, KC_##LB3, KC_##LB4, KC_##LB5, KC_##LB6, KC_##RB1, KC_##RB2, KC_##RB3, KC_##RB4, KC_##RB5, KC_##RB7, \ + KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \ + KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \ + ) +#endif diff --git a/keyboards/fourier/i2c.c b/keyboards/fourier/i2c.c new file mode 100644 index 00000000..084c890c --- /dev/null +++ b/keyboards/fourier/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/fourier/keymaps/default/config.h b/keyboards/fourier/keymaps/default/config.h new file mode 100644 index 00000000..20e49c42 --- /dev/null +++ b/keyboards/fourier/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +#endif diff --git a/keyboards/fourier/keymaps/default/keymap.c b/keyboards/fourier/keymaps/default/keymap.c new file mode 100644 index 00000000..90677b4a --- /dev/null +++ b/keyboards/fourier/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +#include "fourier.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_FN1 MO(_FN1) +#define KC_FN2 MO(_FN2) +#define KC_SPFN1 LT(_FN1, KC_SPACE) +#define KC_SPFN2 LT(_FN2, KC_SPACE) +#define KC_BSFN1 LT(_FN1, KC_BSPC) +#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define KC_RST RESET +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = KC_KEYMAP( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,BSPC, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + TAB , A , S , D , F , G , H , J , K , L ,QUOT, ENTER , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + LCTL ,LALT,LGUI ,FN1 , SPFN1 , BSFN2 ,RGUI ,RALT , FN2 , RCTL + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + RST ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, 4 , 5 , 6 ,SCLN, , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + , , ,INS ,PGUP,HOME, , , , ,COLN, , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + , , ,DEL ,PGDN,END , , , , , , , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + , , , , DEL , , , , , + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ) + +}; diff --git a/keyboards/fourier/keymaps/default/rules.mk b/keyboards/fourier/keymaps/default/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/fourier/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/fourier/matrix.c b/keyboards/fourier/matrix.c new file mode 100644 index 00000000..ed913f34 --- /dev/null +++ b/keyboards/fourier/matrix.c @@ -0,0 +1,468 @@ +/* +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 "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" +#include "timer.h" +#include "backlight.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define SERIAL_LED_ADDR 0x00 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); + +} + +uint8_t _matrix_scan(void) +{ + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); +#endif + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } + +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); +#endif +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/fourier/readme.md b/keyboards/fourier/readme.md new file mode 100644 index 00000000..7573a607 --- /dev/null +++ b/keyboards/fourier/readme.md @@ -0,0 +1,20 @@ +Fourier +======== + +A split 40% staggered 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) + +Make example for this keyboard (after setting up your build environment): + + make fourier/rev1:default + +Example of flashing this keyboard: + + make fourier/rev1:default:avrdude + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/fourier/rev1/config.h b/keyboards/fourier/rev1/config.h new file mode 100644 index 00000000..c1375222 --- /dev/null +++ b/keyboards/fourier/rev1/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1247 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Fourier +#define DESCRIPTION Split 40 percent staggered keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { F4, D7, E6, B4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/fourier/rev1/rev1.c b/keyboards/fourier/rev1/rev1.c new file mode 100644 index 00000000..61d7139d --- /dev/null +++ b/keyboards/fourier/rev1/rev1.c @@ -0,0 +1,7 @@ +#include "fourier.h" + + +void matrix_init_kb(void) { + matrix_init_user(); +}; + diff --git a/keyboards/fourier/rev1/rev1.h b/keyboards/fourier/rev1/rev1.h new file mode 100644 index 00000000..c29c0eba --- /dev/null +++ b/keyboards/fourier/rev1/rev1.h @@ -0,0 +1,34 @@ +#ifndef REV1_H +#define REV1_H + +#include "../fourier.h" + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define KEYMAP( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ + LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ + { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ + { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ + { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ + { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ + { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ + { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ + } + +#endif diff --git a/keyboards/lets_split/keymaps/dale/rules.mk b/keyboards/fourier/rev1/rules.mk similarity index 100% rename from keyboards/lets_split/keymaps/dale/rules.mk rename to keyboards/fourier/rev1/rules.mk diff --git a/keyboards/fourier/rules.mk b/keyboards/fourier/rules.mk new file mode 100644 index 00000000..151339bc --- /dev/null +++ b/keyboards/fourier/rules.mk @@ -0,0 +1,74 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = 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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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 + +DEFAULT_FOLDER = fourier/rev1 diff --git a/keyboards/fourier/serial.c b/keyboards/fourier/serial.c new file mode 100644 index 00000000..74bcbb6b --- /dev/null +++ b/keyboards/fourier/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" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +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/fourier/serial.h b/keyboards/fourier/serial.h new file mode 100644 index 00000000..15fe4db7 --- /dev/null +++ b/keyboards/fourier/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/fourier/split_util.c b/keyboards/fourier/split_util.c new file mode 100644 index 00000000..2704e30e --- /dev/null +++ b/keyboards/fourier/split_util.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" +#include "pincontrol.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + // Test D2 pin for handedness, if D2 is grounded, it's the right hand + pinMode(D2, PinDirectionInput); + isLeftHand = digitalRead(D2); +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init(); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/gh60/info.json b/keyboards/gh60/info.json index aed31f75..04206aa1 100644 --- a/keyboards/gh60/info.json +++ b/keyboards/gh60/info.json @@ -1,17 +1,29 @@ { - "keyboard_name": "GH60", - "identifier": "FEED:6060:0001", + "keyboard_name": "GH60", + "identifier": "FEED:6060:0001", "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] + }, + "LAYOUT_60_ansi": { "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] } - }, - "maintainer": "qmk", - "keyboard_folder": "gh60", - "width": 15, - "bootloader": "atmel-dfu", - "processor": "atmega32u4", - "height": 5, - "url": "http://qmk.fm/keyboards/gh60", + }, + "maintainer": "qmk", + "keyboard_folder": "gh60", + "width": 15, + "bootloader": "atmel-dfu", + "processor": "atmega32u4", + "height": 5, + "url": "http://qmk.fm/keyboards/gh60", "manufacturer": "geekhack" } diff --git a/keyboards/hadron/keymaps/default/rules.mk b/keyboards/hadron/keymaps/default/rules.mk index e24ba04b..1f397525 100644 --- a/keyboards/hadron/keymaps/default/rules.mk +++ b/keyboards/hadron/keymaps/default/rules.mk @@ -1,7 +1,7 @@ # 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) @@ -16,7 +16,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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/hadron/keymaps/side_numpad/rules.mk b/keyboards/hadron/keymaps/side_numpad/rules.mk index 5cdc186c..d9fabc1a 100644 --- a/keyboards/hadron/keymaps/side_numpad/rules.mk +++ b/keyboards/hadron/keymaps/side_numpad/rules.mk @@ -1,7 +1,7 @@ # 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) @@ -16,7 +16,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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/handwired/dactyl/dactyl.c b/keyboards/handwired/dactyl/dactyl.c index 3f59154f..abe3d9d6 100644 --- a/keyboards/handwired/dactyl/dactyl.c +++ b/keyboards/handwired/dactyl/dactyl.c @@ -57,7 +57,7 @@ out: return mcp23018_status; } -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk index 90a29bd2..dc25f9c3 100644 --- a/keyboards/handwired/dactyl/rules.mk +++ b/keyboards/handwired/dactyl/rules.mk @@ -80,7 +80,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration CUSTOM_MATRIX = yes # Custom matrix file for the Dactyl NKRO_ENABLE = yes # USB Nkey Rollover UNICODE_ENABLE = yes # Unicode -ONEHAND_ENABLE = yes # Allow swapping hands of keyboard +SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h new file mode 100644 index 00000000..093d6680 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tshort +#define PRODUCT Dactyl-Manuform +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +// wiring of each half +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } + +/* 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 diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.c b/keyboards/handwired/dactyl_manuform/dactyl_manuform.c new file mode 100644 index 00000000..17caecb4 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.c @@ -0,0 +1,23 @@ +#include "dactyl_manuform.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h new file mode 100644 index 00000000..19790982 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -0,0 +1,71 @@ +#ifndef REV2_H +#define REV2_H + +#include "dactyl_manuform.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#ifndef FLIP_HALF + +#define KEYMAP( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, R33, R34, \ + L33, L34, R31, R32, \ + L44, L42, R43, R41, \ + L43, L41, R44, R42 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { KC_NO, L31, L32, L33, L34 }, \ + { KC_NO, L41, L42, L43, L44 }, \ +\ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { KC_NO, R34, R33, R32, R31 }, \ + { KC_NO, R44, R43, R42, R41 } \ + } +#else + +#define KEYMAP( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, L33, L34, \ + R31, R32, R33, R34, \ + L41, L42, L43, L44, \ + R41, R42, R43, R44 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { KC_NO, L31, L32, L33, L34 }, \ + { KC_NO, L41, L42, L43, L44 }, \ +\ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { KC_NO, R31, R32, R33, R34 }, \ + { KC_NO, R41, R42, R43, R44 } \ + } + +#endif + +#endif diff --git a/keyboards/handwired/dactyl_manuform/i2c.c b/keyboards/handwired/dactyl_manuform/i2c.c new file mode 100644 index 00000000..084c890c --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/handwired/dactyl_manuform/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/keymaps/default/config.h new file mode 100644 index 00000000..216917ed --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/default/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/handwired/dactyl_manuform/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/keymaps/default/keymap.c new file mode 100644 index 00000000..0a74323a --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#include "dactyl_manuform.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _NAV 1 +#define _NUM 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + NUM, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base (qwerty) + * ,----------------------------------, ,----------------------------------, + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |-------------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------|------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | ' | + * |------+------+------+-------------, ,-------------+------+------+------, + * | [ | ] | | - | = | + * '------+------'-------------' '-------------'------+------' + * | esc | bs | | space|enter | + * | + | + | | + | + | + * | shift| ctrl | | alt |shift | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * |------+------' '------+------| + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ + +[_BASE] = KEYMAP( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, \ + KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \ + SFT_T(KC_ESC), CTL_T(KC_BSPC), ALT_T(KC_SPC), SFT_T(KC_ENT), \ + KC_TAB, KC_HOME, KC_END, KC_DEL, \ + LT(_NAV, KC_BSLS), KC_GRV, KC_LGUI, LT(_NUM, KC_SLSH) \ +), + +/* Navigation layer + * ,----------------------------------, ,----------------------------------, + * | | | mup | | | | | | up | | | + * |------+------+------+------+------| |-------------+------+------+------| + * | | mleft| mdown|mright| | | | left | down |right | | + * |------+------+------+------+------| |------|------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+-------------, ,-------------+------+------+------, + * | | | | mbtn |mbtn2 | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * '------+------' '------+------' + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ + +[_NAV] = KEYMAP( \ + KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +/* Numbers layer + * ,----------------------------------, ,----------------------------------, + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |-------------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | + * |------+------+------+------+------| |------|------+------+------+------| + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+-------------, ,-------------+------+------+------, + * | F11 | F12 | | | | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * '------+------' '------+------' + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ +[_NUM] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, \ + 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 +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + diff --git a/keyboards/handwired/dactyl_manuform/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/keymaps/default/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/dactyl_manuform/keymaps/dvorak/config.h b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/config.h new file mode 100644 index 00000000..216917ed --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/handwired/dactyl_manuform/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/keymap.c new file mode 100644 index 00000000..e0852f8e --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/keymap.c @@ -0,0 +1,119 @@ +#include "dactyl_manuform.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _NAV 1 +#define _NUM 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + NUM, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base (dvorak) + * ,----------------------------------, ,----------------------------------, + * | ' | , | . | p | y | | f | g | c | r | l | + * |------+------+------+------+------| |-------------+------+------+------| + * | a | o | e | u | i | | d | h | t | n | s | + * |------+------+------+------+------| |------|------+------+------+------| + * | ; | q | j | k | x | | b | m | w | v | z | + * |------+------+------+-------------, ,-------------+------+------+------, + * | [ | ] | | - | = | + * '------+------'-------------' '-------------'------+------' + * | esc | bs | | space|enter | + * | + | + | | + | + | + * | shift| ctrl | | alt |shift | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * |------+------' '------+------| + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ + +[_BASE] = KEYMAP( \ + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, \ + KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \ + SFT_T(KC_ESC), CTL_T(KC_BSPC), ALT_T(KC_SPC), SFT_T(KC_ENT), \ + KC_TAB, KC_HOME, KC_END, KC_DEL, \ + LT(_NAV, KC_BSLS), KC_GRV, KC_LGUI, LT(_NUM, KC_SLSH) \ +), + +/* Navigation layer + * ,----------------------------------, ,----------------------------------, + * | | | mup | | | | | | up | | | + * |------+------+------+------+------| |-------------+------+------+------| + * | | mleft| mdown|mright| | | | left | down |right | | + * |------+------+------+------+------| |------|------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+-------------, ,-------------+------+------+------, + * | | | | mbtn |mbtn2 | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * '------+------' '------+------' + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ + +[_NAV] = KEYMAP( \ + KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +/* Numbers layer + * ,----------------------------------, ,----------------------------------, + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |-------------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 10 | + * |------+------+------+------+------| |------|------+------+------+------| + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+-------------, ,-------------+------+------+------, + * | F11 | F12 | | | | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | tab | home | | end | del | + * '------+------' '------+------' + * |\(NAV)| ~ | | gui |/(NUM)| + * '------+------' '------+------' + */ +[_NUM] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, \ + 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 +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + diff --git a/keyboards/handwired/dactyl_manuform/keymaps/dvorak/rules.mk b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/keymaps/dvorak/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/handwired/dactyl_manuform/matrix.c b/keyboards/handwired/dactyl_manuform/matrix.c new file mode 100644 index 00000000..c3bfe804 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/matrix.c @@ -0,0 +1,466 @@ +/* +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 "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#define ERROR_DISCONNECT_COUNT 5 + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + debouncing = false; + } +# endif + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/handwired/dactyl_manuform/readme.md b/keyboards/handwired/dactyl_manuform/readme.md new file mode 100644 index 00000000..354e11ee --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/readme.md @@ -0,0 +1,147 @@ +Dactyl manuform +====== + +the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link. + +## First Time Setup + +Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: + +``` +$ make dactyl_manuform:dvorak +``` + +You will see a lot of output and if everything worked correctly you will see the built hex file: + +``` +dactyl_manuform_dvorak.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 dactyl_manuform:YOUR_KEYMAP_NAME +``` + +If everything worked correctly you will see a file: + +``` +dactyl_manuform_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. + +Required Hardware +----------------- + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these 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. + +Next, 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](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +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. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +Notes on Software Configuration +------------------------------- + +the keymaps in here are for the 4x5 layout of the keyboard only. + +Flashing +------- +From the top level `qmk_firmware` directory run `make KEYBOARD:KEYMAP:avrdude` for automatic serial port resolution and flashing. +Example: `make lets_split/rev2: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: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeprom) 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/handwired/dactyl_manuform/rules.mk b/keyboards/handwired/dactyl_manuform/rules.mk new file mode 100644 index 00000000..6c0949b5 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/rules.mk @@ -0,0 +1,75 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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 + +LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/dactyl_manuform/serial.c b/keyboards/handwired/dactyl_manuform/serial.c new file mode 100644 index 00000000..74bcbb6b --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/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" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +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/handwired/dactyl_manuform/serial.h b/keyboards/handwired/dactyl_manuform/serial.h new file mode 100644 index 00000000..15fe4db7 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/handwired/dactyl_manuform/split_util.c b/keyboards/handwired/dactyl_manuform/split_util.c new file mode 100644 index 00000000..346cbc90 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/handwired/woodpad/keymaps/drashna/config.h b/keyboards/handwired/woodpad/keymaps/drashna/config.h index a35b60d3..c4f28034 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/config.h +++ b/keyboards/handwired/woodpad/keymaps/drashna/config.h @@ -19,7 +19,7 @@ #include QMK_KEYBOARD_CONFIG_H -#ifdef TAP_DANCE_ENABLE +#if (defined(TAP_DANCE_ENABLE) && !defined(TAPPING_TERM)) #define TAPPING_TERM 200 #endif // TAP_DANCE_ENABLE @@ -37,6 +37,7 @@ #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 #define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_SLEEP #endif // RGBLIGHT_ENABLE #define FORCE_NKRO diff --git a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c index 51b90913..fd1ff005 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c @@ -24,21 +24,9 @@ // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO -#ifdef TAP_DANCE_ENABLE -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) -#else -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 -#endif - - -//define layer change stuff for underglow indicator -bool skip_leds = false; + + + diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk index 11f09658..f8c48830 100644 --- a/keyboards/handwired/woodpad/rules.mk +++ b/keyboards/handwired/woodpad/rules.mk @@ -71,8 +71,8 @@ RGBLIGHT_ENABLE ?= no # while [ -z $$USB ]; do \ # sleep 1; \ # ls /dev/tty* > /tmp/2; \ -# USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ +# 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 \ No newline at end of file +#.PHONY: avrdude diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk index 67a0ff2d..3f8fd5dc 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk +++ b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk @@ -15,7 +15,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/helix/rev1/rev1.c b/keyboards/helix/rev1/rev1.c index 950e4eec..d7ea9b72 100644 --- a/keyboards/helix/rev1/rev1.c +++ b/keyboards/helix/rev1/rev1.c @@ -1,9 +1,5 @@ #include "helix.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif #ifdef SSD1306OLED void led_set_kb(uint8_t usb_led) { @@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) { void matrix_init_kb(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - // // green led on // DDRD |= (1<<5); // PORTD &= ~(1<<5); @@ -29,11 +20,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - -void shutdown_kb(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index f4d34543..dc4187c0 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -17,7 +17,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID # Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32 # Helix keyboard : RGBLIGHT_ENABLE = no or yes RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/helix/rev2/keymaps/five_rows/README.md b/keyboards/helix/rev2/keymaps/five_rows/README.md new file mode 100644 index 00000000..edb768f3 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/five_rows/README.md @@ -0,0 +1,73 @@ +# Keymap for 5 rows Helix keyboard + +This keymap is only for 5 rows Helix keyboard. + +## Layout + +![fig1](https://gist.github.com/mtei/c81a3688206aa50996339cb9ced4751d/raw/662082b66231eb8d1f45776d813c57f29d445e68/helix-five_rows_r2.png) + +## Layer + +|Priority|Number|Name|Discription| +| ---- | ---- | --- | --- | +|high|16|Adjust| keyboard local functions| +||4|Extra char| some charactors | +||3|Function| function keys | +||2|Dvorak|Dvorak| +||1|Colemak|Colemak| +|low|0|Qwerty|QWERTY (base)| + +### Adjust Layer + +Adjust Layer has keyboard local function keys. + +* LED control. +* Mac/Win mode change. +* Qwerty/Colemak/Dvorak change. + +### Mac mode and Win mode + +Mac mode swap Alt/Win(GUI) key. + +|mode|key|code| +| ---- | ---- | --- | +|Mac mode|Adjust + g(Qwerty)|AG_NORM| +|Win mode|Adjust + h(Qwerty)|AG_SWAP| +| |Adjust + t(Qwerty)| | + +### LED control + +|command|key|code| +| ---- | ---- | --- | +|on/off|Adjust + ,(Qwerty)|RGB_TOG| +| |Adjust + v(Qwerty)| | +|change mode|Adjust + Right option |RGB_SMOD| +| |Adjust + c(Qwerty)| | +|HUE +|Adjust + .(Qwerty) |RGB_HUI| +| |Adjust + Left Control| | +|HUE -|Adjust + menu |RGB_HUD| +| |Adjust + Left Shift | | +|SAT +|Adjust + /(Qwerty) |RGB_SAI| +| |Adjust + a(Qwerty) | | +|SAT -|Adjust + right hand left side Fn|RGB_SAD| +| |Adjust + z(Qwerty) | | +|Bright +|Adjust + Right Shift |RGB_VAI| +| |Adjust + s(Qwerty)| | +|Bright -|Adjust + right hand right side Fn|RGB_VAD| +| |Adjust + x(Qwerty) | | +|reset|Adjust + w(Qwerty)|RGBRST| + +### Qwerty, Colemak, Dvorak selection + +|char layout|key| +| ---- | ---- | +|Qwerty | Adjust + j(Qwerty) | +| | Adjust + 5| +|Calemak| Adjust + k(Qwerty) | +| | Adjust + 4| +|Dvorak | Adjust + l(Qwerty) | +| | Adjust + 3| + +## Note + +![fig2](https://gist.github.com/mtei/c81a3688206aa50996339cb9ced4751d/raw/9979482e9aa0b25962fad9ee634cd1c23cef1751/five_rows_making.jpg) diff --git a/keyboards/helix/rev2/keymaps/five_rows/README_jp.md b/keyboards/helix/rev2/keymaps/five_rows/README_jp.md new file mode 100644 index 00000000..8d3d8f2d --- /dev/null +++ b/keyboards/helix/rev2/keymaps/five_rows/README_jp.md @@ -0,0 +1,102 @@ +# Keymap for 5 rows Helix keyboard + +本キーマップは、Helix キーボードの5行版専用のキーマップです。 + +普通のキーボード使用者が、Helix キーボードを使うときになるべく違いが少なく戸惑いが少なくなるように意図したキーマップです。(意図通り成功しているかどうかは使用する人の判断で、、、) + +## キー配置 +以下に、Qwerty配列時の、文字配列の図を示します。 + +![fig1](https://gist.github.com/mtei/c81a3688206aa50996339cb9ced4751d/raw/662082b66231eb8d1f45776d813c57f29d445e68/helix-five_rows_r2.png) + +## レイヤー + +|優先順位|番号|名称|内容| +| ---- | ---- | --- | --- | +|高い|16|Adjust|機能キー(紫)| +||4|Extra char|記号類(赤)| +||3|Function|ファンクションキー類(青)| +||2|Dvorak|Dvorak配列| +||1|Colemak|Colemak配列| +|低い|0|Qwerty|QWERTY配列(ベース)| + +Qwerty/Colemak/Dvorak の各レイヤーは、後述する、Ajuest キーによる選択で、いずれか一つだけが有効になり、標準のキーマップとなります。 + +Adjust レイヤーは、Adjust キーを押している間だけ有効になり、標準のキーマップの上にかぶさるように一部のキーが置き換わります。 + +Function レイヤーは、Fn キーを押している間だけ有効になり、標準のキーマップの上にかぶさるように一部のキーが置き換わります。 + +Extra レイヤーは、Enter キーを一定時間(0.1秒)以上押していると押している間だけ有効になり、標準のキーマップの上にかぶさるように一部のキーが置き換わります。 +このため、Enterキーで Enter を入力するには、Enterキーを押して短時間ですぐ離してください。 + +### Adjust レイヤー +Ajust レイヤーは、Helix の標準キーマップ "default" から F1,F2..F12 を除き、右側にあった機能キーを +左側にも追加したものとなっています。 + +LEDコントロール、Mac/Win モードの切り替え、Qwerty配列, Colemak配列, Dvorak配列の切り替えが行えます。 + +### MacモードとWinモード +キーボードには、Mac モードと、Win モードの二つのモードがあります。 + +現在のモードはOLEDにアイコンとして表示されます。 +(以下の指定キーは、Qwerty配列時の文字を使ってキーを表示しています) + +|コマンド|指定キー|コード| +| ---- | ---- | --- | +|Macモード|Adjust + g(Qwerty)|AG_NORM| +|Winモード|Adjust + h(Qwerty)|AG_SWAP| +| |Adjust + t(Qwerty)| | + +Mac モードと Win モードでは、AltキーとWin(GUI)キーが入れ替わります。 + +Mac モードでは、上の配列図の「英数キー」と「かなキー」で英語モードと日本語モードの切り替えができます。。 + +Winモードでは、該当のキーはどちらも共に Alt + `(日本語IMEの切り替え)として入力されます。 + +### LEDコントロール + +バックライトやUnderglowをコントロールするにはAdjustレイヤーにある機能キーを使います。 +(以下の指定キーは、Qwerty配列時の文字を使ってキーを表示しています) + +|コマンド|指定キー|コード| +| ---- | ---- | --- | +|オン/オフ|Adjust + ,(Qwerty)|RGB_TOG| +| |Adjust + v(Qwerty)| | +|モード切り替え|Adjust + Right option |RGB_SMOD| +| |Adjust + c(Qwerty)| | +|色相 +|Adjust + .(Qwerty)|RGB_HUI| +| |Adjust + Left Control| | +|色相 -|Adjust + menu|RGB_HUD| +| |Adjust + Left Shift | | +|彩度 +|Adjust + /(Qwerty) |RGB_SAI| +| |Adjust + a(Qwerty) | | +|彩度 -|Adjust + 右手Fnの左側|RGB_SAD| +| |Adjust + z(Qwerty) | | +|明度 +|Adjust + Right Shift|RGB_VAI| +| |Adjust + s(Qwerty) | | +|明度 -|Adjust + 右手Fnの右側|RGB_VAD| +| |Adjust + x(Qwerty) | | +|リセット|Adjust + w|RGBRST| + +### 文字配列選択 +Qwerty, Colemak, Dvorak それぞれの文字配列の選択は以下のキーを使います。 + +|選択配列|指定キー| +| ---- | ---- | +|Qwerty | Adjust + j(Qwerty) | +| | Adjust + 5| +|Calemak| Adjust + k(Qwerty) | +| | Adjust + 4| +|Dvorak | Adjust + l(Qwerty) | +| | Adjust + 3| + +## 備考 +本キーマップは、通常のキーボードの主要部分のホームポジション周辺をなるべくそのまま踏襲する方針で作成しました。 +変更点は以下の通りです。 + + * 右手小指により多く割り当たっていた5つの記号と左上の1つの記号を中央に集め人差し指の担当とする。 + * Enter キーを親指担当として中央手前に移動。 + * Control キーを左右共にホームポジションの行に移動。 + * 左手親指に BackSpace キーを割り当てる。 + +![fig2](https://gist.github.com/mtei/c81a3688206aa50996339cb9ced4751d/raw/9979482e9aa0b25962fad9ee634cd1c23cef1751/five_rows_making.jpg) diff --git a/keyboards/helix/rev2/keymaps/five_rows/config.h b/keyboards/helix/rev2/keymaps/five_rows/config.h new file mode 100644 index 00000000..8b1f00d9 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/five_rows/config.h @@ -0,0 +1,107 @@ +/* +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 */ + +#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// Helix keyboard OLED support +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif + +/* Select rows configuration */ +#define HELIX_ROWS 5 + +/* key matrix size */ +// Rows are doubled-up +#if HELIX_ROWS == 4 + #define MATRIX_ROWS 8 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#elif HELIX_ROWS == 5 + #define MATRIX_ROWS 10 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#else + #error "expected HELIX_ROWS 4 or 5" +#endif + +#define USE_SERIAL_PD2 + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +// Helix keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#ifdef RGBLED_BACK + #if HELIX_ROWS == 4 + #define RGBLED_NUM 25 + #elif HELIX_ROWS == 5 + #define RGBLED_NUM 32 + #endif +#else + #define RGBLED_NUM 6 +#endif + +#if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 255 +#else + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 120 + #else + #define RGBLIGHT_LIMIT_VAL 130 + #endif +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#endif + +#ifdef RGBLIGHT_ENABLE +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 330 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c new file mode 100644 index 00000000..f036c94e --- /dev/null +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -0,0 +1,535 @@ +#include "helix.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + BACKLIT, + EISU, + KANA, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +#if HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Lower| Caps | GUI | Alt | Del | Enter| Enter| Space| Alt | GUI | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_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_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + ADJUST, LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_BSPC, LT(_RAISE,KC_ENT), \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, LOWER, LOWER \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Lower| Caps | GUI | Alt | Del | Enter| Enter| Space| Alt | GUI | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = KEYMAP( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_RCTL, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_QUOT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + ADJUST, LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_DEL, LT(_RAISE,KC_ENT), \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, LOWER, LOWER \ + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Lower| Caps | GUI | Alt | Del | Enter| Enter| Space| Alt | GUI | Menu |Lower |Lower | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = KEYMAP( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, \ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_RCTL, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_GRV, KC_SLSH, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + ADJUST, LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_DEL, LT(_RAISE,KC_ENT), \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, LOWER, LOWER \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | PgDn | Left | Down | Right| End | | | End | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PrtSc| | | | | | | | | PrtSc| | | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + XXXXXXX, XXXXXXX, KC_PAUS, KC_SLCK, KC_INS, XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PAUS, XXXXXXX, KC_F12, \ + _______, KC_PGUP, XXXXXXX, KC_UP, KC_DEL, KC_HOME, KC_HOME, KC_DEL, KC_UP, XXXXXXX, KC_PGUP, _______, \ + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, \ + XXXXXXX, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | _ | - | | = | + | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | { | [ | | ] | } | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | EISU | EISU | KANA | KANA | Next | Vol- | Vol+ | Play | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_MINS), KC_MINS, KC_EQL, LSFT(KC_EQL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), KC_LBRC, KC_RBRC, LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EISU, EISU, KANA, KANA, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, \ + _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | |Dvorak|Colemk|Qwerty| | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST| | | Win | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | HUE+ | SAT+ | VAL+ |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | HUE- | SAT- | VAL- |RGB md|RGB ON| | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + XXXXXXX, XXXXXXX, XXXXXXX, DVORAK, COLEMAK, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, RESET, RGBRST, XXXXXXX, XXXXXXX, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RGB_HUI, RGB_SAI, RGB_VAI, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, XXXXXXX, XXXXXXX, \ + RGB_HUD, RGB_SAD, RGB_VAD,RGB_SMOD, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +#else +#error "undefined keymaps" +#endif + + +#ifdef AUDIO_ENABLE + +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); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; +static uint32_t current_default_layer_state; + +uint32_t default_layer_state_set_kb(uint32_t state) { + current_default_layer_state = state; + return state; +} + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(16); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick +} + +void shutdown_user() +{ + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + +// #define DEBUG_OLED_LAYER_DISPLAY + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; + +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_RAISE] = Raise_name, + [_LOWER] = Lower_name, + [_ADJUST] = Adjust_name +}; + +static int search_bit_form_lsb(uint32_t data) +{ + int i; + for( i = 0; i < 32 && (data & 1)==0 ; data >>= 1, i++ ) + {} + return i; +} + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below +#ifdef DEBUG_OLED_LAYER_DISPLAY + char buf[40]; +#endif + int name_num; + uint32_t lstate; + + name_num = search_bit_form_lsb(current_default_layer_state); + if( name_num < sizeof(layer_names)/sizeof(char *) ) { + matrix_write_P(matrix, layer_names[name_num]); +#ifdef DEBUG_OLED_LAYER_DISPLAY + } else { + snprintf(buf, sizeof(buf), "base=%d? ", name_num); + matrix_write(matrix, buf); +#endif + } + matrix_write_P(matrix, PSTR("\n")); + for( lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++ ) { + if( (lstate & 1) != 0 ) { + if( layer_names[name_num] ) { + matrix_write_P(matrix, layer_names[name_num]); +#ifdef DEBUG_OLED_LAYER_DISPLAY + } else { + snprintf(buf, sizeof(buf), ":L=%d?", name_num); + matrix_write(matrix, buf); +#endif + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< +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 */ + +#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// Helix keyboard OLED support +#define SSD1306OLED + +/* Select rows configuration */ +// Rows are 4 or 5 +#define HELIX_ROWS 5 + +/* key matrix size */ +// Rows are doubled-up +#if HELIX_ROWS == 4 + #define MATRIX_ROWS 8 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#elif HELIX_ROWS == 5 + #define MATRIX_ROWS 10 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#else + #error "expected HELIX_ROWS 4 or 5" +#endif + +#define USE_SERIAL_PD2 + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no +// Helix keyboard : RGBLED_NUM 6 or 32 +#define RGBLED_NUM 32 +#if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 255 +#else + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 120 + #else + #define RGBLIGHT_LIMIT_VAL 130 + #endif +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#endif + +#ifdef RGBLIGHT_ENABLE +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 330 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/helix/rev2/keymaps/led_test/keymap.c b/keyboards/helix/rev2/keymaps/led_test/keymap.c new file mode 100644 index 00000000..b8a9baee --- /dev/null +++ b/keyboards/helix/rev2/keymaps/led_test/keymap.c @@ -0,0 +1,616 @@ +#include "helix.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + BACKLIT, + EISU, + KANA, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +#if HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_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_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, 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 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_LCTL, 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_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_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_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_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST| | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_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, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +#elif HELIX_ROWS == 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = KEYMAP( \ + 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_LCTL, 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_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = KEYMAP( \ + 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_LCTL, 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_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | 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_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_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_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_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_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +#else +#error "undefined keymaps" +#endif + + +#ifdef AUDIO_ENABLE + +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); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(16); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick +} + +void shutdown_user() +{ + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 +#define L_ADJUST 65536 +#define L_ADJUST_TRI 65560 + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + + + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(matrix, PSTR("\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(matrix, PSTR("Lower")); + break; + case L_ADJUST: + case L_ADJUST_TRI: + matrix_write_P(matrix, PSTR("Adjust")); + break; + default: + matrix_write(matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1<. + */ +#include +#include +#include +#include +#include "progmem.h" +#include "timer.h" +#include "rgblight.h" +#include "debug.h" +#include "led_tables.h" + +__attribute__ ((weak)) +const uint16_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {1024, 20, 10, 5}; //modify for led_test +__attribute__ ((weak)) +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; +__attribute__ ((weak)) +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; +__attribute__ ((weak)) +const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; + +rgblight_config_t rgblight_config; +rgblight_config_t inmem_config; + +LED_TYPE led[RGBLED_NUM]; +uint8_t rgblight_inited = 0; +bool rgblight_timer_enabled = false; + +void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + uint8_t r = 0, g = 0, b = 0, base, color; + + #ifdef RGBLIGHT_LIMIT_VAL + if (val > RGBLIGHT_LIMIT_VAL) { + val=RGBLIGHT_LIMIT_VAL; // limit the val + } + #endif + + if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. + r = val; + g = val; + b = val; + } else { + base = ((255 - sat) * val) >> 8; + color = (val - base) * (hue % 60) / 60; + + switch (hue / 60) { + case 0: + r = val; + g = base + color; + b = base; + break; + case 1: + r = val - color; + g = val; + b = base; + break; + case 2: + r = base; + g = val; + b = base + color; + break; + case 3: + r = base; + g = val - color; + b = val; + break; + case 4: + r = base + color; + g = base; + b = val; + break; + case 5: + r = val; + g = base; + b = val - color; + break; + } + } + r = pgm_read_byte(&CIE1931_CURVE[r]); + g = pgm_read_byte(&CIE1931_CURVE[g]); + b = pgm_read_byte(&CIE1931_CURVE[b]); + + setrgb(r, g, b, led1); +} + +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { + (*led1).r = r; + (*led1).g = g; + (*led1).b = b; +} + + +uint32_t eeconfig_read_rgblight(void) { + return eeprom_read_dword(EECONFIG_RGBLIGHT); +} +void eeconfig_update_rgblight(uint32_t val) { + eeprom_update_dword(EECONFIG_RGBLIGHT, val); +} +void eeconfig_update_rgblight_default(void) { + dprintf("eeconfig_update_rgblight_default\n"); + rgblight_config.enable = 1; + rgblight_config.mode = 1; + rgblight_config.hue = 0; + rgblight_config.sat = 255; + rgblight_config.val = 255; + eeconfig_update_rgblight(rgblight_config.raw); +} +void eeconfig_debug_rgblight(void) { + dprintf("rgblight_config eprom\n"); + dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); + dprintf("rghlight_config.mode = %d\n", rgblight_config.mode); + dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); + dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); + dprintf("rgblight_config.val = %d\n", rgblight_config.val); +} + +void rgblight_init(void) { + debug_enable = 1; // Debug ON! + dprintf("rgblight_init called.\n"); + rgblight_inited = 1; + dprintf("rgblight_init start!\n"); + if (!eeconfig_is_enabled()) { + dprintf("rgblight_init eeconfig is not enabled.\n"); + eeconfig_init(); + eeconfig_update_rgblight_default(); + } + rgblight_config.raw = eeconfig_read_rgblight(); + if (!rgblight_config.mode) { + dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); + eeconfig_update_rgblight_default(); + rgblight_config.raw = eeconfig_read_rgblight(); + } + eeconfig_debug_rgblight(); // display current eeprom values + + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_init(); // setup the timer + #endif + + if (rgblight_config.enable) { + rgblight_mode(rgblight_config.mode); + } +} + +void rgblight_update_dword(uint32_t dword) { + rgblight_config.raw = dword; + eeconfig_update_rgblight(rgblight_config.raw); + if (rgblight_config.enable) + rgblight_mode(rgblight_config.mode); + else { + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + rgblight_set(); + } +} + +void rgblight_increase(void) { + uint8_t mode = 0; + if (rgblight_config.mode < RGBLIGHT_MODES) { + mode = rgblight_config.mode + 1; + } + rgblight_mode(mode); +} +void rgblight_decrease(void) { + uint8_t mode = 0; + // Mode will never be < 1. If it ever is, eeprom needs to be initialized. + if (rgblight_config.mode > 1) { + mode = rgblight_config.mode - 1; + } + rgblight_mode(mode); +} +void rgblight_step(void) { + uint8_t mode = 0; + mode = rgblight_config.mode + 1; + if (mode > RGBLIGHT_MODES) { + mode = 1; + } + rgblight_mode(mode); +} +void rgblight_step_reverse(void) { + uint8_t mode = 0; + mode = rgblight_config.mode - 1; + if (mode < 1) { + mode = RGBLIGHT_MODES; + } + rgblight_mode(mode); +} + +uint32_t rgblight_get_mode(void) { + if (!rgblight_config.enable) { + return false; + } + + return rgblight_config.mode; +} + +void rgblight_mode(uint8_t mode) { + if (!rgblight_config.enable) { + return; + } + if (mode < 1) { + rgblight_config.mode = 1; + } else if (mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } else { + rgblight_config.mode = mode; + } + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight mode: %u\n", rgblight_config.mode); + if (rgblight_config.mode == 1) { + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) { + // MODE 2-5, breathing + // MODE 6-8, rainbow mood + // MODE 9-14, rainbow swirl + // MODE 15-20, snake + // MODE 21-23, knight + // MODE 24, xmas + // MODE 25-34, static rainbow + + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_enable(); + #endif + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // MODE 25-34, static gradient + + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + } + rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); +} + +void rgblight_toggle(void) { + xprintf("rgblight toggle: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable(); + } + else { + rgblight_enable(); + } +} + +void rgblight_enable(void) { + rgblight_config.enable = 1; + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight enable: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode(rgblight_config.mode); +} + +void rgblight_disable(void) { + rgblight_config.enable = 0; + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight disable: rgblight_config.enable = %u\n", rgblight_config.enable); + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + _delay_ms(50); + rgblight_set(); +} + + +void rgblight_increase_hue(void) { + uint16_t hue; + hue = (rgblight_config.hue+RGBLIGHT_HUE_STEP) % 360; + rgblight_sethsv(hue, rgblight_config.sat, rgblight_config.val); +} +void rgblight_decrease_hue(void) { + uint16_t hue; + if (rgblight_config.hue-RGBLIGHT_HUE_STEP < 0) { + hue = (rgblight_config.hue + 360 - RGBLIGHT_HUE_STEP) % 360; + } else { + hue = (rgblight_config.hue - RGBLIGHT_HUE_STEP) % 360; + } + rgblight_sethsv(hue, rgblight_config.sat, rgblight_config.val); +} +void rgblight_increase_sat(void) { + uint8_t sat; + if (rgblight_config.sat + RGBLIGHT_SAT_STEP > 255) { + sat = 255; + } else { + sat = rgblight_config.sat + RGBLIGHT_SAT_STEP; + } + rgblight_sethsv(rgblight_config.hue, sat, rgblight_config.val); +} +void rgblight_decrease_sat(void) { + uint8_t sat; + if (rgblight_config.sat - RGBLIGHT_SAT_STEP < 0) { + sat = 0; + } else { + sat = rgblight_config.sat - RGBLIGHT_SAT_STEP; + } + rgblight_sethsv(rgblight_config.hue, sat, rgblight_config.val); +} +void rgblight_increase_val(void) { + uint8_t val; + if (rgblight_config.val + RGBLIGHT_VAL_STEP > 255) { + val = 255; + } else { + val = rgblight_config.val + RGBLIGHT_VAL_STEP; + } + rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); +} +void rgblight_decrease_val(void) { + uint8_t val; + if (rgblight_config.val - RGBLIGHT_VAL_STEP < 0) { + val = 0; + } else { + val = rgblight_config.val - RGBLIGHT_VAL_STEP; + } + rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); +} + +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { + inmem_config.raw = rgblight_config.raw; + if (rgblight_config.enable) { + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + inmem_config.hue = hue; + inmem_config.sat = sat; + inmem_config.val = val; + // dprintf("rgblight set hue [MEMORY]: %u,%u,%u\n", inmem_config.hue, inmem_config.sat, inmem_config.val); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); + } +} +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { + if (rgblight_config.enable) { + if (rgblight_config.mode == 1) { + // same static color + rgblight_sethsv_noeeprom(hue, sat, val); + } else { + // all LEDs in same color + if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { + // breathing mode, ignore the change of val, use in memory value instead + val = rgblight_config.val; + } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { + // rainbow mood and rainbow swirl, ignore the change of hue + hue = rgblight_config.hue; + } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { + // static gradient + uint16_t _hue; + int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1; + uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]); + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; + dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); + } + rgblight_set(); + } + } + rgblight_config.hue = hue; + rgblight_config.sat = sat; + rgblight_config.val = val; + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } +} + +uint16_t rgblight_get_hue(void) { + return rgblight_config.hue; +} + +uint8_t rgblight_get_sat(void) { + return rgblight_config.sat; +} + +uint8_t rgblight_get_val(void) { + return rgblight_config.val; +} + +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { + if (!rgblight_config.enable) { return; } + + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; + } + rgblight_set(); +} + +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { + if (!rgblight_config.enable || index >= RGBLED_NUM) { return; } + + led[index].r = r; + led[index].g = g; + led[index].b = b; + rgblight_set(); +} + +void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { + if (!rgblight_config.enable) { return; } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); +} + +#ifndef RGBLIGHT_CUSTOM_DRIVER +void rgblight_set(void) { + if (rgblight_config.enable) { + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } else { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } +} +#endif + +#ifdef RGBLIGHT_ANIMATIONS + +// Animation timer -- AVR Timer3 +void rgblight_timer_init(void) { + // static uint8_t rgblight_timer_is_init = 0; + // if (rgblight_timer_is_init) { + // return; + // } + // rgblight_timer_is_init = 1; + // /* Timer 3 setup */ + // TCCR3B = _BV(WGM32) // CTC mode OCR3A as TOP + // | _BV(CS30); // Clock selelct: clk/1 + // /* Set TOP value */ + // uint8_t sreg = SREG; + // cli(); + // OCR3AH = (RGBLED_TIMER_TOP >> 8) & 0xff; + // OCR3AL = RGBLED_TIMER_TOP & 0xff; + // SREG = sreg; + + rgblight_timer_enabled = true; +} +void rgblight_timer_enable(void) { + rgblight_timer_enabled = true; + dprintf("TIMER3 enabled.\n"); +} +void rgblight_timer_disable(void) { + rgblight_timer_enabled = false; + dprintf("TIMER3 disabled.\n"); +} +void rgblight_timer_toggle(void) { + rgblight_timer_enabled ^= rgblight_timer_enabled; + dprintf("TIMER3 toggled.\n"); +} + +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(r, g, b); +} + +void rgblight_task(void) { + if (rgblight_inited == 1) { //modify for led_test + /* first call */ + rgblight_inited = 2; + rgblight_enable(); + rgblight_mode(2); + } + if (rgblight_timer_enabled) { + // mode = 1, static light, do nothing here + if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { + // mode = 2 to 5, breathing mode + rgblight_effect_breathing(rgblight_config.mode - 2); +#if 0 + } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 8) { + // mode = 6 to 8, rainbow mood mod + rgblight_effect_rainbow_mood(rgblight_config.mode - 6); + } else if (rgblight_config.mode >= 9 && rgblight_config.mode <= 14) { + // mode = 9 to 14, rainbow swirl mode + rgblight_effect_rainbow_swirl(rgblight_config.mode - 9); + } else if (rgblight_config.mode >= 15 && rgblight_config.mode <= 20) { + // mode = 15 to 20, snake mode + rgblight_effect_snake(rgblight_config.mode - 15); + } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { + // mode = 21 to 23, knight mode + rgblight_effect_knight(rgblight_config.mode - 21); + } else if (rgblight_config.mode == 24) { + // mode = 24, christmas mode + rgblight_effect_christmas(); +#endif + } + } +} + +// Effects +void rgblight_effect_breathing(uint8_t interval) { + static uint8_t pos = 0; + static uint16_t last_timer = 0; + + if (timer_elapsed(last_timer) < pgm_read_word(&RGBLED_BREATHING_INTERVALS[interval])) {//modify for led_test + return; + } + last_timer = timer_read(); + + + //modify for led_test + rgblight_config.hue = (pos*120)%360; + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + pos = (pos + 1) % 3; +} +#if 0 +void rgblight_effect_rainbow_mood(uint8_t interval) { + static uint16_t current_hue = 0; + static uint16_t last_timer = 0; + + if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_MOOD_INTERVALS[interval])) { + return; + } + last_timer = timer_read(); + rgblight_sethsv_noeeprom(current_hue, rgblight_config.sat, rgblight_config.val); + current_hue = (current_hue + 1) % 360; +} +void rgblight_effect_rainbow_swirl(uint8_t interval) { + static uint16_t current_hue = 0; + static uint16_t last_timer = 0; + uint16_t hue; + uint8_t i; + if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2])) { + return; + } + last_timer = timer_read(); + for (i = 0; i < RGBLED_NUM; i++) { + hue = (360 / RGBLED_NUM * i + current_hue) % 360; + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + } + rgblight_set(); + + if (interval % 2) { + current_hue = (current_hue + 1) % 360; + } else { + if (current_hue - 1 < 0) { + current_hue = 359; + } else { + current_hue = current_hue - 1; + } + } +} +void rgblight_effect_snake(uint8_t interval) { + static uint8_t pos = 0; + static uint16_t last_timer = 0; + uint8_t i, j; + int8_t k; + int8_t increment = 1; + if (interval % 2) { + increment = -1; + } + if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_SNAKE_INTERVALS[interval / 2])) { + return; + } + last_timer = timer_read(); + for (i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { + k = pos + j * increment; + if (k < 0) { + k = k + RGBLED_NUM; + } + if (i == k) { + sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH), (LED_TYPE *)&led[i]); + } + } + } + rgblight_set(); + if (increment == 1) { + if (pos - 1 < 0) { + pos = RGBLED_NUM - 1; + } else { + pos -= 1; + } + } else { + pos = (pos + 1) % RGBLED_NUM; + } +} +void rgblight_effect_knight(uint8_t interval) { + static uint16_t last_timer = 0; + if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_KNIGHT_INTERVALS[interval])) { + return; + } + last_timer = timer_read(); + + static int8_t low_bound = 0; + static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + static int8_t increment = 1; + uint8_t i, cur; + + // Set all the LEDs to 0 + for (i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + // Determine which LEDs should be lit up + for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { + cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % RGBLED_NUM; + + if (i >= low_bound && i <= high_bound) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); + } else { + led[cur].r = 0; + led[cur].g = 0; + led[cur].b = 0; + } + } + rgblight_set(); + + // Move from low_bound to high_bound changing the direction we increment each + // time a boundary is hit. + low_bound += increment; + high_bound += increment; + + if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { + increment = -increment; + } +} + + +void rgblight_effect_christmas(void) { + static uint16_t current_offset = 0; + static uint16_t last_timer = 0; + uint16_t hue; + uint8_t i; + if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { + return; + } + last_timer = timer_read(); + current_offset = (current_offset + 1) % 2; + for (i = 0; i < RGBLED_NUM; i++) { + hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + } + rgblight_set(); +} +#endif /* 0 */ +#endif /* RGBLIGHT_ANIMATIONS */ diff --git a/keyboards/helix/rev2/keymaps/led_test/rgblight.h b/keyboards/helix/rev2/keymaps/led_test/rgblight.h new file mode 100644 index 00000000..9c1c0add --- /dev/null +++ b/keyboards/helix/rev2/keymaps/led_test/rgblight.h @@ -0,0 +1,148 @@ +/* Copyright 2017 Yang Liu + * + * This 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 RGBLIGHT_H +#define RGBLIGHT_H + +#ifdef RGBLIGHT_ANIMATIONS + #define RGBLIGHT_MODES 5 +#else + #define RGBLIGHT_MODES 1 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_MAX +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +#endif + +#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + +#ifndef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 10 +#endif +#ifndef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 17 +#endif +#ifndef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 17 +#endif + +#define RGBLED_TIMER_TOP F_CPU/(256*64) +// #define RGBLED_TIMER_TOP 0xFF10 + +#include +#include +#include "eeconfig.h" +#ifndef RGBLIGHT_CUSTOM_DRIVER +#include "ws2812.h" +#endif +#include "rgblight_types.h" + +extern LED_TYPE led[RGBLED_NUM]; + +extern const uint16_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; //modify for led_test +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint16_t hue :9; + uint8_t sat :8; + uint8_t val :8; + }; +} rgblight_config_t; + +void rgblight_init(void); +void rgblight_increase(void); +void rgblight_decrease(void); +void rgblight_toggle(void); +void rgblight_enable(void); +void rgblight_disable(void); +void rgblight_step(void); +void rgblight_step_reverse(void); +uint32_t rgblight_get_mode(void); +void rgblight_mode(uint8_t mode); +void rgblight_set(void); +void rgblight_update_dword(uint32_t dword); +void rgblight_increase_hue(void); +void rgblight_decrease_hue(void); +void rgblight_increase_sat(void); +void rgblight_decrease_sat(void); +void rgblight_increase_val(void); +void rgblight_decrease_val(void); +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); +uint16_t rgblight_get_hue(void); +uint8_t rgblight_get_sat(void); +uint8_t rgblight_get_val(void); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); + +uint32_t eeconfig_read_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); + +void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); + +#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); + +void rgblight_task(void); + +void rgblight_timer_init(void); +void rgblight_timer_enable(void); +void rgblight_timer_disable(void); +void rgblight_timer_toggle(void); +void rgblight_effect_breathing(uint8_t interval); +void rgblight_effect_rainbow_mood(uint8_t interval); +void rgblight_effect_rainbow_swirl(uint8_t interval); +void rgblight_effect_snake(uint8_t interval); +void rgblight_effect_knight(uint8_t interval); +void rgblight_effect_christmas(void); + +#endif diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk new file mode 100644 index 00000000..71323916 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -0,0 +1,38 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = 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 +# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32 +# Helix keyboard : RGBLIGHT_ENABLE = no or yes +RGBLIGHT_ENABLE = yes-but-local # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +ONEHAND_ENABLE = no # Enable one-hand typing + +# 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 + +#copy from common_features.mk and modify rgblight.c + OPT_DEFS += -DRGBLIGHT_ENABLE + SRC += rgblight.c + CIE1931_CURVE = yes + LED_BREATHING_TABLE = yes + ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) + OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER + else + SRC += ws2812.c + endif diff --git a/keyboards/helix/rev2/rev2.c b/keyboards/helix/rev2/rev2.c index 1b23edb7..75765f1d 100644 --- a/keyboards/helix/rev2/rev2.c +++ b/keyboards/helix/rev2/rev2.c @@ -1,11 +1,6 @@ #include "helix.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - #ifdef SSD1306OLED void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here @@ -15,18 +10,6 @@ void led_set_kb(uint8_t usb_led) { void matrix_init_kb(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - matrix_init_user(); }; -void shutdown_kb(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/iris/keymaps/default/keymap.c index 24ef99d2..d71748b3 100644 --- a/keyboards/iris/keymaps/default/keymap.c +++ b/keyboards/iris/keymaps/default/keymap.c @@ -41,11 +41,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| - RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RSFT, + LCTL, Z , X , C , V , B ,HOME, END , N , M ,COMM,DOT ,SLSH,RSFT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - LCTL,LOWR,SPC , ENT ,LGUI,LALT + LGUI,LOWR,ENT , SPC ,RASE,LALT // `----+----+----' `----+----+----' ), @@ -93,10 +93,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -106,9 +102,6 @@ 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; diff --git a/keyboards/iris/keymaps/rdhaene/config.h b/keyboards/iris/keymaps/rdhaene/config.h new file mode 100644 index 00000000..3c4b6cfd --- /dev/null +++ b/keyboards/iris/keymaps/rdhaene/config.h @@ -0,0 +1,24 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/iris/keymaps/rdhaene/keymap.c b/keyboards/iris/keymaps/rdhaene/keymap.c new file mode 100644 index 00000000..24ef99d2 --- /dev/null +++ b/keyboards/iris/keymaps/rdhaene/keymap.c @@ -0,0 +1,146 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LCTL,LOWR,SPC , ENT ,LGUI,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,DBUG,RHUD,RSAD,RVAD, , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S,RST , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/iris/keymaps/rdhaene/rules.mk new file mode 100644 index 00000000..d87ba791 --- /dev/null +++ b/keyboards/iris/keymaps/rdhaene/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/iris/keymaps/transmogrified/config.h b/keyboards/iris/keymaps/transmogrified/config.h new file mode 100644 index 00000000..8df0824b --- /dev/null +++ b/keyboards/iris/keymaps/transmogrified/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/iris/keymaps/transmogrified/keymap.c new file mode 100644 index 00000000..7260f0c6 --- /dev/null +++ b/keyboards/iris/keymaps/transmogrified/keymap.c @@ -0,0 +1,297 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +// config settings +#define TAPPING_TERM 250 +#define ONESHOT_TAP_TOGGLE 1 +#define ONESHOT_TIMEOUT 10000 + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _ONEHANDR 3 +#define _ONEHANDL 4 +#define _RLAYER 5 +#define _LLAYER 6 +#define _DUAL 7 +#define _CONFIG 8 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + ONEHANDR, + ONEHANDL, + RLAYER, + LLAYER, + DUAL, + CONFIG, +}; + +/* Tap Dance */ +enum { + TD_LGUIAPP, + TD_SHIFTCAPS, +}; + +/* NOOP Key and Transparent */ +#define KC_ KC_TRNS +#define KC_XXXX KC_NO + +/* LAYERS */ +#define KC_LLAY LLAYER +#define KC_RLAY RLAYER +#define KC_QWER QWERTY +#define KC_DVOR DVORAK +#define KC_COLE COLEMAK +#define KC_ONER ONEHANDR +#define KC_ONEL ONEHANDL +#define KC_DUAL DUAL +#define KC_CONF OSL(_CONFIG) + +/* Custom Shortened Keys */ +#define KC_MCTB LCTL(KC_TAB) +#define KC_MCST LCTL(LSFT(KC_TAB)) +#define KC_MCAD LALT(LCTL(KC_DEL)) +#define KC_CTEC CTL_T(KC_ESC) +#define KC_SINS LSFT(KC_INS) +#define KC_LGU1 LGUI(KC_1) +#define KC_LGU2 LGUI(KC_2) +#define KC_LGU3 LGUI(KC_3) +#define KC_LGU4 LGUI(KC_4) +#define KC_LGU5 LGUI(KC_5) +#define KC_LGU6 LGUI(KC_6) +#define KC_LGU7 LGUI(KC_7) +#define KC_LGU8 LGUI(KC_8) +#define KC_LGU9 LGUI(KC_9) +#define KC_LGU0 LGUI(KC_0) +#define KC_BLUP BL_INC +#define KC_BLDN BL_DEC +#define KC_SYSR KC_SYSREQ +#define KC_FLASH RESET + +/* Tap Dance */ +#define KC_LGUA TD(TD_LGUIAPP) +#define KC_SHCL TD(TD_SHIFTCAPS) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTEC, A , S , D , F , G , H , J , K , L ,SCLN,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + SHCL, Z , X , C , V , B ,XXXX, XXXX, N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LALT,LLAY,TAB , SPC ,RLAY,LGUA + // `----+----+----' `----+----+----' + ), + + [_COLEMAK] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTEC, A , R , S , T , D , H , N , E , I ,SCLN,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + SHCL, Z , X , C , V , B ,XXXX, XXXX, K , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LALT,LLAY,TAB , SPC ,RLAY,LGUA + // `----+----+----' `----+----+----' + ), + + [_DVORAK] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTEC, A , O , E , U , I , D , H , T , N , S ,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + SHCL,SCLN, Q , J , K , X ,XXXX, XXXX, B , M , W , V , Z ,EQL , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LALT,LLAY,TAB , SPC ,RLAY,LGUA + // `----+----+----' `----+----+----' + ), + + [_ONEHANDR] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,QWER, XXXX, N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + XXXX,XXXX,XXXX, SPC ,ONEL,ENT + // `----+----+----' `----+----+----' + ), + + [_ONEHANDL] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,LEAD, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, T , R , E , W , Q ,TAB , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, G , F , D , S , A ,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX, B , V , C , X , Z ,SHCL, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + XXXX,XXXX,XXXX, SPC ,ONEL,ENT + // `----+----+----' `----+----+----' + ), + + [_RLAYER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,XXXX,XXXX,XXXX,XXXX,XXXX, MUTE,VOLD,VOLU,BLDN,BLUP, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,TILD,GRV ,EQL ,LBRC,RBRC, PGUP,ASTR, UP ,AMPR,CIRC, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM,PIPE,DLR ,LPRN,RPRN, HOME,LEFT,DOWN,RGHT,END ,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , AT ,HASH,PERC,LCBR,RCBR,LGUI, ,PGDN,UNDS,MINS,PLUS,BSLS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_LLAYER] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,XXXX,XXXX, UP , F5 ,XXXX, ASTR, 7 , 8 , 9 ,PLUS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,XXXX,MCST,DOWN,MCTB,ENT , SLSH, 4 , 5 , 6 ,MINS, , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + ,XXXX,XXXX,BSPC,SPC ,SINS,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , 0 , , + // `----+----+----' `----+----+----' + ), + + [_DUAL] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,XXXX,XXXX,PSCR,INS ,XXXX, XXXX,SLEP,SLCK,PAUS,SYSR,XXXX, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,MS_U,XXXX,XXXX,MCAD, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,XXXX,XXXX,XXXX,XXXX,XXXX, BTN2,MS_L,MS_D,MS_R,BTN1,XXXX, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + ,LGU1,LGU2,LGU3,LGU4,LGU5,CONF, XXXX,LGU6,LGU7,LGU8,LGU9,LGU0, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_CONFIG] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + FLASH,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,QWER,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,ONER,XXXX,XXXX, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + XXXX,XXXX,XXXX,DVOR,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + XXXX,XXXX,XXXX,COLE,XXXX,XXXX, , ,XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + XXXX, ,XXXX, XXXX, ,XXXX + // `----+----+----' `----+----+----' + ), +}; + + +/* TAP DANCE */ +void shift_caps_down (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 3) { + register_code (KC_CAPS); + } else { + register_code (KC_LSFT); + } +} + +void shift_caps_up (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 3) { + unregister_code (KC_CAPS); + } else { + unregister_code (KC_LSFT); + } +} +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LGUIAPP] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, KC_APP), + [TD_SHIFTCAPS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, shift_caps_down, shift_caps_up) +}; + +/* END TAP DANCE */ + + +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) { + 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 ONEHANDR: + if (record->event.pressed) { + set_single_persistent_default_layer(_ONEHANDR); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case RLAYER: + if (record->event.pressed) { + layer_on(_RLAYER); + update_tri_layer(_RLAYER, _LLAYER, _DUAL); + } else { + unregister_code(KC_LGUI); + layer_off(_RLAYER); + update_tri_layer(_RLAYER, _LLAYER, _DUAL); + } + return false; + break; + case LLAYER: + if (record->event.pressed) { + layer_on(_LLAYER); + update_tri_layer(_RLAYER, _LLAYER, _DUAL); + } else { + layer_off(_LLAYER); + update_tri_layer(_RLAYER, _LLAYER, _DUAL); + } + return false; + break; + case ONEHANDL: + if (record->event.pressed) { + layer_on(_ONEHANDL); + } else { + layer_off(_ONEHANDL); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/iris/keymaps/transmogrified/rules.mk new file mode 100644 index 00000000..c248822b --- /dev/null +++ b/keyboards/iris/keymaps/transmogrified/rules.mk @@ -0,0 +1,6 @@ +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/jc65/v32a/info.json b/keyboards/jc65/v32a/info.json new file mode 100644 index 00000000..185a7d86 --- /dev/null +++ b/keyboards/jc65/v32a/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "jc65", + "manufacturer": "keyclack", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32a", + "bootloader": "", + "width": 16, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "KC_KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/jc65/v32u4/info.json b/keyboards/jc65/v32u4/info.json new file mode 100644 index 00000000..3723ec31 --- /dev/null +++ b/keyboards/jc65/v32u4/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "jc65", + "manufacturer": "keyclack", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/jc65/v32u4/v32u4.h b/keyboards/jc65/v32u4/v32u4.h index d3900935..ee105b93 100644 --- a/keyboards/jc65/v32u4/v32u4.h +++ b/keyboards/jc65/v32u4/v32u4.h @@ -5,9 +5,9 @@ #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, \ + 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 \ )\ {\ diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md new file mode 100644 index 00000000..39cfc69c --- /dev/null +++ b/keyboards/jj50/README.md @@ -0,0 +1,79 @@ +JJ50 +========================== + +This is a port of the QMK firmware for boards that are based on the +ps2avrGB firmware, like the [ps2avrGB keyboard] (https://www.keyclack.com/product/gb-ps2avrgb/), for use on the JJ50, a preonic-like board. + +Most of the code was taken and amended from YMD96, which in itself was taken from ps2avrGB and amended by Andrew Novak. + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +Hardware Supported: JJ50 with the ATmega32a chip. +Hardware Availability: The JJ50 PCB is available from kprepublic on AliExpress and suchlike. + + +## Installing and Building + +Make example for this keyboard (after setting up your build environment): + +``` +$ make jj50:default:program +``` +It should detect the keyboard and set it to bootloader mode automatically, prior to flashing firmware. + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. +In addition you may need the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +If you prefer, you can just build it and flash the firmware directly with +`bootloadHID` if you boot the board while holding down `Backspace` (`key below top right key`) to keep it +in the bootloader: + +``` +$ make jj50 +$ bootloadHID -r jj50_default.hex +``` +I dont use windows personally, but the following is from ymd96 regarding flashing the atmega32a: + +Since the JJ50 uses an ATmega32a chip instead of the 32u4, you need to download [HIDBootFlash v.1.0](http://vusb.wikidot.com/project:hidbootflash) for Windows. If anyone knows of a Linux/Mac bootflasher that works, edit this readme! +On Windows, I use [MINGw](http://www.mingw.org/) to compile the keymaps. On Linux or OSX you can simply use the terminal. + +Once you have those two pieces of software: +Build the keyboard with +``` +$ make jj50:default +``` +If you make your own layout, change the `default` word to whatever your layout is. + +And flash the compiled hex file with `HIDBootFlash`. Simply put the board in flashing mode by plugging it in while holding the key below the top right key, and click `find device`. Then you can specify the .hex file and flash it to the device. + + +## Troubleshooting + +1. Try plugging the board in while pressing `Backspace` (`Key below the top right key`). This will force it to boot only the bootloader without loading the firmware. Once this is done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly to your computer or plugging/unplugging the USB hub. +3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info. +4. I was occasionally finding that I wasn't flashing changes that I was making to my keymap. If that happens, simply force rebuild by making with: +``` +$ make -B jj50:default:program +``` + + + diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h new file mode 100644 index 00000000..24073259 --- /dev/null +++ b/keyboards/jj50/config.h @@ -0,0 +1,54 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER kprepublic +#define PRODUCT jj50 +#define DESCRIPTION Preonic-like clone + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + +//#define RGB_DI_PIN C0 +#define RGBLED_NUM 5 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 15 +#define RGBLIGHT_VAL_STEP 18 + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/jj50/i2c.c b/keyboards/jj50/i2c.c new file mode 100644 index 00000000..c27f3e3d --- /dev/null +++ b/keyboards/jj50/i2c.c @@ -0,0 +1,104 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c new file mode 100644 index 00000000..a75b12c4 --- /dev/null +++ b/keyboards/jj50/jj50.c @@ -0,0 +1,45 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "jj50.h" +#include "rgblight.h" + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { + rgblight_task(); +} diff --git a/keyboards/jj50/jj50.h b/keyboards/jj50/jj50.h new file mode 100644 index 00000000..09664f77 --- /dev/null +++ b/keyboards/jj50/jj50.h @@ -0,0 +1,50 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include "quantum_keycodes.h" +#include "keycode.h" +#include "action.h" + +#define KEYMAP( \ +K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ +K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ +K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \ +K311, K310, K309, K308, K304, K305, K306, K307, K303, K302, K301, K300, \ +K411, K410, K409, K408, K404, K405, K406, K407, K403, K402, K401, K400 \ +) { \ +{ K100, K001, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, }, \ +{ K200, K101, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, }, \ +{ K000, K201, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, }, \ +{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, }, \ +{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ +} + +#endif + + + + + + + + + diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c new file mode 100644 index 00000000..8a32efd0 --- /dev/null +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -0,0 +1,96 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see . +*/ + +#include "jj50.h" +#include "action_layer.h" +#include "rgblight.h" + +#define ______ KC_TRNS +#define _DEFLT 0 +#define _RAISE 1 +#define _LOWER 2 + +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 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DEFLT] = KEYMAP( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),\ + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC,KC_SPC, MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |ISO # |ISO / | PUP | PDN | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |ISO ~ |ISO | | HOM | END | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) + +}; diff --git a/keyboards/jj50/matrix.c b/keyboards/jj50/matrix.c new file mode 100644 index 00000000..8f9c67fe --- /dev/null +++ b/keyboards/jj50/matrix.c @@ -0,0 +1,106 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/jj50/program b/keyboards/jj50/program new file mode 100644 index 00000000..a88d9cd9 --- /dev/null +++ b/keyboards/jj50/program @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from __future__ import print_function + +import os +import sys +import time +import usb + +if len(sys.argv) < 2: + print('Usage: %s ' % sys.argv[0]) + sys.exit(1) + +print('Searching for ps2avrGB... ', end='') + +dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) +if dev is None: + raise ValueError('Device not found') + +print('Found', end='\n\n') + +print('Device Information:') +print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) +print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) +print('Manufacturer: %s' % (dev.iManufacturer)) +print('Serial: %s' % (dev.iSerialNumber)) +print('Product: %s' % (dev.iProduct), end='\n\n') + +print('Transferring control to bootloader... ', end='') + +dev.set_configuration() + +request_type = usb.util.build_request_type( + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) + +USBRQ_HID_SET_REPORT = 0x09 +HID_REPORT_OPTION = 0x0301 + + +try: + dev.ctrl_transfer( + request_type, + USBRQ_HID_SET_REPORT, + HID_REPORT_OPTION, + 0, + [0, 0, 0xFF] + [0] * 5 + ) +except usb.core.USBError: + # for some reason I keep getting USBError, but it works! + pass + +# wait a bit until bootloader starts up +time.sleep(2) + +print('OK') +print('Programming...') +if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: + print('\nDone!') diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk new file mode 100644 index 00000000..1b7826e5 --- /dev/null +++ b/keyboards/jj50/rules.mk @@ -0,0 +1,51 @@ +# Copyright 2017 Luiz Ribeiro +# Modified 2018 Wayne Jones (WarmCatUK) + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/jj50/usbconfig.h b/keyboards/jj50/usbconfig.h new file mode 100644 index 00000000..d2d848fc --- /dev/null +++ b/keyboards/jj50/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/k_type/info.json b/keyboards/k_type/info.json new file mode 100644 index 00000000..a168f63d --- /dev/null +++ b/keyboards/k_type/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "K-Type", + "manufacturer": "Input Club", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "cortex-m4", + "width": 18.25, + "height": 6.5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/kbd75/info.json b/keyboards/kbd75/info.json new file mode 100644 index 00000000..19489e54 --- /dev/null +++ b/keyboards/kbd75/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "KBD75", + "manufacturer": "KBDFans", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "KEYMAP_ALL": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":2.25}, {"x":6, "y":5}, {"x":7, "y":5, "w":3}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/kbd75/kbd75.h b/keyboards/kbd75/kbd75.h index 16374b4f..3648a15b 100644 --- a/keyboards/kbd75/kbd75.h +++ b/keyboards/kbd75/kbd75.h @@ -3,7 +3,8 @@ #include "quantum.h" -#define KEYMAP( \ +// LAYOUT for all possible switch positions on a KBD75 +#define KEYMAP_ALL( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ diff --git a/keyboards/kbd75/keymaps/adit/keymap.c b/keyboards/kbd75/keymaps/adit/keymap.c index 9cd473b6..8bcc15af 100644 --- a/keyboards/kbd75/keymaps/adit/keymap.c +++ b/keyboards/kbd75/keymaps/adit/keymap.c @@ -2,7 +2,7 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + KEYMAP_ALL( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TRNS, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, LT(1,KC_END), KC_CAPS, KC_LALT, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_RGUI, KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP( + KEYMAP_ALL( RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/kbd75/keymaps/default/keymap.c b/keyboards/kbd75/keymaps/default/keymap.c index 95cf3410..3c96dee0 100644 --- a/keyboards/kbd75/keymaps/default/keymap.c +++ b/keyboards/kbd75/keymaps/default/keymap.c @@ -2,7 +2,7 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + KEYMAP_ALL( LT(2, KC_ESC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, MO(1), KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, M(1), M(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/kbd75/keymaps/iso/keymap.c b/keyboards/kbd75/keymaps/iso/keymap.c index 3edc56ae..49d6ad71 100644 --- a/keyboards/kbd75/keymaps/iso/keymap.c +++ b/keyboards/kbd75/keymaps/iso/keymap.c @@ -2,7 +2,7 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + KEYMAP_ALL( LT(2, KC_ESC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, MO(1), KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, M(1), M(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + KEYMAP_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/kbd75/keymaps/smt/keymap.c b/keyboards/kbd75/keymaps/smt/keymap.c index 7dc55766..1a549e59 100644 --- a/keyboards/kbd75/keymaps/smt/keymap.c +++ b/keyboards/kbd75/keymaps/smt/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_QWERTY] = KEYMAP( + [_QWERTY] = KEYMAP_ALL( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, KC_HOME, \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \ @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: ANSI colemak */ - [_COLEMAK] = KEYMAP( + [_COLEMAK] = KEYMAP_ALL( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, KC_HOME, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, \ @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: ANSI dvorak */ - [_DVORAK] = KEYMAP( + [_DVORAK] = KEYMAP_ALL( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_INS, KC_HOME, \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGUP, \ @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 3: ANSI Fn layer */ - [_FL] = KEYMAP( + [_FL] = KEYMAP_ALL( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 4: ANSI control layer */ - [_CL] = KEYMAP( + [_CL] = KEYMAP_ALL( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ _______, _______, _______, _______, RESET, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, RGB_VAI, \ diff --git a/keyboards/knops/mini/keymaps/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c index 34e56060..7bc7fbe4 100644 --- a/keyboards/knops/mini/keymaps/knops/keymap.c +++ b/keyboards/knops/mini/keymaps/knops/keymap.c @@ -117,6 +117,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { //keyevent_t event = record->event; /*KNOPS_MACRO*/ + return NULL; } @@ -133,6 +134,8 @@ void led_set_user(uint8_t usb_led) { bool process_record_user (uint16_t keycode, keyrecord_t *record) { /*KNOPS_PROCESS_STATE*/ + + return NULL; } diff --git a/keyboards/laplace/config.h b/keyboards/laplace/config.h new file mode 100644 index 00000000..b4a52436 --- /dev/null +++ b/keyboards/laplace/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2018 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1147 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Laplace +#define DESCRIPTION 40 percent staggered keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* key matrix pins */ +#define MATRIX_ROW_PINS {D3, F4, D2, F5, D7, B4, C6, E6} +#define MATRIX_COL_PINS {D1, F6, F7, B1, B3, B2, B6} + +/* WS2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define TAPPING_TERM 200 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#endif diff --git a/keyboards/laplace/keymaps/bakingpy/keymap.c b/keyboards/laplace/keymaps/bakingpy/keymap.c new file mode 100644 index 00000000..c600cd4a --- /dev/null +++ b/keyboards/laplace/keymaps/bakingpy/keymap.c @@ -0,0 +1,63 @@ +#include "laplace.h" + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_FN1 MO(_FN1) +#define KC_FN2 MO(_FN2) +#define KC_SPFN1 LT(_FN1, KC_SPACE) +#define KC_SPFN2 LT(_FN2, KC_SPACE) +#define KC_BSFN1 LT(_FN1, KC_BSPC) +#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define KC_RST RESET +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,BSPC, + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + TAB , A , S , D , F , G , H , J , K , L ,QUOT, ENTER , + //|-----`----`----`----`----`----`----`----`----`----`----`--------+ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , + //|-------`----`----`----`----`----`----`----`----`----`----`------+ + GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 + //`-----+----+-----+----+--------+--------+-----+-----+-----+------' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + RST ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, 4 , 5 , 6 ,SCLN, , + //|-----`----`----`----`----`----`----`----`----`----`----`--------+ + RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , + //|-------`----`----`----`----`----`----`----`----`----`----`------+ + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + //`-----+----+-----+----+--------+--------+-----+-----+-----+------' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + , , ,INS ,PGUP,HOME, , , , ,COLN, , + //|-----`----`----`----`----`----`----`----`----`----`----`--------+ + , , ,DEL ,PGDN,END , , , , , , , + //|-------`----`----`----`----`----`----`----`----`----`----`------+ + , , , , DEL , , , , , + //`-----+----+-----+----+--------+--------+-----+-----+-----+------' + ) +}; diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/laplace/keymaps/bakingpy/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/laplace/keymaps/bakingpy/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/laplace/keymaps/default/keymap.c b/keyboards/laplace/keymaps/default/keymap.c new file mode 100644 index 00000000..c06cbdc7 --- /dev/null +++ b/keyboards/laplace/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include "laplace.h" + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_FN1 MO(_FN1) +#define KC_FN2 MO(_FN2) +#define KC_SPFN1 LT(_FN1, KC_SPACE) +#define KC_SPFN2 LT(_FN2, KC_SPACE) +#define KC_BSFN1 LT(_FN1, KC_BSPC) +#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define KC_RST RESET +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = KC_KEYMAP( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,BSPC, + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + TAB , A , S , D , F , G , H , J , K , L ,QUOT, ENTER , + //|-----`----`----`----`----`----`----`----`----`----`----`--------| + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , + //|-------`----`----`----`----`----`----`----`----`----`----`------| + LCTL ,LALT,LGUI ,FN1 , SPFN1 , BSFN2 ,RGUI ,RALT , FN2 , RCTL + //`-----+----+-----+----+--------`--------+-----+-----+-----+------' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + RST ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, 4 , 5 , 6 ,SCLN, , + //|-----`----`----`----`----`----`----`----`----`----`----`--------+ + RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , + //|-------`----`----`----`----`----`----`----`----`----`----`------+ + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + //`-----+----+-----+----+--------+--------+-----+-----+-----+------' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----+----+----+----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, + //|----`----`----`----`----`----`----`----`----`----`----`----`----+ + , , ,INS ,PGUP,HOME, , , , ,COLN, , + //|-----`----`----`----`----`----`----`----`----`----`----`--------+ + , , ,DEL ,PGDN,END , , , , , , , + //|-------`----`----`----`----`----`----`----`----`----`----`------+ + , , , , DEL , , , , , + //`-----+----+-----+----+--------+--------+-----+-----+-----+------' + ) +}; diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/laplace/keymaps/default/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/laplace/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/laplace/laplace.c b/keyboards/laplace/laplace.c new file mode 100644 index 00000000..dcf32aee --- /dev/null +++ b/keyboards/laplace/laplace.c @@ -0,0 +1 @@ +#include "laplace.h" diff --git a/keyboards/laplace/laplace.h b/keyboards/laplace/laplace.h new file mode 100644 index 00000000..f8ad40b3 --- /dev/null +++ b/keyboards/laplace/laplace.h @@ -0,0 +1,35 @@ +#ifndef LAPLACE_H +#define LAPLACE_H + +#include "quantum.h" + +#define KEYMAP( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B13, \ + C1, C2, C3, C4, C5, C6, C7, C9, C10, C11, C12, C13, \ + D1, D2, D3, D4, D5, D7, D10, D11, D12, D13 \ + ) { \ + {A1, A2, A3, A4, A5, A6, A7}, \ + {KC_NO, A13, A12, A11, A10, A9, A8}, \ + {B1, B2, B3, B4, B5, B6, B7}, \ + {KC_NO, B13, KC_NO, B11, B10, B9, B8}, \ + {C1, C2, C3, C4, C5, C6, C7}, \ + {KC_NO, C13, C12, C11, C10, C9, KC_NO}, \ + {D1, D2, D3, D4, D5, KC_NO, D7}, \ + {KC_NO, D13, D12, D11, D10, KC_NO, KC_NO} \ + } + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B13, \ + C1, C2, C3, C4, C5, C6, C7, C9, C10, C11, C12, C13, \ + D1, D2, D3, D4, D5, D7, D10, D11, D12, D13 \ + ) \ + KEYMAP( \ + KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, KC_##A11, KC_##A12, KC_##A13, \ + KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, KC_##B11, KC_##B13, \ + KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C9, KC_##C10, KC_##C11, KC_##C12, KC_##C13, \ + KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D7, KC_##D10, KC_##D11, KC_##D12, KC_##D13 \ + ) +#endif diff --git a/keyboards/laplace/readme.md b/keyboards/laplace/readme.md new file mode 100644 index 00000000..71b32800 --- /dev/null +++ b/keyboards/laplace/readme.md @@ -0,0 +1,20 @@ +Laplace +======= + +A 40% staggered 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) + +Make example for this keyboard (after setting up your build environment): + + make laplace:default + +Example of flashing this keyboard: + + make laplace:default:avrdude + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/laplace/rules.mk b/keyboards/laplace/rules.mk new file mode 100644 index 00000000..fe22161c --- /dev/null +++ b/keyboards/laplace/rules.mk @@ -0,0 +1,64 @@ +# 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 = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/lets_split/keymaps/OLED_sample/rules.mk b/keyboards/lets_split/keymaps/OLED_sample/rules.mk index 90616d1f..874d09ea 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/rules.mk +++ b/keyboards/lets_split/keymaps/OLED_sample/rules.mk @@ -1,6 +1,6 @@ # 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) @@ -15,7 +15,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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/lets_split/keymaps/cpeters1982/config.h b/keyboards/lets_split/keymaps/cpeters1982/config.h new file mode 100644 index 00000000..3639b9c3 --- /dev/null +++ b/keyboards/lets_split/keymaps/cpeters1982/config.h @@ -0,0 +1,54 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +// Define Tap Dance interval +//#define TAPPING_TERM 175 + +// // Enable LED strip +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 + +// Space Cadet +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 +#define DISABLE_SPACE_CADET_ROLLOVER + +// Auto Shift settings +#define AUTO_SHIFT_TIMEOUT 165 +// #define NO_AUTO_SHIFT_SPECIAL + +#endif diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c new file mode 100644 index 00000000..b5adc164 --- /dev/null +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -0,0 +1,222 @@ +#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 1 +#define _RAISE 2 +#define _ADJUST 16 + + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + // COLEMAK, + // DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +/* +// Tap dance declerations +enum { + TD_GRV_TILD = 0, +}; + +// Tap dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), +}; +*/ + + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` ~ | Q | W | E | R | T | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Rshift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Lalt | GUI | Esc |Lower |KC_SPC |Enter |Raise | [cmd|] alt |= Hypr| - | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_GRV, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTRL,KC_LALT, KC_LGUI, KC_ESC, TG(_LOWER), LT(_ADJUST, KC_SPC), KC_ENT, TG(_RAISE), MT(MOD_RGUI, KC_LBRC), MT(MOD_RALT, KC_RBRC), MT(MOD_HYPR, KC_EQL), KC_MINS \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ESC | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_ESC, 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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bspc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_MFFD, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | up | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | left | down |right | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | % | ` | ~ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |AShftD|AShftU|REPORT| | | | [ | ] | - | = | \ | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, KC_LEFT, KC_DOWN, KC_RGHT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PERC, KC_GRV, KC_TILD, \ + KC_ASDN, KC_ASUP, KC_ASRP, _______, _______, _______, _______, KC_RBRC, KC_LBRC, KC_MINS, KC_EQL, KC_BSLASH \ +) + + +}; + +/* #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 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; +}; + +#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF); +#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF); +#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF); +#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF); +#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF); +#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF); +#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF); +#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); +#define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); + +uint32_t layer_state_set_user(uint32_t state) { +#ifdef RGBLIGHT_ENABLE + uint8_t default_layer = eeconfig_read_default_layer(); + if (rgb_layer_change) { + switch (biton32(state)) { + case _RAISE: + rgblight_set_orange; + rgblight_mode(5); + break; + case _LOWER: + rgblight_set_teal; + rgblight_mode(5); + break; + case _ADJUST: + rgblight_set_purple; + rgblight_mode(23); + break; + default: + if (default_layer & (1UL << _COLEMAK)) { + rgblight_set_magenta; + } + else if (default_layer & (1UL << _DVORAK)) { + rgblight_set_green; + } + else { + rgblight_set_blue; + } + rgblight_mode(1); + break; + } + } +#endif + return state; +} diff --git a/keyboards/lets_split/keymaps/cpeters1982/rules.mk b/keyboards/lets_split/keymaps/cpeters1982/rules.mk new file mode 100644 index 00000000..f2fde785 --- /dev/null +++ b/keyboards/lets_split/keymaps/cpeters1982/rules.mk @@ -0,0 +1,8 @@ + + + +ifndef QUANTUM_DIR + include ../../../../Makefile + AUTO_SHIFT_ENABLE = yes + RGBLIGHT_ENABLE = yes +endif diff --git a/keyboards/lets_split/keymaps/dale/config.h b/keyboards/lets_split/keymaps/dlaroe/config.h similarity index 100% rename from keyboards/lets_split/keymaps/dale/config.h rename to keyboards/lets_split/keymaps/dlaroe/config.h diff --git a/keyboards/lets_split/keymaps/dale/keymap.c b/keyboards/lets_split/keymaps/dlaroe/keymap.c similarity index 73% rename from keyboards/lets_split/keymaps/dale/keymap.c rename to keyboards/lets_split/keymaps/dlaroe/keymap.c index 519fbc4a..44e16d84 100644 --- a/keyboards/lets_split/keymaps/dale/keymap.c +++ b/keyboards/lets_split/keymaps/dlaroe/keymap.c @@ -18,17 +18,22 @@ extern keymap_config_t keymap_config; // 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 _ARROW 1 +#define _GAME 2 #define _LOWER 3 #define _RAISE 4 +#define _PLOVER 5 #define _ADJUST 16 enum custom_keycodes { QWERTY = SAFE_RANGE, + ARROW, GAME, LOWER, RAISE, BACKLIT, + PLOVER, + EXT_PLV }; // Fillers to make layering more clear @@ -55,6 +60,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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) \ ), +/* Arrow + * ,-----------------------------------------------------------------------------------. + * | 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 | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ARROW] = 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, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + /* Game * ,-----------------------------------------------------------------------------------. * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | @@ -80,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | | | | | | 0 | | | | KP_+ | | * `-----------------------------------------------------------------------------------' @@ -98,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | | + * | | Wh Dn| M-L | M-Dn | M-R | | - | = | [ | ] | \ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | App | | | | | Ins | | Home | PGDN | PGUP | End | * `-----------------------------------------------------------------------------------' @@ -106,26 +129,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, \ _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), +/* 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] = KEYMAP ( \ + 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) * ,-----------------------------------------------------------------------------------. * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute | VolDn| VolUp| | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * | Brite| | | | | Play/Pause | | 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 \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP \ ) diff --git a/keyboards/lets_split/keymaps/dlaroe/rules.mk b/keyboards/lets_split/keymaps/dlaroe/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk index d5e58dad..2261a848 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk +++ b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk @@ -15,7 +15,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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/lets_split/keymaps/mjt/rules.mk b/keyboards/lets_split/keymaps/mjt/rules.mk index 90616d1f..874d09ea 100644 --- a/keyboards/lets_split/keymaps/mjt/rules.mk +++ b/keyboards/lets_split/keymaps/mjt/rules.mk @@ -1,6 +1,6 @@ # 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) @@ -15,7 +15,7 @@ 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. -ONEHAND_ENABLE = no # Enable one-hand typing +SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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/lets_split/keymaps/waples/README.md b/keyboards/lets_split/keymaps/waples/README.md new file mode 100644 index 00000000..6e171d96 --- /dev/null +++ b/keyboards/lets_split/keymaps/waples/README.md @@ -0,0 +1,58 @@ +# Waples Let's Split keymap +[Waples](https://www.github.com/Waples) + +## My (forever) Work-In-Progress keymap for my Let's Split keyboard. +My keymap is much like the default, I just personally like to have my Enter and Escape key to be on my home row. The Escape key doubles as a Control key when held down, my Enter key functions as (right)Shift when held down. +Everything you see below here is constantly *under construction*, so there may be some dumb things in this, which are already gotten taken out, or are still in there :P. + +### Layers +I currently have the following layers in my keymap: +* Qwerty (as default) +* Dvorak (still learning this type of layout, so not really used much) +* Gaming (WIP! I tried some I found, but didn't like them, so I'm in the progress of making my own) +* Lefty (lower) +* Righty (raise) +* Dual (adjust) + +#### QWERTY + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bsp | + |C_Esc| A | S | D | F | G | | H | J | K | L | ; |S_Ent| + | Sft | Z | X | C | V | B | | N | M | , | . | / | " | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + + +#### DVORAK + | Tab | " | , | . | P | Y | | F | G | C | R | L | Bsp | + |C_Esc| A | O | E | U | I | | D | H | T | N | S |S_Ent| + | Sft | ; | Q | J | K | X | | B | M | W | V | Z | / | + |P_SCR| GUI | Alt | Cps | ^L^ | Bsp | | Spc | ^R^ | Lft | Dwn | Up! | Rgt | + + +#### GAMING + | Tab | Q | W | E | R | T | | | | | | |QWERT| + | Esc | A | S | D | F | G | | | | | | | | + | Sft | Z | X | C | V | B | | | | | | | | + | Ctl | 1 | 2 | 3 | ^L^ | Spc | | Bsp | ^R^ | Lft | Dwn | Up | Rgt | + + +#### LEFTY (lower) + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bsp | + | Del | | | | | | | | ( | ) | [ | ] | | + | | | | | | | | | | | | | | + | | | | | | | | Ins | | Hme | PgD | PgU | End | + + +#### RIGHTY (raise) + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bsp | + | Del | F1 | F2 | F3 | F4 | | | = | - | \ | / | | | + | | F5 | F6 | F7 | F8 | | | | | | | | | + | | F9 | F10 | F11 | | | | | | | | | | + + +#### DUAL + |Reset| | | | |QWERT| | GAME| | | | |Reset| + | | Prv | Stp | Tog | Nxt | Nrm | | Swp | | | | | | + | | | Mte | Vol-| Vol+| | | NKRO| | | | | | + | | | | | | | |DVORK| | | | | | + + diff --git a/keyboards/lets_split/keymaps/waples/config.h b/keyboards/lets_split/keymaps/waples/config.h new file mode 100644 index 00000000..98ebeff4 --- /dev/null +++ b/keyboards/lets_split/keymaps/waples/config.h @@ -0,0 +1,17 @@ +#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 // We like to have choices I guess + +#define PREVENT_STUCK_MODIFIERS // When switching layers, this will release all mods + +#endif diff --git a/keyboards/lets_split/keymaps/waples/keymap.c b/keyboards/lets_split/keymaps/waples/keymap.c new file mode 100644 index 00000000..baf2df32 --- /dev/null +++ b/keyboards/lets_split/keymaps/waples/keymap.c @@ -0,0 +1,132 @@ +// Waples layout for Let's Split (rev2) +// Made changes from the default + +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _DVORAK 1 +#define _GAME 2 +#define _LEFTY 3 +#define _RIGHTY 4 +#define _DUAL 5 + +enum letssplit_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + GAME, + LEFTY, + RIGHTY, + DUAL, +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO +#define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc +#define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ + KC_PSCR, KC_BSPC, KC_LALT, KC_CAPS, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \ + KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +[_GAME] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \ + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_LEFTY] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_RIGHTY] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, _______, KC_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______, \ + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +[_DUAL] = KEYMAP( \ + RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, _______, RESET, \ + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, DVORAK, _______, _______, _______, _______, _______ \ +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case GAME: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_GAME); + } + return false; + break; + case LEFTY: + if (record->event.pressed) { + layer_on(_LEFTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } else { + layer_off(_LEFTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } + return false; + break; + case RIGHTY: + if (record->event.pressed) { + layer_on(_RIGHTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } else { + layer_off(_RIGHTY); + update_tri_layer(_LEFTY, _RIGHTY, _DUAL); + } + return false; + break; + case DUAL: + if (record->event.pressed) { + layer_on(_DUAL); + } else { + layer_off(_DUAL); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/waples/rules.mk b/keyboards/lets_split/keymaps/waples/rules.mk new file mode 100644 index 00000000..457a3d01 --- /dev/null +++ b/keyboards/lets_split/keymaps/waples/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index 914cf269..c400ab7b 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -1,6 +1,6 @@ #include "lets_split.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/levinson/levinson.c b/keyboards/levinson/levinson.c index 2c993dae..95f3fe9e 100644 --- a/keyboards/levinson/levinson.c +++ b/keyboards/levinson/levinson.c @@ -1,6 +1,6 @@ #include "levinson.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/mechmini/v2/v2.h b/keyboards/mechmini/v2/v2.h index 7ab22b07..5ed9a9c2 100755 --- a/keyboards/mechmini/v2/v2.h +++ b/keyboards/mechmini/v2/v2.h @@ -27,7 +27,7 @@ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ } #define KEYMAP_625_SPACE( \ diff --git a/keyboards/minidox/keymaps/haegin/keymap.c b/keyboards/minidox/keymaps/haegin/keymap.c new file mode 100644 index 00000000..64a18c1b --- /dev/null +++ b/keyboards/minidox/keymaps/haegin/keymap.c @@ -0,0 +1,92 @@ +#include "minidox.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 LETTERS 0 +#define SYMBOLS 1 +#define MEDIA 2 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | Ctrl | LOWER| | | | RAISE| Shift| + * `-------------| Space| |BckSpc|------+------. + * | | | | + * `------' `------' + */ +[LETTERS] = KEYMAP( \ + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, \ + CTL_T(KC_ESC), SFT_T(KC_BSPC), GUI_T(KC_SPC), LT(SYMBOLS, KC_ENT), LT(MEDIA, KC_TAB), ALT_T(LCTL(KC_B)) \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[SYMBOLS] = KEYMAP( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| Del | + * `-------------| | | Enter|------+------. + * | | | | + * `------' `------' + */ +[MEDIA] = KEYMAP( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ + KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, \ + _______, _______, _______, KC_ENT, _______, KC_DEL \ +) +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c index 36683fbc..24d9d650 100644 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ b/keyboards/mitosis/keymaps/datagrok/keymap.c @@ -2,8 +2,8 @@ enum mitosis_layers { - _xW, // workman _xQ, // qwerty + _xW, // workman _xS, // symbols _xN, // numbers _xF // functions @@ -12,7 +12,6 @@ enum mitosis_layers // Fillers to make layering more clear #define XXXXXXX KC_NO // No-op (no key in this location on Mitosis' fake matrix) #define _______ KC_TRNS // Transparent, because I haven't decided a mapping yet -#define ___M___ KC_TRNS // Transparent, as required by modifier key on another layer #define KC_LMTA KC_LALT // For fun, name the mods like the space cadet keyboard does #define KC_RMTA KC_RALT // META #define KC_LSUP KC_LGUI // SUPER @@ -27,17 +26,17 @@ enum mitosis_layers // other is released. Which doesn't bother me. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_xW] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT}, - {XXXXXXX, KC_LSUP, KC_LCTL, MO(_xN), KC_LSFT, KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP, XXXXXXX}, - {XXXXXXX, KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP, XXXXXXX} - }, [_xQ] = { {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_QUOT}, + {XXXXXXX, KC_LSUP, KC_LCTL, MO(_xN), SFT_T(KC_TAB), KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP, XXXXXXX}, + {XXXXXXX, KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP, XXXXXXX} + }, + [_xW] = { + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT}, {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}, {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX} }, @@ -46,21 +45,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CIRC, KC_AMPR, KC_PIPE, KC_GRV, KC_UNDS}, {KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_RABK, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH}, {XXXXXXX, _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______, XXXXXXX}, - {XXXXXXX, _______, _______, ___M___, KC_DEL, KC_ENT, ___M___, _______, _______, XXXXXXX}, + {XXXXXXX, _______, _______, _______, KC_DEL, KC_ENT, _______, _______, _______, XXXXXXX}, }, [_xN] = { - {_______, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0}, + {_______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0}, {_______, _______, _______, _______, _______, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS}, {_______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PEQL}, - {XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX}, + {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}, {XXXXXXX, _______, _______, MO(_xF), _______, KC_PENT, MO(_xF), _______, _______, XXXXXXX}, }, [_xF] = { {_______, _______, KC_PGUP, _______, KC_VOLU, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10}, {_______, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11}, - {TG(_xQ), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12}, - {XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX}, - {XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX}, + {TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12}, + {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}, + {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}, }, }; diff --git a/keyboards/mitosis/keymaps/datagrok/readme.md b/keyboards/mitosis/keymaps/datagrok/readme.md index a5b7b6c6..a81829f2 100644 --- a/keyboards/mitosis/keymaps/datagrok/readme.md +++ b/keyboards/mitosis/keymaps/datagrok/readme.md @@ -1,24 +1,30 @@ -![mitosis:datagrok layout image](https://i.imgur.com/Lt0t0nq.png) +![mitosis:datagrok layout image](https://i.imgur.com/eum3fsc.png) -[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/e1a6a7a480fd4984c0bed38ee35f6c4f) +[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/9cf33be8a8e773647cfa44a0dbc44b31) # a layout for the Mitosis - Emphasis on momentary modifiers, all usable from either hand, arranged - symmetrically, but distinguishable left/right by the OS. Shift, Fn1 - ("Lower"), Fn2 ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper. + symmetrically, but distinguishable left/right by the OS. Shift, Red + ("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper. -- Fn1 and Fn2 are used to momentary-enable (like a shift key) one of three layers: +- Red and Blue are used to momentary-enable (like a shift key) one of three layers: - - Fn1 (Red): Symbols layer - - Fn2 (Blue): Numbers layer - - Both: Functions layer + - Red: Symbols layer + - Blue: Numbers layer + - "Purple" (both Red and Blue): Functions layer -- The base layer is a slight variant of [Workman][]. QWERTY may be toggled-on. +- The base layer is QWERTY. A slight variant of [Workman][] may be toggled-on. + +- Emphasis on minimizing hand travel, so as not to lose orientation with + homerow. - Paired programming symbols (braces, brackets, parentheses) are arranged - symmetrically in the symbols layer. `?` and `!` are moved to take the place - of `<` and `>`. + symmetrically in the symbols layer. + +- `?` and `!` are moved to take the place of `<` and `>`. Rationale: unmodded + and shifted keys should be for prose, while symbols useful for programming + should be colocated on their own layer. - No OS keymap modification required. @@ -30,17 +36,24 @@ - Remove the lines in `rules.mk` mentioning `F_CPU` and `F_USB`. - Remove the lines in `config.h` mentioning `SERIAL_UART_BAUD`. -- I'm learning a new key placement, so might as well go all out and use an - optimal non-QWERTY layout. +- Workman layout -- I like the way Workman feels and some of its advantages over Colemak. - Unfortunately, it was designed using a weighting system based on a standard - column-staggered keyboard so is probably not as optimal as one could achieve - on an ergonomic board like the Mitosis. + - I'm learning a new physical key placement, so I might as well go all out + and use an optimal non-QWERTY layout. + + - I like the way Workman feels and some of its advantages over Colemak. + Unfortunately, it was designed using a weighting system based on a + standard column-staggered keyboard so is probably not as optimal as one + could achieve on an ergonomic board like the Mitosis. Maybe run an + optimizer routine after I determine good values for key difficulty on the + Mitosis. - Arrows in the home position (on a layer). Mod+Arrows = PgUp/PgDn/Home/End, which is intuitive for me +- I use tab all the time for autocompletion. To allow it to live on the base + layer it is now Mod-Tapped with left shift. + ### Abandoned ideas - ~~"Since QWERTY and Workman keep angle brackets together, place other @@ -52,22 +65,28 @@ activates a symbols layer where all brackets are easily accessible. - Space/Enter to the left of layer select for Enter doesn't work well; I always - trigger space first. + trigger space first when mashing the keys simultaneously. This might not + continue to be true if I change the angle at which I strike the keys e.g. + with a neoprene base or a wrist support. -- I used to have Blue layer on ring finger, but that was too hard to use in +- I used to have Blue on ring finger, but that was too hard to use in conjunction with shift. ## To do +- Figure out where to place non-numpad numbers so we don't need num lock turned + on to type them? - Improve LED indications (may require modding bluetooth firmware): - Is any board nonresponsive (which one?) - Does either board have a low battery? - Add Insert, PrintScr, Pause/Break -- Make QWERTY base layer for people who customize layout in software? Store - default base layer in eeprom? -- See if the henkans placement is at all useful for Japanese speakers, or abuse - different keysyms -- Mod a speaker onto my receiver and enable tones +- ~~Make QWERTY base layer for people who customize layout in software?~~ I + default to QWERTY now. +- Store default base layer in eeprom? +- See if the henkan/muhenkan placement is at all useful for Japanese speakers, + or abuse different keysyms for Left/Right Hyper. (Original space cadet used + scancodes 145/175. 145 is LANG2, 175 is "reserved" in USB HID spec.) +- Mod a buzzer onto my receiver and enable tones - Implement "layer lock" key - Improve tri-layer behavior diff --git a/keyboards/mitosis/mitosis.c b/keyboards/mitosis/mitosis.c index 61a26c66..f965f2a0 100644 --- a/keyboards/mitosis/mitosis.c +++ b/keyboards/mitosis/mitosis.c @@ -30,7 +30,7 @@ void led_set_kb(uint8_t usb_led) { } -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/niu_mini/niu_mini.c b/keyboards/niu_mini/niu_mini.c index f1607df5..60df62b9 100644 --- a/keyboards/niu_mini/niu_mini.c +++ b/keyboards/niu_mini/niu_mini.c @@ -1,6 +1,6 @@ #include "niu_mini.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/nyquist/keymaps/pitty/keymap.c b/keyboards/nyquist/keymaps/pitty/keymap.c index fcdbc946..574f1e1a 100644 --- a/keyboards/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/nyquist/keymaps/pitty/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") | + * | Esc | A | S | D | F | G | H | J | K | L | É(;)| Á(") | * |------+------+------+------+------+------|------+------+------+------+------+------| * |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -36,75 +36,75 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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_BSPC, \ - 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, \ - MT(MOD_LSFT, KC_NUBS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, KC_SPC, KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), 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_MINUS, \ + 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, \ + MT(MOD_LSFT, KC_NUBS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), LT(_VIM, KC_SPC), LT(_VIM, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL \ ), /* Gaming mode * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | |QWERTY| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | |Lower | + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | F | | | | | | | | + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Left | Down | Up | Right| + * | | | | | Spc | Spc | | | Left | Down | Up | Right| * `-----------------------------------------------------------------------------------' */ [_GAME] = KEYMAP( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER), \ - _______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Up | | Del | Ins | | 7 | 8 | 9 | / | | + * | | | Up | | | | | 7 | 8 | 9 | / | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Left | Down | Right| Home | End | | 4 | 5 | 6 | * | | + * | | Left | Down | Right| | | | 4 | 5 | 6 | * | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| | | | PGUP | PGDN | | 1 | 2 | 3 | - | | + * | Shift| | | | | | | 1 | 2 | 3 | - | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | 0 | . | = | + | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = KEYMAP( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, KC_UP, _______, KC_DEL , KC_INS , _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, KC_END , _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \ - KC_LSFT, _______, _______, _______, KC_PGUP, KC_PGDN, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______ \ ), -/* Vim Movement (Hold down F) +/* Vim Movement (Hold down SPACE) * ,-----------------------------------------------------------------------------------. - * | | | | |DM_stp| | | | | | Ő | Ű | + * | Ins | Home | PGUP | |DM_stp| | | | | | Ő | Ű | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | |DM_REC| | | Ú | Í | Ó | | | + * | Del | End | PGDN | |DM_REC| | | Ú | Í | Ó | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | LShft| | | | | | | | + * | | | | LShft| | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_VIM] = KEYMAP( \ - RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_NUHS, \ - _______, _______, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , _______, _______, \ + KC_INS, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_NUHS, \ + KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , _______, _______, \ _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______ \ ) diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/nyquist/rev1/rev1.c index 99bd781d..5f4cd32f 100644 --- a/keyboards/nyquist/rev1/rev1.c +++ b/keyboards/nyquist/rev1/rev1.c @@ -1,10 +1,5 @@ #include "rev1.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - #ifdef SSD1306OLED void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here @@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) { void matrix_init_kb(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - // // green led on // DDRD |= (1<<5); // PORTD &= ~(1<<5); @@ -30,10 +20,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/octagon/info.json b/keyboards/octagon/info.json deleted file mode 100644 index 7d3f4963..00000000 --- a/keyboards/octagon/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Octagon", - "manufacturer": "Duck", - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "width": 16, - "height": 6, - "layouts": { - "KEYMAP": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":14, "y":1, "w":2}, {"x":15, "y":1}, {"x":0.5, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":14, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":0.75, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":14, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":1.25, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":13, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":0.25, "y":5, "w":1.25}, {"x":1.5, "y":5, "w":1.25}, {"x":2.75, "y":5, "w":1.25}, {"x":9, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}] - } - } -} diff --git a/keyboards/octagon/v1/info.json b/keyboards/octagon/v1/info.json new file mode 100644 index 00000000..3db8a5d2 --- /dev/null +++ b/keyboards/octagon/v1/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Octagon V1", + "manufacturer": "Duck", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/octagon/v1/keymaps/default/keymap.c b/keyboards/octagon/v1/keymaps/default/keymap.c index 0ce6abb7..2faf7a9f 100644 --- a/keyboards/octagon/v1/keymaps/default/keymap.c +++ b/keyboards/octagon/v1/keymaps/default/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ - [0] = KEYMAP(\ + [0] = LAYOUT(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_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_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = KEYMAP(\ + [1] = LAYOUT(\ KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/octagon/v1/v1.h b/keyboards/octagon/v1/v1.h index 6ac2a81c..3a27a078 100644 --- a/keyboards/octagon/v1/v1.h +++ b/keyboards/octagon/v1/v1.h @@ -18,7 +18,7 @@ #include "../octagon.h" -#define KEYMAP( \ +#define LAYOUT( \ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5P, \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4P, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \ diff --git a/keyboards/octagon/v2/info.json b/keyboards/octagon/v2/info.json new file mode 100644 index 00000000..2b9eccc0 --- /dev/null +++ b/keyboards/octagon/v2/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Octagon V2", + "manufacturer": "Duck", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} diff --git a/keyboards/octagon/v2/keymaps/default/keymap.c b/keyboards/octagon/v2/keymaps/default/keymap.c index 0590f17c..5f7d179a 100644 --- a/keyboards/octagon/v2/keymaps/default/keymap.c +++ b/keyboards/octagon/v2/keymaps/default/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ - [0] = KEYMAP(\ + [0] = LAYOUT(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [1] = KEYMAP(\ + [1] = LAYOUT(\ KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/octagon/v2/v2.h b/keyboards/octagon/v2/v2.h index 7ad9f382..d37db4a0 100644 --- a/keyboards/octagon/v2/v2.h +++ b/keyboards/octagon/v2/v2.h @@ -18,7 +18,7 @@ #include "../octagon.h" -#define KEYMAP( \ +#define LAYOUT( \ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5Q, \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, \ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3O, K3P, \ diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 107f16d5..f8a85039 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -35,15 +35,6 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif -#define TAPPING_TERM 150 -#undef PERMISSIVE_HOLD -#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.) -#define ONESHOT_TAP_TOGGLE 2 - - /* key combination for command */ #ifdef IS_COMMAND @@ -68,7 +59,6 @@ along with this program. If not, see . #ifdef AUDIO_ENABLE #define C6_AUDIO -#define STARTUP_SONG SONG(IMPERIAL_MARCH) #define NO_MUSIC_MODE #endif @@ -78,4 +68,5 @@ along with this program. If not, see . #elif KEYBOARD_orthodox_rev3 #define PRODUCT Drashna Hacked Orthodox Rev.3 #endif + #endif diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index c0a34868..48054014 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -32,52 +32,54 @@ along with this program. If not, see . #define _______ KC_TRNS #define XXXXXXX KC_NO +#define MG_NKRO MAGIC_TOGGLE_NKRO + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = KEYMAP_wrapper(\ - KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, \ - KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, \ - KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI \ +[_QWERTY] = LAYOUT_wrapper(\ + KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, + KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI ), -[_COLEMAK] = KEYMAP_wrapper(\ - KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, \ - KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, \ - KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI \ +[_COLEMAK] = LAYOUT_wrapper(\ + KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, + KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI ), -[_DVORAK] = KEYMAP_wrapper(\ - KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, \ - KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, \ - KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI \ +[_DVORAK] = LAYOUT_wrapper(\ + KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, + KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, + KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI ), -[_WORKMAN] = KEYMAP_wrapper(\ - KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, \ - KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, \ - KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI \ +[_WORKMAN] = LAYOUT_wrapper(\ + KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, + KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, + KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI ), -[_MODS] = KEYMAP(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +[_MODS] = LAYOUT(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_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_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ +[_LOWER] = LAYOUT(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ ), -[_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_F11, KC_F12, _______, _______, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \ +[_RAISE] = LAYOUT(\ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, _______, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ ), -[_ADJUST] = KEYMAP(\ - KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), \ - KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \ +[_ADJUST] = LAYOUT(\ + KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_SMOD,RGB_HUI, KC_FXCL, AUD_ON, AUD_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), + KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h index 970d3a11..932f8fd1 100644 --- a/keyboards/orthodox/orthodox.h +++ b/keyboards/orthodox/orthodox.h @@ -5,7 +5,10 @@ #include "rev1.h" #endif #ifdef KEYBOARD_orthodox_rev3 - #include "rev3.h" +#include "rev3.h" +#endif +#ifdef KEYBOARD_orthodox_rev3_teensy +#include "rev3_teensy.h" #endif // Used to create a keymap using only KC_ prefixed keys diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index d6564f28..98c24c8c 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -45,11 +45,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, F4, F5, F6, F7, B1, B3, B2, B6 } //#define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4, D7 } -/*/ -//TEENSY -#define MATRIX_ROW_PINS { D0, C6, C7, } -#define MATRIX_COL_PINS { D2, F5, F6, F7, B6, B5, B4, D7, D6 } -/*/ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -70,7 +65,7 @@ along with this program. If not, see . /* key combination for 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_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json new file mode 100644 index 00000000..becc295d --- /dev/null +++ b/keyboards/orthodox/rev1/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Monkeebs Orthodox Rev.1", + "manufacturer": "deductivemonkee", + "identifier": "FEED:3060:0001", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "caterina", + "width": 17, + "height": 17.24, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} diff --git a/keyboards/orthodox/rev1/rules.mk b/keyboards/orthodox/rev1/rules.mk index f8456167..7e318220 100644 --- a/keyboards/orthodox/rev1/rules.mk +++ b/keyboards/orthodox/rev1/rules.mk @@ -1 +1,2 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +BACKLIGHT_ENABLE = no +BOOTLOADER = caterina diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index 5022e888..85149917 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -70,7 +70,7 @@ along with this program. If not, see . /* key combination for 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_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json new file mode 100644 index 00000000..6c4c4c61 --- /dev/null +++ b/keyboards/orthodox/rev3/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Monkeebs Orthodox Rev.3", + "manufacturer": "deductivemonkee", + "identifier": "FEED:3060:0001", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "caterina", + "width": 17, + "height": 17.24, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} diff --git a/keyboards/orthodox/rev3/rules.mk b/keyboards/orthodox/rev3/rules.mk index 7b30c0be..7e318220 100644 --- a/keyboards/orthodox/rev3/rules.mk +++ b/keyboards/orthodox/rev3/rules.mk @@ -1 +1,2 @@ BACKLIGHT_ENABLE = no +BOOTLOADER = caterina diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h new file mode 100644 index 00000000..daba627f --- /dev/null +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -0,0 +1,93 @@ +/* +This is the c configuration file for the subproject + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV3_TEENSY_CONFIG_H +#define REV3_TEENSY_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER deductivemonkee +#define PRODUCT Monkeebs Orthodox Rev.3 (Teensy) +#define DESCRIPTION Bananadox + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 6 +#define MATRIX_COLS 9 + +// wiring of each half + +//REV.3 TEENSY +#define MATRIX_ROW_PINS { B0, C6, C7, } +#define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 } + +/* 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_LGUI)) \ +) + +/* ws2812 RGB LED */ +//#define RGB_DI_PIN D3 +//#define RGBLIGHT_TIMER +//#define RGBLED_NUM 16 // Number of LEDs +//#define ws2812_PORTREG PORTD +//#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json new file mode 100644 index 00000000..1720b43d --- /dev/null +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Monkeebs Orthodox Rev.3", + "manufacturer": "deductivemonkee", + "identifier": "FEED:3060:0001", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "halfkay", + "width": 17, + "height": 17.24, + "layouts": { + "KEYMAP": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.c b/keyboards/orthodox/rev3_teensy/rev3_teensy.c new file mode 100644 index 00000000..ae45e34b --- /dev/null +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.c @@ -0,0 +1,35 @@ +/* +This is the source file for the subproject + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "orthodox.h" + +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/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h new file mode 100644 index 00000000..18b47671 --- /dev/null +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h @@ -0,0 +1,47 @@ +/* +This is the header file for the subproject + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV3_TEENSY_H +#define REV3_TEENSY_H + +#include "orthodox.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, L18}, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ + { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ + } + +#endif + diff --git a/keyboards/orthodox/rev3_teensy/rules.mk b/keyboards/orthodox/rev3_teensy/rules.mk new file mode 100644 index 00000000..40906134 --- /dev/null +++ b/keyboards/orthodox/rev3_teensy/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +BOOTLOADER = halfkay diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 1bbae99a..7132a915 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -4,7 +4,6 @@ SRC += matrix.c \ serial.c # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -43,7 +42,6 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/paladin64/config.h b/keyboards/paladin64/config.h new file mode 100755 index 00000000..27f54bf1 --- /dev/null +++ b/keyboards/paladin64/config.h @@ -0,0 +1,124 @@ +#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 inachie +#define PRODUCT paladin64 +#define DESCRIPTION Paladin64 ALPS 64 keyboard with trackpoint and underglow + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +#ifdef PS2_USE_USART + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 5 + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 2 + + /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling + * edge */ + /* set DDR of CLOCK as input to be slave */ + #define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif + +#endif diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c new file mode 100755 index 00000000..1ac670fa --- /dev/null +++ b/keyboards/paladin64/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +#include "paladin64.h" + +const uint16_t PROGMEM fn_actions[] = {}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 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_GRV, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), + + /* DVORAK */ + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), + + /* COLEMAK */ + KEYMAP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + 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_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), + + /* FUNCTION */ + 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, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), + + /* AutoMouse */ + 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_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // keyevent_t event = record->event; + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} + diff --git a/keyboards/paladin64/paladin64.c b/keyboards/paladin64/paladin64.c new file mode 100755 index 00000000..5ef78d5b --- /dev/null +++ b/keyboards/paladin64/paladin64.c @@ -0,0 +1,2 @@ +#include "paladin64.h" + diff --git a/keyboards/paladin64/paladin64.h b/keyboards/paladin64/paladin64.h new file mode 100755 index 00000000..1bbf9ea5 --- /dev/null +++ b/keyboards/paladin64/paladin64.h @@ -0,0 +1,23 @@ +#ifndef PALADIN64_H +#define PALADIN64_H + +#include "quantum.h" + +#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 } \ +} + +#endif diff --git a/keyboards/paladin64/readme.md b/keyboards/paladin64/readme.md new file mode 100644 index 00000000..41f66e2a --- /dev/null +++ b/keyboards/paladin64/readme.md @@ -0,0 +1,19 @@ +# Paladin64 ALPS PCB by /u/iNachie + +Firmware for the Paladin64 ALPS64 PCB, with underglow and an optional +trackpoint module. + +Keyboard Maintainer: [/u/iNachie](https://github.com/nachie) +Hardware Supported: Paladin64 ALPS PCB by iNachie +Hardware Availability: [/u/iNachie](https://www.reddit.com/user/inachie/) + +Make example for this keyboard (after setting up your build environment): + + make paladin64:default + +Or to make and flash: + + make paladin64: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/paladin64/rules.mk b/keyboards/paladin64/rules.mk new file mode 100755 index 00000000..b24dc49d --- /dev/null +++ b/keyboards/paladin64/rules.mk @@ -0,0 +1,60 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +BOOTLOADER = atmel-dfu + +# 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 ?= 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 +#PS2_MOUSE_ENABLE ?= yes +#PS2_USE_USART ?= yes +#PS2_USE_INT ?= yes diff --git a/keyboards/pearl/README.md b/keyboards/pearl/README.md new file mode 100644 index 00000000..ec54ba80 --- /dev/null +++ b/keyboards/pearl/README.md @@ -0,0 +1,85 @@ +# Pearl 40% + +Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel +ATMEGA32A MCU. + +## Compiling and flashing + +These instructions are for building and flashing your Pearl 40% without +Bootmapper Client. + +### Requirements + +#### Windows + +(to be written, help needed) + +#### Mac + +Apart from regular QMK and AVR dependencies you need to install +`bootloadHID`. You can install it with `homebrew` as follows: + + $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +If you don't use `homebrew` you can try following the compiling +instructions defined below in the Linux section. + +#### Linux + +For Linux you require all regular QMK dependencies, but make sure you're +using `gcc-avr` version 4.9 or higher. 4.8 and lower do not contain the +proper definitions for ATMEGA32A MCUs and QMK will fail while attempting +to compile a HEX for Pearl 40%. + +E.g. you cannot compile Pearl 40% HEX on a regular Ubuntu 14.04 as +`gcc-avr` version is maxed to 4.8 on it. + +Additionally you need an operational `bootloadHID` binary. + +You can install `bootloadHID` by taking the following steps: + + $ git clone https://github.com/robertgzr/bootloadHID ~/tmp/bootloadHIDsrc + $ cd ~/tmp/bootloadHIDsrc/commandline + $ make VENDORID=0x16c0 PRODUCTID=0x05DF # vid and pid for atmega32a + $ chmod +x bootloadHID && cp bootloadHID /usr/bin/bootloadHID + +Running `which bootloadHID` should return `/usr/bin/bootloadHID`. + +### Compiling + +Enter the QMK root directory and compile a keymap with the following +command: + + $ make pearl: + +where `` is a layout directory under the `pearl` directory. + +QMK should compile a HEX (called `pearl_.hex`) for you, which +you can flash using `bootloadHID`. + +### Flashing + +To enable Pearl 40% bootloading mode, unplug the keyboard, then plug it +in while holding `Esc` at the same time (the top-leftmost switch on the +PCB, next to the USB connector). Once the board is in bootload mode, +issue the following command (you might require `sudo` to perform the +command): + + # assuming we're still in the QMK root dir where you compiled a HEX into + $ bootloadHID -r ./pearl_.hex + +You should see something similar to + + > Page size = + > Device size = ; remaining + > Uploading bytes starting at 0 (0x0) + > ... + +where `` should be slowly increasing as the HEX is being +flashed to the board. If there is some warning about `resource busy` it +should still work OK. + +Once done the board underglow should turn red and the new firmware has +been flashed. If you can't type on the board try plugging it in again +(without holding any keys to prevent accidentally setting it into +bootload mode again). diff --git a/keyboards/pearl/keymaps/rask/.editorconfig b/keyboards/pearl/keymaps/rask/.editorconfig new file mode 100644 index 00000000..866353dc --- /dev/null +++ b/keyboards/pearl/keymaps/rask/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*.c] +indent_size = 4 +indent_style = space diff --git a/keyboards/pearl/keymaps/rask/README.md b/keyboards/pearl/keymaps/rask/README.md new file mode 100644 index 00000000..79465ffd --- /dev/null +++ b/keyboards/pearl/keymaps/rask/README.md @@ -0,0 +1,23 @@ +# rask's Pearl 40% + +## Layout + +The firmware offers five layers: + +1. Base layer +2. Base with numbers and symbols (Fn1) +3. Base with F-row and arrows (Fn2) +4. Base with media and RGB controls (Fn3) +5. More nav and utils (Fn2+Fn3, aka NavFn) + +![rask's Pearl 40% layout](https://i.imgur.com/gKVQapZ.png) + +Base for this firmware copied from jetpacktuxedo's QMK firmware. + +--- + +## Compiling and flashing + +To compile a HEX follow the Pearl 40% instructions. + +Flashing instructions also available at Pearl 40% instructions. diff --git a/keyboards/pearl/keymaps/rask/keymap.c b/keyboards/pearl/keymaps/rask/keymap.c new file mode 100644 index 00000000..b9f13509 --- /dev/null +++ b/keyboards/pearl/keymaps/rask/keymap.c @@ -0,0 +1,87 @@ +#include "pearl.h" + +#define ____ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // BASE LAYER + [0] = KEYMAP( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + MO(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(3), + KC_LCTL, KC_LALT, KC_BSPC, MO(1), MO(1), KC_SPC, KC_RALT, KC_LGUI + ), + // BASE LAYER TWO (Fn1) + [1] = KEYMAP( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_QUOT, KC_BSLS, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_RSFT, + ____, ____, ____, ____, ____, ____, ____, ____ + ), + // FROW LAYER AND ARROWS (Fn2) + [2] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_UP, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN,KC_RGHT, MO(4), + ____, ____, ____, ____, ____, ____, ____, ____ + ), + // MEDIA AND RGB (Fn3) + [3] = KEYMAP( + ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_MPRV,KC_MPLY, KC_MNXT, KC_DEL, + ____, ____, ____, RGB_HUI, RGB_SAI,RGB_VAI,____, ____, ____, ____, ____, ____, + ____, RGB_MOD, RGB_TOG, RGB_HUD, RGB_SAD,RGB_VAD,____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____ + ), + // UTIL (Fn1+Fn3) + [4] = KEYMAP( + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PSCR, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP,____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, KC_HOME, KC_PGDN,KC_END, ____, + RESET, ____, ____, ____, ____, ____, ____, ____ + ), +}; + +/** + * Status LED layer indicators courtesy of jetpacktuxedo's firmware + */ +uint32_t layer_state_set_kb(uint32_t state) +{ + // if we are on layer 1 + if (state & (1<<1)){ + // light num lock led + PORTD |= (1 << PD0); + } else{ + PORTD &= ~(1 << PD0); + } + + // if we are on layer 2 + if (state & (1<<2)){ + // light caps lock led + PORTD |= (1 << PD1); + } else{ + PORTD &= ~(1 << PD1); + } + + // if we are on layer 3 + if (state & (1<<3)){ + // light scroll lock led + PORTD |= (1 << PD6); + } else{ + PORTD &= ~(1 << PD6); + } + + /* + // if we are on layer 4 + if (state & (1<<4)){ + // light all leds + PORTD |= (1 << PD0); + PORTD |= (1 << PD1); + PORTD |= (1 << PD6); + } else{ + PORTD &= ~(1 << PD0); + PORTD &= ~(1 << PD1); + PORTD &= ~(1 << PD6); + } + */ + + return state; +} diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 5f77acf9..39cb7041 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, - { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } + { KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } }, /* M1 Special Characters diff --git a/keyboards/planck/keymaps/dale/readme.md b/keyboards/planck/keymaps/dale/readme.md deleted file mode 100644 index e5ab3875..00000000 --- a/keyboards/planck/keymaps/dale/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# 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/dc/config.h b/keyboards/planck/keymaps/dc/config.h new file mode 100644 index 00000000..07d8533b --- /dev/null +++ b/keyboards/planck/keymaps/dc/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 3 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/dc/keymap.c b/keyboards/planck/keymaps/dc/keymap.c new file mode 100644 index 00000000..6ac9c30a --- /dev/null +++ b/keyboards/planck/keymaps/dc/keymap.c @@ -0,0 +1,174 @@ +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +enum planck_layers { + _DVORAK, + _NUMBERS, + _SYMBOLS, + _ACTIONS, + _SPECIAL + }; + +enum planck_keycodes { + DVORAK, + NUMBERS, + SYMBOLS, + ACTIONS, + SPECIAL +}; + +enum tap_dance_codes { + CT_SC_LP = 0, + CT_Q_LBRC, + CT_J_LBRK, + CT_W_RBRK, + CT_V_RBRC, + CT_Z_RP, + CT_DEL_ESC +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + //keyevent_t event = record->event; + + switch (id) { + + } + return MACRO_NONE; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [0] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_LPRN), + [1] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_LCBR), + [2] = ACTION_TAP_DANCE_DOUBLE(KC_J, KC_LBRC), + [3] = ACTION_TAP_DANCE_DOUBLE(KC_W, KC_RBRC), + [4] = ACTION_TAP_DANCE_DOUBLE(KC_V, KC_RCBR), + [5] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_RPRN) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | '" | ,< | .> | P | Y | F | G | C | R | L | BS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | /? | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |LShift| ;:/( | Q/{ | J/[ | K | X | B | M | W/] | V/} | Z/) |RS/Ent| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Action| Ctrl | GUI | Alt |Number| Space/Enter |Symbol| 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_BSPACE}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH}, + {KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT)}, + {MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, + }, + + /* Numbers + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | 7 | 8 | 9 | * | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | 0 | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_NUMBERS] = { + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______}, + {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + + /* Symbols + * ,-----------------------------------------------------------------------------------. + * | `~ | ! | @ | # | $ | % | ^ | & | * | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | Ins | Pgup | | | | _ | + | | | \| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Home | End | Pgdn | | | | - | = | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_SYMBOLS] = { + {KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL}, + {KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS}, + {_______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + + /* Actions + * ,-----------------------------------------------------------------------------------. + * | LED | | | | | Sleep|Reset | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Redo | | | | | | Play | << | >> | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Undo | Cut | Copy | Paste| | | Mute | Vol- | Vol+ | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ACTIONS] = { + {BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL}, + {_______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______}, + {_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + }, + + /* Special + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_SPECIAL] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + } +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case SYMBOLS: + if (record->event.pressed) { + layer_on(_SYMBOLS); + update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); + } else { + layer_off(_SYMBOLS); + update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); + } + return false; + break; + case NUMBERS: + if (record->event.pressed) { + layer_on(_NUMBERS); + update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); + } else { + layer_off(_NUMBERS); + update_tri_layer(_NUMBERS, _SYMBOLS, _SPECIAL); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/dc/readme.md b/keyboards/planck/keymaps/dc/readme.md new file mode 100644 index 00000000..58dd1eb6 --- /dev/null +++ b/keyboards/planck/keymaps/dc/readme.md @@ -0,0 +1,2 @@ +# Practical keymap for Planck Ortholinear 40% Mechanical Keyboard +A custom Dvorak keymap with layers for numbers, symbols, and media keys. \ No newline at end of file diff --git a/keyboards/planck/keymaps/dale/rules.mk b/keyboards/planck/keymaps/dc/rules.mk similarity index 92% rename from keyboards/planck/keymaps/dale/rules.mk rename to keyboards/planck/keymaps/dc/rules.mk index 156a3a0a..6106b40e 100644 --- a/keyboards/planck/keymaps/dale/rules.mk +++ b/keyboards/planck/keymaps/dc/rules.mk @@ -1,4 +1,6 @@ - +ifndef QUANTUM_DIR + include ../../../../Makefile +endif # Build Options # change to "no" to disable the options, or define them in the Makefile in @@ -6,7 +8,7 @@ # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +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 @@ -16,10 +18,7 @@ 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. +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 - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/planck/keymaps/dale/config.h b/keyboards/planck/keymaps/dlaroe/config.h similarity index 100% rename from keyboards/planck/keymaps/dale/config.h rename to keyboards/planck/keymaps/dlaroe/config.h diff --git a/keyboards/planck/keymaps/dale/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c similarity index 59% rename from keyboards/planck/keymaps/dale/keymap.c rename to keyboards/planck/keymaps/dlaroe/keymap.c index 5682f0b4..a2d5573a 100644 --- a/keyboards/planck/keymaps/dale/keymap.c +++ b/keyboards/planck/keymaps/dlaroe/keymap.c @@ -1,8 +1,5 @@ // 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 - +// http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7 #include "planck.h" #include "action_layer.h" @@ -13,22 +10,27 @@ 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_layers { + _QWERTY, + _ARROW, + _GAME, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + enum planck_keycodes { QWERTY = SAFE_RANGE, + ARROW, GAME, LOWER, RAISE, BACKLIT, + PLOVER, + EXT_PLV }; // Fillers to make layering more clear @@ -52,9 +54,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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)} + {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)} }, + /* Arrow + * ,-----------------------------------------------------------------------------------. + * | 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 | Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ +[_ARROW] = { + {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, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + + /* Game * ,-----------------------------------------------------------------------------------. * | 1 | Q | W | E | R | T | Y | U | I | O | P | Bksp | @@ -80,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Tab | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | NumLk| F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | | | | | 0 | | | | KP_+ | | * `-----------------------------------------------------------------------------------' @@ -98,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Wh Dn| M-L | M-Dn | M-R | ACL0 | ACL1 | ACL2 | | | \ | | + * | | Wh Dn| M-L | M-Dn | M-R | | - | = | [ | ] | \ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | App | | | | Ins | | Home | PGDN | PGUP | End | * `-----------------------------------------------------------------------------------' @@ -106,26 +127,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______}, {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} }, +/* 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) * ,-----------------------------------------------------------------------------------. - * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | + * | C-A-I|Qwerty| | |Reset |Macro0| | | | |PLOVER|C-A-D | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff| Game |AGswap|AGnorm| | | | | + * | Caps | Arrow| |Aud on|Audoff| Game |AGswap|AGnorm| PrtSc|ScrLck| Break| | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute | VolDn| VolUp| | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * | Brite| | | | | Play/Pause | | 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} + {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL))}, + {KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP} } @@ -143,52 +183,40 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // 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); + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_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); + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case ARROW: + if (record->event.pressed) { + set_single_persistent_default_layer(_ARROW); } return false; break; case GAME: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(music_scale); - #endif - persistant_default_layer_set(1UL<<_GAME); + set_single_persistent_default_layer(_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); - } + 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: @@ -212,39 +240,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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; } - -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/dlaroe/readme.md b/keyboards/planck/keymaps/dlaroe/readme.md new file mode 100644 index 00000000..0fc89886 --- /dev/null +++ b/keyboards/planck/keymaps/dlaroe/readme.md @@ -0,0 +1,12 @@ +# CRS Planck Layout +Goals: + +*Maximum compatibility with standard keyboards + * I have to work on other staggered Qwerty keyboards all the time so I wanted to keep essentially the same layout instead of optimizing too much. +* Trying to fit as many characters as possible on the default layer + * its easier for me to remember logical functions than characters + * Using the extra punctuation caps in place of arrows frees up some Row 4 caps + * however, I'm trying out an arrows layout with the other punctuation on the Raise layer and it is quite nice too +* A number pad AND a number row + +[Here is the layout in easily readable KLE form.](http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7) diff --git a/keyboards/preonic/keymaps/dale/rules.mk b/keyboards/planck/keymaps/dlaroe/rules.mk similarity index 88% rename from keyboards/preonic/keymaps/dale/rules.mk rename to keyboards/planck/keymaps/dlaroe/rules.mk index 156a3a0a..22a08c66 100644 --- a/keyboards/preonic/keymaps/dale/rules.mk +++ b/keyboards/planck/keymaps/dlaroe/rules.mk @@ -6,9 +6,9 @@ # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/planck/keymaps/dodger/config.h b/keyboards/planck/keymaps/dodger/config.h new file mode 100644 index 00000000..c70acfdc --- /dev/null +++ b/keyboards/planck/keymaps/dodger/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 0x6060 +#define MANUFACTURER OLKB +#define PRODUCT Planck +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define QMK_ESC_OUTPUT F1 +#define QMK_ESC_INPUT D5 +#define QMK_LED E6 +#define QMK_SPEAKER C6 + +#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 15 + +/* 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 + +#define TAPPING_TERM 200 +#endif diff --git a/keyboards/planck/keymaps/dodger/keymap.c b/keyboards/planck/keymaps/dodger/keymap.c new file mode 100644 index 00000000..dd1e236e --- /dev/null +++ b/keyboards/planck/keymaps/dodger/keymap.c @@ -0,0 +1,338 @@ +/* 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; +bool isGame = false; +bool isMusic = false; + + +enum planck_layers { + _COLEMAK, + _GAME, + _MUSIC, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum planck_keycodes { + COLEMAK = SAFE_RANGE, + GCTOGG, + MCTOGG, + LOWER, + RAISE, + LENNY, + COMMENTHEAD, + RICKANDMORT, + MARIO, + MARIOE, + OVERWATCH, + DOOM, + DISNEY, + NUMBERONE, + CABBAGE, + OLDSPICE, +}; + +enum { + TD_SPC_ENT = 0, + TD_ESC_CAPS +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT), + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | = | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |lenny |Lower | shift|space |Raise | macro|macro2|macro3|QWERTY| + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL}, + {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_MINS}, + {KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | [ | ] | | ( | ) | { | } | | + | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | left | down | up | right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {_______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL)}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | DEL | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | bl- | bl+ | GCTG | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[_GAME] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL}, + {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_MINS}, + {KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} +}, + +[_MUSIC] = { + {MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +#ifdef AUDIO_ENABLE + float guitar[][2] = SONG(GUITAR_SOUND); + float mario[][2] = SONG(MARIO_THEME); + float marioe[][2] = SONG(MARIO_GAMEOVER); + float overwatch[][2] = SONG(OVERWATCH_THEME); + float doom[][2] = SONG(E1M1_DOOM); + float disney[][2] = SONG(DISNEY_SONG); + float numberone[][2] = SONG(NUMBER_ONE); + float cabbage[][2] = SONG(CABBAGE_SONG); + float oldspice[][2] = SONG(OLD_SPICE); +#endif + +void setLayer(int layer) { + if (layer == _COLEMAK) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(marioe); + #endif + set_single_persistent_default_layer(_COLEMAK); + #ifdef BACKLIGHT_ENABLE + backlight_set(0); + #endif + } else if (layer == _GAME) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(mario); + #endif + set_single_persistent_default_layer(_GAME); + #ifdef BACKLIGHT_ENABLE + backlight_set(15); + #endif + } else if (layer == _MUSIC) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(guitar); + #endif + set_single_persistent_default_layer(_MUSIC); + #ifdef BACKLIGHT_ENABLE + backlight_set(1); + #endif + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + #ifdef BACKLIGHT_ENABLE + backlight_set(0); + #endif + } + return false; + break; + case GCTOGG: + if (record->event.pressed) { + if (isGame) { + if (isMusic) + setLayer(_MUSIC); + else + setLayer(_COLEMAK); + isGame = false; + } else { + setLayer(_GAME); + isGame = true; + } + } + return false; + break; + case MCTOGG: + if (record->event.pressed) { + if (isMusic) { + if (isGame) + setLayer(_GAME); + else + setLayer(_COLEMAK); + isMusic = false; + } else { + setLayer(_MUSIC); + isMusic = true; + } + } + 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 LENNY: + if (record->event.pressed) { + SEND_STRING("()"); + } + return false; break; + case COMMENTHEAD: + if (record->event.pressed) { + SEND_STRING("// ---------------------------------------------------------------"); + } + return false; break; + case RICKANDMORT: + if (record->event.pressed) { + SEND_STRING("// ***************************************************************"); + } + return false; break; + case MARIO: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(mario); + #endif + } + return false; break; + case MARIOE: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(marioe); + #endif + } + return false; break; + case OVERWATCH: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(overwatch); + #endif + } + return false; break; + case DOOM: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(doom); + #endif + } + return false; break; + case DISNEY: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(disney); + #endif + } + return false; break; + case NUMBERONE: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(numberone); + #endif + } + return false; break; + case CABBAGE: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(cabbage); + #endif + } + return false; break; + case OLDSPICE: + if(record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(oldspice); + #endif + } + return false; break; + } + return true; +} + +void matrix_init_user(void) { + set_single_persistent_default_layer(_COLEMAK); + isGame = false; + #ifdef BACKLIGHT_ENABLE + backlight_level(0); + #endif +} diff --git a/keyboards/planck/keymaps/dodger/readme.md b/keyboards/planck/keymaps/dodger/readme.md new file mode 100644 index 00000000..01021081 --- /dev/null +++ b/keyboards/planck/keymaps/dodger/readme.md @@ -0,0 +1,2 @@ +# dodger + diff --git a/keyboards/planck/keymaps/dodger/rules.mk b/keyboards/planck/keymaps/dodger/rules.mk new file mode 100644 index 00000000..981a3e82 --- /dev/null +++ b/keyboards/planck/keymaps/dodger/rules.mk @@ -0,0 +1,70 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = 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 +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 + +LAYOUTS = ortho_4x12 planck_mit planck_grid + +DEFAULT_FOLDER = planck/rev5 diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index feeb137f..8ddb3d46 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -45,6 +45,7 @@ enum planck_keycodes { // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +#define SW_SPC SH_T(KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { @@ -69,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_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 }, - {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Colemak @@ -87,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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 }, - {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak @@ -105,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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 }, - {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_FN0, KC_FN0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower @@ -184,10 +185,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - ACTION_SWAP_HANDS_TAP_KEY(KC_SPC), -}; - #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); diff --git a/keyboards/planck/keymaps/experimental/rules.mk b/keyboards/planck/keymaps/experimental/rules.mk index 29108e52..b135dfca 100644 --- a/keyboards/planck/keymaps/experimental/rules.mk +++ b/keyboards/planck/keymaps/experimental/rules.mk @@ -16,7 +16,7 @@ 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. -ONEHAND_ENABLE = yes # Enable one-hand typing +SWAP_HANDS_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 diff --git a/keyboards/planck/keymaps/piemod/rules.mk b/keyboards/planck/keymaps/piemod/rules.mk index 1e48872e..84cb02bd 100644 --- a/keyboards/planck/keymaps/piemod/rules.mk +++ b/keyboards/planck/keymaps/piemod/rules.mk @@ -1,10 +1,18 @@ SUBPROJECT_DEFAULT = rev4 MOUSEKEY_ENABLE = yes -BLUETOOTH_ENABLE = yes EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes +ifeq ($(MCU),at90usb1286) +BOOTMAGIC_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +BLUETOOTH_ENABLE = no +else +BLUETOOTH_ENABLE = yes +endif + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/planck/keymaps/rodhaene/config.h b/keyboards/planck/keymaps/rodhaene/config.h new file mode 100644 index 00000000..770350f0 --- /dev/null +++ b/keyboards/planck/keymaps/rodhaene/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + +#endif + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/rodhaene/keymap.c b/keyboards/planck/keymaps/rodhaene/keymap.c new file mode 100644 index 00000000..b8a4b7f1 --- /dev/null +++ b/keyboards/planck/keymaps/rodhaene/keymap.c @@ -0,0 +1,197 @@ +/* Copyright 2018 Robert Dhaene + * + * This 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, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + NUMPAD, + LOWER, + RAISE, + BACKLIT, + EXT_NUMPAD +}; + +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 | ; |Delete| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | Alt | GUI |Lower |Enter |Space |Raise | Left | Up | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_DEL}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, + {KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT} +}, + +/* Number Pad + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | | | | | | 0 | . | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = { + {_______, _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , KC_BSPC }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_4 , KC_5 , KC_6 , KC_ENT }, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , _______}, + {EXT_NUMPAD, _______, _______, _______, _______, _______, _______, _______, KC_0 , KC_DOT , _______, _______} +}, + +/* 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} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Numpad| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Brite | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, NUMPAD, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + case NUMPAD: + if(record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_NUMPAD); + 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_NUMPAD: + if(record->event.pressed) { + layer_off(_NUMPAD); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/rodhaene/readme.md b/keyboards/planck/keymaps/rodhaene/readme.md new file mode 100644 index 00000000..de9680b4 --- /dev/null +++ b/keyboards/planck/keymaps/rodhaene/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/rodhaene/rules.mk b/keyboards/planck/keymaps/rodhaene/rules.mk new file mode 100644 index 00000000..7db99458 --- /dev/null +++ b/keyboards/planck/keymaps/rodhaene/rules.mk @@ -0,0 +1,20 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = 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/planck/planck.c b/keyboards/planck/planck.c index 1296f1b6..d9e3f00f 100644 --- a/keyboards/planck/planck.c +++ b/keyboards/planck/planck.c @@ -1,6 +1,6 @@ #include "planck.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c index a273f4ed..5f82087b 100644 --- a/keyboards/preonic/keymaps/0xdec/keymap.c +++ b/keyboards/preonic/keymaps/0xdec/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H // Layer names #define _COLEMAK 0 @@ -35,13 +30,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ESC | ALT | GUI | SHIFT| CTRL | BKSP | SPACE| RAISE| SHIFT| | DEL | TAB | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSLS}, - {KC_EQL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_LBRC,KC_RBRC}, - {KC_MINS,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_QUOT}, - {KC_SCLN,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_K ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENT }, - {KC_ESC ,KC_LALT,KC_LGUI,KC_LSFT,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_RSFT,_______,KC_DEL ,KC_TAB } -}, +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSLS, \ + KC_EQL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_LBRC,KC_RBRC, \ + KC_MINS,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_QUOT, \ + KC_SCLN,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_K ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENT, \ + KC_ESC ,KC_LALT,KC_LGUI,KC_LSFT,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_RSFT,_______,KC_DEL ,KC_TAB \ +), /* Game * ,-----------------------------------------------------------------------------------. @@ -56,13 +51,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | ALT | GUI | SPACE| CTRL | BKSP | SPACE| RAISE| , | 0 | . | TAB | * `-----------------------------------------------------------------------------------' */ -[_GAME] = { - {KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS}, - {KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PPLS}, - {KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PEQL}, - {KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PENT}, - {XXXXXXX,KC_LALT,KC_LGUI,KC_SPC ,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_PCMM,KC_P0 ,KC_PDOT,KC_TAB } -}, +[_GAME] = LAYOUT_preonic_grid( \ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PPLS, \ + KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PEQL, \ + KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PENT, \ + XXXXXXX,KC_LALT,KC_LGUI,KC_SPC ,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_PCMM,KC_P0 ,KC_PDOT,KC_TAB \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -77,13 +72,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | RESET| | | | | DEL | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_SLEP,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_PSCR}, - {XXXXXXX,KC_F11 ,KC_F12 ,XXXXXXX,AU_TOG ,KC_VOLU,BL_INC ,COLEMAK,GAME ,MU_TOG ,KC_MENU,KC_SLCK}, - {KC_CAPS,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,KC_VOLD,BL_DEC ,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_PAUS}, - {XXXXXXX,KC_WBAK,KC_WSTP,KC_WREF,KC_WFWD,KC_MUTE,BL_TOGG,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_INS }, - {RESET ,_______,_______,_______,_______,KC_DEL ,_______,_______,_______,_______,_______,_______} -} +[_RAISE] = LAYOUT_preonic_grid( \ + KC_SLEP,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_PSCR, \ + XXXXXXX,KC_F11 ,KC_F12 ,XXXXXXX,AU_TOG ,KC_VOLU,BL_INC ,COLEMAK,GAME ,MU_TOG ,KC_MENU,KC_SLCK, \ + KC_CAPS,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,KC_VOLD,BL_DEC ,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_PAUS, \ + XXXXXXX,KC_WBAK,KC_WSTP,KC_WREF,KC_WFWD,KC_MUTE,BL_TOGG,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_INS, \ + RESET ,_______,_______,_______,_______,KC_DEL ,_______,_______,_______,_______,_______,_______ \ +) }; diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index 1cbb99ca..6d30a9ab 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -49,13 +44,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space | Raise| - | = | [ | ] | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH}, - {LT(_RAISE, KC_ENT), 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 }, - {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, LT(_LOWER, KC_SPC), KC_SPC, RAISE, KC_MINUS, KC_EQUAL, KC_LBRC, KC_RBRC} -}, +[_QWERTY] = LAYOUT_preonic_mit( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + LT(_RAISE, KC_ENT), 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, \ + M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, LT(_LOWER, KC_SPC), RAISE, KC_MINUS, KC_EQUAL, KC_LBRC, KC_RBRC \ +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -70,13 +65,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space | Raise| - | = | [ | ] | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______}, - {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_COLEMAK] = LAYOUT_preonic_mit( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, \ + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -91,13 +86,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space | Raise| - | = | [ | ] | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______}, - {_______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______}, - {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_DVORAK] = LAYOUT_preonic_mit( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, \ + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, \ + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), /* GAME * ,-----------------------------------------------------------------------------------. @@ -112,13 +107,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | XXX | Lower | Space | Raise| - | = | [ | ] | * `-----------------------------------------------------------------------------------' */ -[_GAME] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH}, - {KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_GAME] = LAYOUT_preonic_mit( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______ \ +), /* NUMPAD * ,-----------------------------------------------------------------------------------. @@ -133,13 +128,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 | 0 | . | Enter| Lower| Space | Raise| - | = | [ | ] | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = { - {KC_ESC, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_P4, KC_P5, KC_P6, KC_PPLS, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_P0, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______}, -}, +[_NUMPAD] = LAYOUT_preonic_mit( \ + KC_ESC, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P0, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, _______ \ +), /* Lower * ,-----------------------------------------------------------------------------------. * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | @@ -153,13 +148,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Vol- | | | | | | | + | Enter| 0 | . | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL}, - {KC_MUTE, KC_BSPC, KC_UP, KC_DEL, KC_WWW_FORWARD, KC_BTN1, KC_MS_U, KC_BTN2, KC_PSLS, KC_P7, KC_P8, KC_P9}, - {_______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_WWW_REFRESH, KC_MS_L, KC_MS_D, KC_MS_R, KC_PAST, KC_P4, KC_P5, KC_P6}, - {KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_WWW_BACK, KC_WH_D, KC_BTN3, KC_WH_U, KC_PMNS, KC_P1, KC_P2, KC_P3}, - {KC_VOLD, _______, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PENT, KC_P0, KC_PDOT} -}, +[_LOWER] = LAYOUT_preonic_mit( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + KC_MUTE, KC_BSPC, KC_UP, KC_DEL, KC_WWW_FORWARD, KC_BTN1, KC_MS_U, KC_BTN2, KC_PSLS, KC_P7, KC_P8, KC_P9, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_WWW_REFRESH, KC_MS_L, KC_MS_D, KC_MS_R, KC_PAST, KC_P4, KC_P5, KC_P6, \ + KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_WWW_BACK, KC_WH_D, KC_BTN3, KC_WH_U, KC_PMNS, KC_P1, KC_P2, KC_P3, \ + KC_VOLD, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PENT, KC_P0, KC_PDOT \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -174,13 +169,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {_______, KC_BSPC, KC_PGUP, KC_DEL, _______, _______, _______, KC_PGUP, KC_UP, _______, _______, _______}, - {_______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______}, - {_______, KC_PAUSE, KC_INS, _______, KC_PSCR, KC_PSCR, _______, KC_END, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_RAISE] = LAYOUT_preonic_mit( \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + _______, KC_BSPC, KC_PGUP, KC_DEL, _______, _______, _______, KC_PGUP, KC_UP, _______, _______, _______, \ + _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ + _______, KC_PAUSE, KC_INS, _______, KC_PSCR, KC_PSCR, _______, KC_END, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -195,13 +190,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Reset | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______}, - {_______, RESET, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, MI_ON, MI_OFF, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, ARROW, GAME, NUMPAD, _______, _______}, - {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_mit( \ + _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, MI_ON, MI_OFF, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, ARROW, GAME, NUMPAD, _______, _______, \ + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/keymaps/blake-newman/keymap.c b/keyboards/preonic/keymaps/blake-newman/keymap.c index d14263d9..17440d2c 100644 --- a/keyboards/preonic/keymaps/blake-newman/keymap.c +++ b/keyboards/preonic/keymaps/blake-newman/keymap.c @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#include "preonic.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H enum preonic_layers { _QWERTY, @@ -52,13 +51,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {KC_GRV, KC_1, KC_2, KC_5, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT} - }, + [_QWERTY] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_5, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT \ + ), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -73,13 +72,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT} - }, + [_COLEMAK] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT \ + ), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -94,13 +93,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_BSPC, 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_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT} - }, + [_DVORAK] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_BSPC, 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_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT \ + ), /* Numpad * ,-----------------------------------------------------------------------------------. @@ -115,13 +114,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_NUMPAD] = { - {KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL}, - {KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC}, - {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT}, - {KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT} - }, + [_NUMPAD] = LAYOUT_preonic_mit( \ + KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL, \ + KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC, \ + KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT, \ + KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT \ + ), /* Lower @@ -137,13 +136,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_LOWER] = { - {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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC}, - {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT} - }, + [_LOWER] = LAYOUT_preonic_mit( \ + 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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC, \ + KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT \ + ), /* Raise * ,-----------------------------------------------------------------------------------. @@ -158,13 +157,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift| * `-----------------------------------------------------------------------------------' */ - [_RAISE] = { - {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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC}, - {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE}, - {KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT}, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT} - }, + [_RAISE] = LAYOUT_preonic_mit( \ + 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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC, \ + KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT \ + ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -179,13 +178,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR}, - {KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} - } + [_ADJUST] = LAYOUT_preonic_mit( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR, \ + KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) }; diff --git a/keyboards/preonic/keymaps/bucktooth/config.h b/keyboards/preonic/keymaps/bucktooth/config.h new file mode 100644 index 00000000..b9888312 --- /dev/null +++ b/keyboards/preonic/keymaps/bucktooth/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define FORCE_NKRO 1 +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c new file mode 100644 index 00000000..d3bcf66e --- /dev/null +++ b/keyboards/preonic/keymaps/bucktooth/keymap.c @@ -0,0 +1,121 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +#define L_QWERTSPLITLY 0 +#define L_FN 1 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for Mac specific key accelerators used in map. Some of these are very awkward to type. +// These are the default bindings for Mac, some of which may be turned off or changed, check your +// settings in System Preferences +#define LS_TAB LSFT(KC_TAB) // Shift-TAB +#define MF_MENU LCTL(KC_F2) // Move focus to menu bar default keybinding in MacOS +#define MF_DOCK LCTL(KC_F3) // Move focus to dock +#define MF_TOOL LCTL(KC_F5) // Move focus to window toolbar +#define MF_STAT LCTL(KC_F8) // Move focus to status bar side of menu bar +#define MF_DRWR LALT(LGUI(KC_QUOTE)) // Move focus to window drawer +#define MF_LPAD LALT(LGUI(KC_Q)) // Show Launchpad +#define MF_NOTI LALT(LGUI(LCTL(KC_B))) // Show Notification Center +#define MF_DASH LALT(LGUI(LCTL(KC_C))) // Show Dashboard +#define MF_HELP LSFT(LGUI(KC_SLASH)) // Position in menu Help search box + +// Momentary/Tap Combos used by this layout +#define LT_FNESC LT(L_FN, KC_ESC) // ESC when tapped, Fn layer when held +#define MT_RGENT MT(MOD_RGUI, KC_ENTER) // Enter when tapped, right GUI when held +#define LT_FNLFT LT(L_FN, KC_LEFT) // Left when tapped, Fn layer when held +#define MT_RSDOT MT(MOD_RSFT, KC_DOT) // Dot when tapped, right shift when held + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QwertSplitly + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Q | W | E | R | T | [ | ] | Y | U | I | O | P | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | A | S | D | F | G | ` | ' | H | J | K | L | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| + * `-----------------------------------------------------------------------------------' + */ +[L_QWERTSPLITLY] = LAYOUT_preonic_grid( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINUS,KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRAVE,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSLS, KC_SLASH,KC_N, KC_M, KC_COMM, MT_RSDOT,\ + LT_FNESC,KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TAB, KC_BSPC, KC_SPC, MT_RGENT,LT_FNLFT,KC_DOWN, KC_RIGHT \ +), + +/* Fn + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |[ESC] |RCtrl | ROpt | RCmd |Space |Sh-Tab| Del |Space |PadEnt| [fn] | Up | Left | + * `-----------------------------------------------------------------------------------' + */ +[L_FN] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLD, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MRWD, KC_MFFD, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_PGUP, \ + KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_MUTE, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, \ + KC_RSFT, MF_MENU, MF_STAT, MF_DOCK, MF_TOOL, MF_NOTI, KC_INS, KC_ACL0, KC_ACL1, KC_ACL2, KC_HOME, KC_END, \ + _______, KC_RCTL, KC_RALT, KC_RGUI, _______, LS_TAB, KC_DEL, _______, KC_PENT, _______, KC_UP, KC_LEFT \ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_C5, 8}, + {NOTE_E6, 4}, + {NOTE_D6, 16}, + {NOTE_G6, 8} +}; + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +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/bucktooth/readme.md b/keyboards/preonic/keymaps/bucktooth/readme.md new file mode 100644 index 00000000..a1bda9f6 --- /dev/null +++ b/keyboards/preonic/keymaps/bucktooth/readme.md @@ -0,0 +1,55 @@ +# Bucktooth v1.0 (Mac) + +Bucktooth is an alternate layout that pushes the letters to the edges and puts most punctuation in the center. It's derived in part from my experience with Ergodox boards. I call the main layer layout QWERTSplitlY, you may notice the right side punctuation moving to the center and the control keys missing from the left. + +## Split QWERTY: Unorthodox + + QwertSplitly + ,-----------------------------------------------------------------------------------. + | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Q | W | E | R | T | [ | ] | Y | U | I | O | P | + |------+------+------+------+------+-------------+------+------+------+------+------| + | A | S | D | F | G | ` | ' | H | J | K | L | ; | + |------+------+------+------+------+------|------+------+------+------+------+------| + |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + |------+------+------+------+------+------+------+------+------+------+------+------| + |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| + `-----------------------------------------------------------------------------------' + + +It is a bit of a departure from normal Preonic layouts. You will notice that the bottom letter row is shifted right, and this is both an accomodation for the left shift and because I could never get used to C being directly under D and some other similar staggered keyboard tendencies. If you are used to the default ortho layouts you may want to adjust this back; but, you may find that it is slightly easier to move between a typical staggered layout and ortho boards in this layout. Plus, having a dedicated shift is a good thing, even though the dot key does double duty as a right shift. + +That left shift is the only control or modifier key on the top four rows. All the modifiers and control keys are in the bottom row. Most Ergodox boards put the braces ({}[]) in the center and keep the hands apart. The hands aren't very far apart in this layout but you can imagine moving between this layout and the Ergodox easily, if you can get used to the lack of the extra 1.5U columns on the left and right! + +With all control keys on the bottom row, the ESC key now lives in the bottom left and on my keyboard I actually put a very heavy keyswitch in that space to keep me from hitting it accidentally instead of ctrl. Hold it down and it becomes fn. I usually hit it with my whole hand since it is in the corner, without moving my fingers down to it. + +## Function Layer + +There are no raise and lower or multiple function pages. The Preonic has enough keys to avoid more than a single function page, and I prefer to have spacebars for both thumbs so the "Bucktooth" name comes from the typical keyset with darker function keys and lighter alphas and space keys giving the keyboard fang-like appearance where the two spaces are. + + + Fn + ,-----------------------------------------------------------------------------------. + | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + |------+------+------+------+------+------+------+------+------+------+------+------| + | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + |------+------+------+------+------+------|------+------+------+------+------+------| + |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | + |------+------+------+------+------+------+------+------+------+------+------+------| + |[ESC] |RCtrl | ROpt | RCmd |Space |Sh-Tab| Del |Space |PadEnt| [fn] | Up | Left | + `-----------------------------------------------------------------------------------' + +### Cursor Keys + +The cursor keys are a design I stole from the old Commodore computers which had DOWN and RIGHT keys on the bottom right part of the board. When shifted, they would move the cursor in the opposite direction, and Commodore saved two keys. Since shifted arrows are a common use case in selecting text, emulating this exactly is not desirable so the fn key is placed next to the cursor down and right keys and holding down fn will reverse their meaning. Unlike the Commodore keys they will not invert just by releasing fn but it is close. Because QMK supports it I also allow use the tap mode for fn to move the cursor left, so only going up requires the fn. This is surely the weirdest part of the layout for most people. As someone who learned to type on a Commodore keyboard, it is second nature to me! + +### Mac Keyboard navigation Combo Macros + +On Fn layer ZXCVB and SDFG keys I have set up the default key bindings for Mac OS Keyboard Focus keys since they are obscure and require FKeys mostly. They are pretty convenient for using the keyboard to search the menus, go to the dock, etc. Some like the one to jump to a window's toolbar and the one to jump to a window's accessory drawer are less commonly used. + +___ + +Contributed to QMK and released with the QMK license by J. Eric Mason, 3/16/2018 diff --git a/keyboards/preonic/keymaps/bucktooth/rules.mk b/keyboards/preonic/keymaps/bucktooth/rules.mk new file mode 100644 index 00000000..3e87d41d --- /dev/null +++ b/keyboards/preonic/keymaps/bucktooth/rules.mk @@ -0,0 +1,20 @@ + + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = 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. + +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/preonic/keymaps/choromanski/config.h b/keyboards/preonic/keymaps/choromanski/config.h new file mode 100644 index 00000000..600cbea5 --- /dev/null +++ b/keyboards/preonic/keymaps/choromanski/config.h @@ -0,0 +1,52 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(COLEMAK_SOUND), \ + SONG(QWERTY_SOUND), \ + SONG(AUDIO_ON_SOUND), \ + SONG(TERMINAL_SOUND), \ + SONG(NO_SOUND), \ + SONG(MUSIC_ON_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != MU_TOG) + + +/* + * 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 + +#ifndef TAPPING_TERM +#define TAPPING_TERM 200 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/choromanski/keymap.c b/keyboards/preonic/keymaps/choromanski/keymap.c new file mode 100644 index 00000000..5f11a9fe --- /dev/null +++ b/keyboards/preonic/keymaps/choromanski/keymap.c @@ -0,0 +1,174 @@ +#include QMK_KEYBOARD_H + +enum preonic_layers { + _COLEMAK, + _QWERTY, + _FUNCT, + _NUMPAD, + _SYMB, + _MUSIC +}; + +enum preonic_keycodes { + FUNCT +}; + +//Tap Dance Declarations +enum { + G1 = 0, + BRC, + EQ +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for 1, twice for Grave + [G1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_GRV), + //Tap once for [, twice for ] + [BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for = twice for Backslash + [EQ] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_BSLS) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ ] | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Numpad| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + TD(G1), KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TD(EQ), \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, TD(BRC), \ + 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, TG(_NUMPAD), \ + OSL(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* 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 | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Numpad| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + TD(G1), KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TD(EQ), \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD(BRC), \ + 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, TG(_NUMPAD), \ + OSL(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Symbol| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCT] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Numpad & Mouse + * ,-----------------------------------------------------------------------------------. + * | ` | | |M-clic| | | | | / | * | - | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ACL0 |L-clck| Up |R-clck|Scrl U| | 7 | 8 | 9 | + | ] | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ACL1 | Left | Down |Right |Scrl D| | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ACL2 | VOLU | PREV |PAUSE | NEXT | | 1 | 2 | 3 |Enter | Back | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Symbol| | VOLD | MUTE | Bksp | Del |Enter |Space | 0 | . |Enter | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( \ + KC_GRV, _______, _______, KC_BTN3, _______, _______, _______, KC_NLCK, KC_SLSH, KC_ASTR, KC_MINS, KC_BSLS, \ + _______, KC_ACL0, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_7, KC_8, KC_9, KC_PLUS, KC_RBRC, \ + _______, KC_ACL1, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_4, KC_5, KC_6, KC_PLUS, _______, \ + _______, KC_ACL2, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_1, KC_2, KC_3, KC_ENT, _______, \ + OSL(_SYMB), _______, KC_VOLD, KC_MUTE, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_0, KC_DOT, KC_ENT, _______ \ +), + +/* Symbol + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + | < | > | # | ~ | ( | ) | \ | : | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ! | - | = | % | @ | _ | { | } | / | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |MUSIC | * | & | / | $ | ^ | | | [ | ] | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | FN |COLMAK|QWERTY| | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SYMB] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_PIPE, KC_PLUS, KC_LABK, KC_RABK, KC_HASH, KC_TILD, KC_LPRN, KC_RPRN, KC_BSLS, KC_COLN, _______, \ + _______, KC_EXLM, KC_MINS, KC_EQL, KC_PERC, KC_AT, KC_UNDS, KC_LCBR, KC_RCBR, KC_SLSH, KC_QUES, _______, \ + TO(_MUSIC), KC_ASTR, KC_AMPR, KC_SLSH, KC_DLR, KC_CIRC, KC_PIPE, KC_LBRC, KC_RBRC, _______, _______, _______, \ + _______, FUNCT, TO(_COLEMAK), TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Music + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |COLMAK| | | | | | | | | | MOD | TOG | + * `-----------------------------------------------------------------------------------' + */ +[_MUSIC] = LAYOUT_preonic_grid( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + TO(_COLEMAK), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MU_MOD, MU_TOG \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FUNCT: + if (record->event.pressed) { + layer_off(_SYMB); + layer_on(_FUNCT); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/preonic/keymaps/choromanski/readme.md b/keyboards/preonic/keymaps/choromanski/readme.md new file mode 100644 index 00000000..5b8d3590 --- /dev/null +++ b/keyboards/preonic/keymaps/choromanski/readme.md @@ -0,0 +1,95 @@ +# Choromanski + +## Features +* Colemak +* Qwerty +* Toggable function row +* Symbol layer programmer friendly +* Numpad/Mouse layer with media controls + +## Layers + +### 0 Colemak +``` +,-----------------------------------------------------------------------------------. +| 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | F | P | G | J | L | U | Y | ; | [ ] | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / |Numpad| +|------+------+------+------+------+------+------+------+------+------+------+------| +|Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` +### 1 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 | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Numpad| +|------+------+------+------+------+------+------+------+------+------+------+------| +|Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` +### 2 Function Lock +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|Symbol| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` +### 3 Numpad/Mouse with Media Controls +``` +,-----------------------------------------------------------------------------------. +| ` | | |M-clic| | | | | / | | - | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ACL0 |L-clck| Up |R-clck|Scrl U| | 7 | 8 | 9 | + | ] | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ACL1 | Left | Down |Right |Scrl D| | 4 | 5 | 6 | + | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ACL2 | VOLU | PREV |PAUSE | NEXT | | 1 | 2 | 3 |Enter | Back | +|------+------+------+------+------+------+------+------+------+------+------+------| +|Symbol| | VOLD | MUTE | Bksp | Del |Enter |Space | 0 | . |Enter | | +`-----------------------------------------------------------------------------------' +``` +### 4 Symbols +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | + | < | > | # | ~ | ( | ) | \ | : | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ! | - | = | % | @ | _ | { | } | / | ? | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|MUSIC | * | & | / | $ | ^ | | | [ | ] | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | FN |COLMAK|QWERTY| | | | | | | | | +`-----------------------------------------------------------------------------------' +``` +### 5 Music +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|COLMAK| | | | | | | | | | MOD | TOG | +`-----------------------------------------------------------------------------------' +``` \ No newline at end of file diff --git a/keyboards/preonic/keymaps/choromanski/rules.mk b/keyboards/preonic/keymaps/choromanski/rules.mk new file mode 100644 index 00000000..9aae19dd --- /dev/null +++ b/keyboards/preonic/keymaps/choromanski/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes +AUDIO_ENABLE = yes diff --git a/keyboards/preonic/keymaps/dale/readme.md b/keyboards/preonic/keymaps/dale/readme.md deleted file mode 100644 index ea044cbf..00000000 --- a/keyboards/preonic/keymaps/dale/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# 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/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index c9d04958..de3eb229 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#include "preonic.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H enum preonic_layers { _QWERTY, @@ -50,13 +49,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -71,13 +70,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 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} -}, +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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 * ,-----------------------------------------------------------------------------------. @@ -92,13 +91,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 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} -}, +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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 * ,-----------------------------------------------------------------------------------. @@ -113,13 +112,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_preonic_grid( \ + 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_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 * ,-----------------------------------------------------------------------------------. @@ -134,13 +133,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_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_PGUP, KC_PGDN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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_PGUP, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -155,13 +154,13 @@ 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL}, - {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/keymaps/dale/config.h b/keyboards/preonic/keymaps/dlaroe/config.h similarity index 100% rename from keyboards/preonic/keymaps/dale/config.h rename to keyboards/preonic/keymaps/dlaroe/config.h diff --git a/keyboards/preonic/keymaps/dale/keymap.c b/keyboards/preonic/keymaps/dlaroe/keymap.c similarity index 56% rename from keyboards/preonic/keymaps/dale/keymap.c rename to keyboards/preonic/keymaps/dlaroe/keymap.c index 3c9fb558..0da0d68e 100644 --- a/keyboards/preonic/keymaps/dale/keymap.c +++ b/keyboards/preonic/keymaps/dlaroe/keymap.c @@ -1,9 +1,7 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +// Dale's Planck with a number row, I mean Preonic. +// I could have done something cooler with the top row I guess but I'm pretty much a Planck guy, that is the reason for the duplication of keys. + +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -12,8 +10,7 @@ enum preonic_layers { _QWERTY, - _COLEMAK, - _DVORAK, + _ARROW, _LOWER, _RAISE, _ADJUST @@ -21,8 +18,7 @@ enum preonic_layers { enum preonic_keycodes { QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, + ARROW, LOWER, RAISE, BACKLIT @@ -47,61 +43,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 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 +[_QWERTY] = LAYOUT_preonic_mit( \ + 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, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC) \ +), + +/* Arrow * ,-----------------------------------------------------------------------------------. - * | ` | 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 | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | GUI | \ | Alt |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} -}, +[_ARROW] = LAYOUT_preonic_mit( \ + 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, RAISE, KC_LEFT, KC_DOWN, KC_UP, MT(MOD_RCTL, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | . | * | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -110,13 +85,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | 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, _______} -}, +[_LOWER] = LAYOUT_preonic_mit( \ + 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_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_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_PLUS, _______ \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -126,19 +101,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | Wh Up|RightC| M-Up | LeftC|QWERTY| Left | Down | Up | Right| | | ` | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Wh Dn| M-L | M-Dn | M-R | PrScr| Sc Lk| Break| | | \ | | + * | | Wh Dn| M-L | M-Dn | M-R | | - | = | [ | ] | \ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | 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} -}, - +[_RAISE] = LAYOUT_preonic_mit( \ + 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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, + _______, KC_APP, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -146,20 +120,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | C-A-I|Qwerty| | |Reset |Macro0| | | | | |C-A-D | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff| |AGswap|AGnorm| | | | | + * | Caps | Arrow| |Aud on|Audoff| |AGswap|AGnorm| PrtSc|ScrLck| Break| | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute |VolUp |VolDn | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | | | | | | BL_T |BL_DEC|BL_INC|BL_ST | + * | Brite| | | | | Play/Pause | | 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} -} +[_ADJUST] = LAYOUT_preonic_mit( \ + 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), _______, MAGIC_TOGGLE_NKRO, _______, _______, _______, LALT(LCTL(KC_DEL)), + KC_CAPS, ARROW, _______, AU_ON, AU_OFF, _______, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + BACKLIT, _______, _______, _______, _______, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP +) }; @@ -185,8 +159,6 @@ float tone_startup[][2] = { }; 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); @@ -209,21 +181,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } 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: + case ARROW: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + persistent_default_layer_set(1UL<<_ARROW); } return false; break; @@ -292,5 +252,4 @@ void music_scale_user(void) { PLAY_SONG(music_scale); } - #endif diff --git a/keyboards/preonic/keymaps/dlaroe/readme.md b/keyboards/preonic/keymaps/dlaroe/readme.md new file mode 100644 index 00000000..f0dfdbb1 --- /dev/null +++ b/keyboards/preonic/keymaps/dlaroe/readme.md @@ -0,0 +1,7 @@ +# Dale's Preonic layout + +Really just my Planck layout for the Preonic. + +The hardware number row is mostly to avoid context switching delay inherent in receiving auditory input while trying to type. Frankly I like my Planck Game layer more than I like using the number row. + +I cut most of the plate vertical supports on the left side to use the Rev. 1 Preonic PCB's alternate switch placement to allow the use of 1.25 mods. diff --git a/keyboards/preonic/keymaps/dlaroe/rules.mk b/keyboards/preonic/keymaps/dlaroe/rules.mk new file mode 100644 index 00000000..b3562447 --- /dev/null +++ b/keyboards/preonic/keymaps/dlaroe/rules.mk @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = 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 +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/dudeofawesome/config.h b/keyboards/preonic/keymaps/dudeofawesome/config.h index 566fac3e..48bd13ba 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/config.h +++ b/keyboards/preonic/keymaps/dudeofawesome/config.h @@ -1,27 +1,20 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "config_common.h" +#include "../../config.h" +#include "dudeofawesome.h" #define TAPPING_TOGGLE 2 #ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define WORKMAN_SOUND \ - E__NOTE(_GS7), \ - ED_NOTE(_E7), \ - S__NOTE(_REST), \ - E__NOTE(_A6), \ - S__NOTE(_REST), \ - ED_NOTE(_GS6), - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(WORKMAN_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(WORKMAN_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } #endif #define MUSIC_MASK (keycode != KC_NO) diff --git a/keyboards/preonic/keymaps/dudeofawesome/keymap.c b/keyboards/preonic/keymaps/dudeofawesome/keymap.c index e8faf670..d9d720bd 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/keymap.c +++ b/keyboards/preonic/keymaps/dudeofawesome/keymap.c @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#include "preonic.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H enum preonic_layers { _QWERTY, @@ -53,13 +52,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_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_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, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), \ + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Workman * ,-----------------------------------------------------------------------------------. @@ -74,13 +73,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_WORKMAN] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_WORKMAN] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), \ + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -95,13 +94,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | 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_DEL}, - {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, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_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, RSFT_T(KC_ENT), \ + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -116,13 +115,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Num | 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_DEL}, - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT)}, - {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), \ + TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -137,13 +136,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, - {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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} -}, +[_LOWER] = LAYOUT_preonic_mit( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + 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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -158,13 +157,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT} -}, +[_RAISE] = LAYOUT_preonic_mit( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + 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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -179,13 +178,13 @@ 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL}, - {KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_ADJUST] = LAYOUT_preonic_mit( \ + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), /* Numpad * ,-----------------------------------------------------------------------------------. @@ -200,76 +199,90 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | ✗ | | 0 | 0 | . | Enter| = | * `-----------------------------------------------------------------------------------' */ -[_NUMPAD] = { - {_______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______}, - {_______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______}, - {_______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO}, - {_______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT}, - {_______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL} -} +[_NUMPAD] = LAYOUT_preonic_mit( \ + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______, \ + _______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, \ + _______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, \ + _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, \ + _______, _______, _______, _______, KC_NO, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL \ +) }; 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 WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - PORTE &= ~(1<<6); - } else { - unregister_code(KC_RSFT); - PORTE |= (1<<6); - } - return false; - break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); } - return true; + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + 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; + 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; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + } + return true; +}; + +bool numpadActive = false; + +float tone_numpad_on[][2] = SONG(NUMPAD_ON_SOUND); + +void matrix_scan_user (void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _NUMPAD: + if (!numpadActive) { + numpadActive = true; + PLAY_SONG(tone_numpad_on); + } + break; + default: + if (numpadActive) { + numpadActive = false; + } + } }; diff --git a/keyboards/preonic/keymaps/dudeofawesome/readme.md b/keyboards/preonic/keymaps/dudeofawesome/readme.md index 24444249..a5d89fc8 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/readme.md +++ b/keyboards/preonic/keymaps/dudeofawesome/readme.md @@ -10,7 +10,7 @@ - Dvorak - Colemak - Numpad layer - ![numpad layer](https://i.imgur.com/V5iGHZg.png) + ![numpad layer](https://i.imgur.com/IH8sWmQ.png) - Audio ## Building and flashing diff --git a/keyboards/preonic/keymaps/dudeofawesome/rules.mk b/keyboards/preonic/keymaps/dudeofawesome/rules.mk index e69de29b..4434d3de 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/rules.mk +++ b/keyboards/preonic/keymaps/dudeofawesome/rules.mk @@ -0,0 +1,5 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/keymaps/ekis_isa/config.h b/keyboards/preonic/keymaps/ekis_isa/config.h new file mode 100644 index 00000000..20535125 --- /dev/null +++ b/keyboards/preonic/keymaps/ekis_isa/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/ekis_isa/keymap.c b/keyboards/preonic/keymaps/ekis_isa/keymap.c new file mode 100644 index 00000000..03874e4a --- /dev/null +++ b/keyboards/preonic/keymaps/ekis_isa/keymap.c @@ -0,0 +1,222 @@ +/* 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 QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | `Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_mit( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | `Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_mit( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + 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, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | `ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | 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] = LAYOUT_preonic_mit( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_LCTL, 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, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_mit( \ + 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_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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_mit( \ + 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_PGUP, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_mit( \ + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +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 + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/preonic/keymaps/ekis_isa/readme.md b/keyboards/preonic/keymaps/ekis_isa/readme.md new file mode 100644 index 00000000..e911968d --- /dev/null +++ b/keyboards/preonic/keymaps/ekis_isa/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/ekis_isa/rules.mk b/keyboards/preonic/keymaps/ekis_isa/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 37a7dbd9..0b63abce 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -1,10 +1,5 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "keymap_nordic.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. @@ -46,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC}, - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, - {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, - {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC, \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ + KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ + KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -67,13 +62,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | |Bspc | | |PgDn |PgUp | | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {_______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, - {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, - {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______} -}, +[_LOWER] = LAYOUT_preonic_grid( \ + _______, NO_AT, NO_PND, NO_DLR, _______, _______, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_BSLS, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS), \ + _______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______ \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -88,13 +83,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | |Bspc | | | | PgDn | PgUp | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS}, - {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, - {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, - {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, - {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______} -}, +[_RAISE] = LAYOUT_preonic_grid( \ + LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS, \ + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC, \ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT, \ + _______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS, \ + _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______ \ +), /* Mac Qwerty * ,-----------------------------------------------------------------------------------. @@ -109,13 +104,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_MQWERTY] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC}, - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, - {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, - {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_MQWERTY] = LAYOUT_preonic_grid( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC, \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ + KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ + KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Mac Lower * ,-----------------------------------------------------------------------------------. @@ -130,13 +125,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | |Bspc | | |PgDn |PgUp | | * `-----------------------------------------------------------------------------------' */ -[_MLOWER] = { - {_______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, - {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, - {_______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______} -}, +[_MLOWER] = LAYOUT_preonic_grid( \ + _______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS), \ + _______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______ \ +), /* Mac Raise * ,-----------------------------------------------------------------------------------. @@ -151,13 +146,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | |Bspc | | | | PgDn | PgUp | | * `-----------------------------------------------------------------------------------' */ -[_MRAISE] = { - {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS}, - {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, - {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, - {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, - {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______} -}, +[_MRAISE] = LAYOUT_preonic_grid( \ + LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS, \ + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC, \ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT, \ + _______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS, \ + _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______ \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -172,13 +167,13 @@ 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_RSFT}, - {_______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, \ + _______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c index 69c33472..93fd9916 100644 --- a/keyboards/preonic/keymaps/kinesis/keymap.c +++ b/keyboards/preonic/keymaps/kinesis/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE -#include "audio.h" -#endif +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -41,13 +36,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | FN | ` | Alt | LGUI | Back | ESC |ENTER | SPCE | RGUI | [ | ] | FN | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = { - {EQ_LOCK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MIN_ULK }, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS }, - {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC }, - {MO(_FN), HYP_TIC, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, KC_RGUI, KC_LBRC, KC_RBRC, MO(_FN) } - }, + [_QWERTY] = LAYOUT_preonic_grid( \ + EQ_LOCK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MIN_ULK, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + MO(_FN), HYP_TIC, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, KC_RGUI, KC_LBRC, KC_RBRC, MO(_FN) \ + ), /* Fn * ,-----------------------------------------------------------------------------------. @@ -62,13 +57,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Voice-|Voice+|Mus on|MusOff| | |PLY/PS| | PREV | NEXT | | * `-----------------------------------------------------------------------------------' */ - [_FN] = { - {_______, 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_VOLD, KC_VOLU, KC_MUTE, BL_TOGG, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______ }, - {_______, BL_DEC, BL_INC, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______ }, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_MPLY, _______, KC_MPRV, KC_MNXT, _______ } - } + [_FN] = LAYOUT_preonic_grid( \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, \ + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, \ + _______, KC_VOLD, KC_VOLU, KC_MUTE, BL_TOGG, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, BL_DEC, BL_INC, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_MPLY, _______, KC_MPRV, KC_MNXT, _______ \ + ) }; diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c index 4c2bf1fc..bb7be876 100644 --- a/keyboards/preonic/keymaps/nikchi/keymap.c +++ b/keyboards/preonic/keymaps/nikchi/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -45,13 +40,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |BKSP |SHIFT |ENTER |SPC | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, - {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {LOWER , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RAISE }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + LOWER , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RAISE, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -66,13 +61,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_preonic_grid( + 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_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 * ,-----------------------------------------------------------------------------------. @@ -87,13 +82,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_RAISE] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -108,13 +103,13 @@ 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, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index b27033b1..3c703f47 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -50,13 +45,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {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}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -71,13 +66,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |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}, - {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}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -92,13 +87,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Ctrl | Alt | GUI |Lower |Space |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}, - {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_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT}, - {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, + MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -113,13 +108,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, +[_LOWER] = LAYOUT_preonic_grid( \ + ALL_T(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -134,13 +129,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home |PageDn|PageUp| End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} -}, +[_RAISE] = LAYOUT_preonic_grid( \ + ALL_T(KC_TILD), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS), + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -155,13 +150,13 @@ 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; diff --git a/keyboards/preonic/keymaps/that_canadian/Makefile b/keyboards/preonic/keymaps/that_canadian/Makefile new file mode 100644 index 00000000..507bd77d --- /dev/null +++ b/keyboards/preonic/keymaps/that_canadian/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 = 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 = 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 \ No newline at end of file diff --git a/keyboards/preonic/keymaps/that_canadian/config.h b/keyboards/preonic/keymaps/that_canadian/config.h new file mode 100644 index 00000000..11cafbef --- /dev/null +++ b/keyboards/preonic/keymaps/that_canadian/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c new file mode 100644 index 00000000..968b2ae2 --- /dev/null +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -0,0 +1,240 @@ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 + +#define _LOWER 3 +#define _RAISE 4 + +#define _FUNCTION 15 +#define _ADJUST 16 + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT +}; + +// 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 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Func | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_ESC, 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_LCBR, KC_RCBR, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \ + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 |ALTF4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Taskmg| | | | | | | | | | |caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |RESET | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_ESC, KC_F1, KC_F2, KC_F3, LALT(KC_F4), KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT_preonic_grid( \ + 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_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#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 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_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case 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_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/that_canadian/readme.md b/keyboards/preonic/keymaps/that_canadian/readme.md new file mode 100644 index 00000000..5d62a0a7 --- /dev/null +++ b/keyboards/preonic/keymaps/that_canadian/readme.md @@ -0,0 +1 @@ +# My personal Preonic layout, based on my Planck layout \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c index e905c458..53e378e4 100644 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ b/keyboards/preonic/keymaps/xyverz/keymap.c @@ -1,9 +1,4 @@ -#include "preonic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -44,13 +39,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL }, - {KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ +), /* Colemak * ,-----------------------------------------------------------------------------------. @@ -65,13 +60,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL }, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, +[_COLEMAK] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ +), /* Dvorak * ,-----------------------------------------------------------------------------------. @@ -86,13 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS}, - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, +[_DVORAK] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ +), /* Lower * ,-----------------------------------------------------------------------------------. @@ -107,13 +102,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, +[_LOWER] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ +), /* Raise * ,-----------------------------------------------------------------------------------. @@ -128,13 +123,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS}, - {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, +[_RAISE] = LAYOUT_preonic_grid( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS, \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, \ + BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ +), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -149,13 +144,13 @@ 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c index 6ce37840..2e3add03 100644 --- a/keyboards/preonic/keymaps/zach/keymap.c +++ b/keyboards/preonic/keymaps/zach/keymap.c @@ -1,54 +1,54 @@ // Zach Nielsen Custom Preonic Keyboard layout -#include "preonic.h" +#include QMK_KEYBOARD_H #define PREONIC_YES // This is the Preonic #include "zach_common_functions.c" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_COLEMAK] = { /* Base Layer */ - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT}, - {SHFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, +[_COLEMAK] = LAYOUT_preonic_mit( /* Base Layer */ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, \ + SHFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), -[_SWCOLE] = { /* Software Colemak */ - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______}, - {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______}, - {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, +[_SWCOLE] = LAYOUT_preonic_mit( /* Software Colemak */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______, \ + _______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______, \ + _______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), -[_RAISE] = { /* RAISE - Numpad and Unicode symbols */ - {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______}, - {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR}, - {_______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS}, - {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL} -}, +[_RAISE] = LAYOUT_preonic_mit( /* RAISE - Numpad and Unicode symbols */ + KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______, \ + KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR, \ + _______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS, \ + _______, KC_PIPE, TPUT, _______, _______, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL \ +), -[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */ - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL}, - {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP}, - {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN}, - {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______} -}, +[_LOWER] = LAYOUT_preonic_mit( /* LOWER - Symbols, Paging, CtrAltDel */ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL, \ + KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP, \ + CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN, \ + _______, _______, _______, _______, _______, KC_TAB, _______, _______, _______, _______, _______ \ +), -[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */ - {UNIWIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG}, - {UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, - {XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC}, - {_______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC}, - {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG} -}, +[_ADJUST] = LAYOUT_preonic_mit( /* ADJUST - Macros, Layer Switching, Function Keys */ + UNIWIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG, \ + UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, \ + XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC, \ + _______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC, \ + _______, _______, _______, _______, _______, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG \ +), -[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */ - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, - {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______}, - {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______}, - {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX}, - {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______} -} +[_UNICODES] = LAYOUT_preonic_mit( /* UNICODES - Extra layer for unicode stuff */ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______, \ + KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______, \ + XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX, \ + _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______ \ +) }; diff --git a/keyboards/preonic/preonic.c b/keyboards/preonic/preonic.c index d9c119b8..637a73ab 100644 --- a/keyboards/preonic/preonic.c +++ b/keyboards/preonic/preonic.c @@ -1,6 +1,6 @@ #include "preonic.h" -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h new file mode 100644 index 00000000..0c5355f4 --- /dev/null +++ b/keyboards/rama/m6_a/config.h @@ -0,0 +1,190 @@ +/* +Copyright 2018 Wilba + +This 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 0x5241 // "RW" +#define PRODUCT_ID 0x006A // 6-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA.WORKS +#define PRODUCT RAMA M6-A +#define DESCRIPTION RAMA M6-A Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/rama/m6_a/keymaps/default/config.h b/keyboards/rama/m6_a/keymaps/default/config.h new file mode 100644 index 00000000..d150575c --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Wilba + * + * This 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/rama/m6_a/keymaps/default/keymap.c b/keyboards/rama/m6_a/keymaps/default/keymap.c new file mode 100644 index 00000000..1323ba6f --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/default/keymap.c @@ -0,0 +1,298 @@ +#include "../../m6_a.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP( + TO(1), KC_A, KC_B, KC_C, KC_D, KC_E), + + KEYMAP( + TO(2), KC_F, KC_G, KC_H, KC_I, KC_J), + + KEYMAP( + TO(3), KC_K, KC_L, KC_M, KC_N, KC_O), + + KEYMAP( + TO(4), KC_P, KC_Q, KC_R, KC_S, KC_T), + + KEYMAP( + TO(5), KC_U, KC_V, KC_W, KC_X, KC_Y), + + KEYMAP( + TO(0), KC_Z, KC_1, KC_2, KC_3, KC_4) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + //keyevent_t event = record->event; + + switch (id) { + case 0: + if (record->event.pressed) { + return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); + } + break; + case 1: + if (record->event.pressed) { + return MACRO( T(T), T(G), T(G), T(ENT), END ); + } + break; + case 2: + if (record->event.pressed) { + return MACRO( D(NO), T(L), U(NO), END ); + } + break; + case 3: + if (record->event.pressed) { + return MACRO( D(LCTL), T(Z), U(LCTL), END ); + } + break; + case 4: + if (record->event.pressed) { + return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); + } + break; + case 5: + if (record->event.pressed) { + return MACRO( D(LCTL), T(X), U(LCTL), END ); + } + break; + case 6: + if (record->event.pressed) { + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } + break; + case 7: + if (record->event.pressed) { + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + break; + } + return MACRO_NONE; +} + +// M6-A LEDs are connected to D6, B6, F5, B4, C7, F7 +// This is 1-based because I copied it from Knops code. +void set_switch_led(int ledId, bool state) { + if(state) { + switch(ledId) { + case 1: + PORTD |= (1<<6); + break; + case 2: + PORTB |= (1<<6); + break; + case 3: + PORTF |= (1<<5); + break; + case 4: + PORTB |= (1<<4); + break; + case 5: + PORTC |= (1<<7); + break; + case 6: + PORTF |= (1<<7); + break; + } + } else { + switch(ledId) { + case 1: + PORTD &= ~(1<<6); + break; + case 2: + PORTB &= ~(1<<6); + break; + case 3: + PORTF &= ~(1<<5); + break; + case 4: + PORTB &= ~(1<<4); + break; + case 5: + PORTC &= ~(1<<7); + break; + case 6: + PORTF &= ~(1<<7); + break; + } + } +} + + +void set_layer_led(int layerId) { + // UNUSED +} + +void led_set_layer(int layer); + +void matrix_init_user(void) { + led_init_ports(); + led_set_layer(0); +} + +void matrix_scan_user(void) { +} + +// M6-A LEDs are connected to D6, B6, F5, B4, C7, F7 +void led_init_ports() { + // Switch #1 + DDRD |= (1<<6); + PORTD &= ~(1<<6); + + // Switch #2 + DDRB |= (1<<6); + PORTB &= ~(1<<6); + + // Switch #3 + DDRF |= (1<<5); + PORTF &= ~(1<<5); + + // Switch #4 + DDRB |= (1<<4); + PORTB &= ~(1<<4); + + // Switch #5 + DDRC |= (1<<7); + PORTC &= ~(1<<7); + + // Switch #6 + DDRF |= (1<<7); + PORTF &= ~(1<<7); +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} + +void led_set_layer(int layer) { + switch(layer) { + case 0: + set_switch_led(1, true); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 1: + set_switch_led(1, false); + set_switch_led(2, true); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 2: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, true); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 3: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, true); + set_switch_led(5, false); + set_switch_led(6, false); + break; + case 4: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, true); + set_switch_led(6, false); + break; + case 5: + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, true); + break; + default: + set_switch_led(1, true); + set_switch_led(2, true); + set_switch_led(3, true); + set_switch_led(4, true); + set_switch_led(5, true); + set_switch_led(6, true); + break; + } +} + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch ( keycode ) + { + case TO( 0 ): + if ( record->event.pressed ) + { + led_set_layer( 0 ); + } + break; + case TO( 1 ): + if ( record->event.pressed ) + { + led_set_layer( 1 ); + } + break; + case TO( 2 ): + if ( record->event.pressed ) + { + led_set_layer( 2 ); + } + break; + case TO( 3 ): + if ( record->event.pressed ) + { + led_set_layer( 3 ); + } + break; + case TO( 4 ): + if ( record->event.pressed ) + { + led_set_layer( 4 ); + } + break; + case TO( 5 ): + if ( record->event.pressed ) + { + led_set_layer( 5 ); + } + break; + } + return true; +} diff --git a/keyboards/rama/m6_a/keymaps/default/readme.md b/keyboards/rama/m6_a/keymaps/default/readme.md new file mode 100644 index 00000000..cfb90f65 --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/default/readme.md @@ -0,0 +1,12 @@ +![RAMA M6-A Layout Image](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/5ab7287f6d2a738f9a719568/5ab7288c1ae6cfa0dae88a59/1521952909569/m6-layout.jpg) + +# Default RAMA M6-A Layout + +This is an example layout to demonstrate layer toggling. + +The top left key will cycle through six layers. + +If LEDs are installed, one of the six LEDs will be on to indicate current layer. + +LEDs should be installed cathode pin on the square pad. + diff --git a/keyboards/rama/m6_a/keymaps/knops/config.h b/keyboards/rama/m6_a/keymaps/knops/config.h new file mode 100644 index 00000000..999d8876 --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/knops/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Pawnerd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/rama/m6_a/keymaps/knops/keymap.c b/keyboards/rama/m6_a/keymaps/knops/keymap.c new file mode 100644 index 00000000..912147f4 --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/knops/keymap.c @@ -0,0 +1,120 @@ +#include "../../m6_a.h" + +/*KNOPS_MISC*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /*KNOPS_KEYMAP*/ + +}; + +void set_led_state(int ledId, bool state) { + if(state) { + switch(ledId) { + case 0: + PORTD |= (1<<6); + break; + case 1: + PORTB |= (1<<6); + break; + case 2: + PORTF |= (1<<5); + break; + case 3: + PORTB |= (1<<4); + break; + case 4: + PORTC |= (1<<7); + break; + case 5: + PORTF |= (1<<7); + break; + } + } else { + switch(ledId) { + case 0: + PORTD &= ~(1<<6); + break; + case 1: + PORTB &= ~(1<<6); + break; + case 2: + PORTF &= ~(1<<5); + break; + case 3: + PORTB &= ~(1<<4); + break; + case 4: + PORTC &= ~(1<<7); + break; + case 5: + PORTF &= ~(1<<7); + break; + } + } +} + +void led_init_ports() { + // Switch #1 + DDRD |= (1<<6); + PORTD &= ~(1<<6); + + // Switch #2 + DDRB |= (1<<6); + PORTB &= ~(1<<6); + + // Switch #3 + DDRF |= (1<<5); + PORTF &= ~(1<<5); + + // Switch #4 + DDRB |= (1<<4); + PORTB &= ~(1<<4); + + // Switch #5 + DDRC |= (1<<7); + PORTC &= ~(1<<7); + + // Switch #6 + DDRF |= (1<<7); + PORTF &= ~(1<<7); +} + +void led_set_layer(int layer) { + + /*KNOPS_SIMPLELED_STATES*/ + +} + +void matrix_init_user(void) { + led_init_ports(); + + led_set_layer(0); + + /*KNOPS_INIT*/ +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + //keyevent_t event = record->event; + + /*KNOPS_MACRO*/ + return NULL; +} + +void matrix_scan_user(void) { + /*KNOPS_SCAN*/ +} + +void led_set_user(uint8_t usb_led) { + + /*KNOPS_FUNCTIONALLED_STATES*/ + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + /*KNOPS_PROCESS_STATE*/ + return NULL; +} + + diff --git a/keyboards/rama/m6_a/keymaps/knops/readme.md b/keyboards/rama/m6_a/keymaps/knops/readme.md new file mode 100644 index 00000000..58696974 --- /dev/null +++ b/keyboards/rama/m6_a/keymaps/knops/readme.md @@ -0,0 +1,11 @@ +# Default Knops Mini Layout + +![Knops logo](http://knops.io/img/Knops_logo.jpg) + +![Knops Mini Layout Image](https://i.imgur.com/WQBQctm.png) + +This is the keymap that our configurator uses to compile new keymaps and features. Here is a screenshot: + +![Knops Mini Layout Image](https://i.imgur.com/afH1NOt.png) + +As of 12th of february 2018, this tool has not yet been released to the public. You may have a look at our older tool, KBFlasher: [our (almost outdated) configurator tool](http://knops.io/configurator.html) for this. \ No newline at end of file diff --git a/keyboards/rama/m6_a/m6_a.c b/keyboards/rama/m6_a/m6_a.c new file mode 100644 index 00000000..1c84ea2b --- /dev/null +++ b/keyboards/rama/m6_a/m6_a.c @@ -0,0 +1,44 @@ +/* Copyright 2018 Wilba + * + * This 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 "m6_a.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/rama/m6_a/m6_a.h b/keyboards/rama/m6_a/m6_a.h new file mode 100644 index 00000000..6809c2cc --- /dev/null +++ b/keyboards/rama/m6_a/m6_a.h @@ -0,0 +1,29 @@ +/* Copyright 2018 Wilba + * + * This 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 "quantum.h" + +#ifndef RAMA_M6_A_H +#define RAMA_M6_A_H + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ +} +#endif // RAMA_M6_A diff --git a/keyboards/rama/m6_a/readme.md b/keyboards/rama/m6_a/readme.md new file mode 100644 index 00000000..5dd2b92e --- /dev/null +++ b/keyboards/rama/m6_a/readme.md @@ -0,0 +1,15 @@ +# RAMA M6-A + +![RAMA M6-A](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/59fc7b1053450adf5bf9a852/1515932239307/RAMA-RAMA-M6-DSA-XO-CAPS.73-3_1.jpg?format=1500w) + +A 6-key companion keyboard. [More info at RAMA WORKS](https://rama.works/m6a) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA M6-A PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make rama/m6_a: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/rama/m6_a/rules.mk b/keyboards/rama/m6_a/rules.mk new file mode 100644 index 00000000..ca2a2a5f --- /dev/null +++ b/keyboards/rama/m6_a/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches diff --git a/keyboards/rama/readme.md b/keyboards/rama/readme.md new file mode 100644 index 00000000..4625eb1e --- /dev/null +++ b/keyboards/rama/readme.md @@ -0,0 +1,9 @@ +# RAMA + +Firmware for keyboards designed by [RAMA WORKS](https://rama.works) + +[RAMA M6-A](https://rama.works/m6a) + +[RAMA M60-A](https://rama.works/#/m60-a/) + +[RAMA M10-B](https://www.massdrop.com/buy/rama-m10-a?mode=guest_open) diff --git a/keyboards/s60_x/keymaps/amnesia0287/keymap.c b/keyboards/s60_x/keymaps/amnesia0287/keymap.c index f9ca3f15..42f82e1d 100644 --- a/keyboards/s60_x/keymaps/amnesia0287/keymap.c +++ b/keyboards/s60_x/keymaps/amnesia0287/keymap.c @@ -1,4 +1,4 @@ -#include "rgb.h" +#include "s60_x.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. diff --git a/keyboards/sweet16/info.json b/keyboards/sweet16/info.json new file mode 100644 index 00000000..b43197c8 --- /dev/null +++ b/keyboards/sweet16/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Sweet 16", + "manufacturer": "1UP Keyboards", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}] + }, + + "LAYOUT_numpad_4x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/sweet16/keymaps/dlaroe/keymap.c b/keyboards/sweet16/keymaps/dlaroe/keymap.c new file mode 100644 index 00000000..b42c34ed --- /dev/null +++ b/keyboards/sweet16/keymaps/dlaroe/keymap.c @@ -0,0 +1,38 @@ +#include "sweet16.h" + +enum layers { + num, + extra, + mouse +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [num] = LAYOUT_numpad_4x4( + KC_P7, KC_P8, KC_P9, LT(extra, KC_PPLS), + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, KC_PENT, + LT(mouse, KC_P0), KC_DOT + ), + + [extra] = LAYOUT_numpad_4x4( + KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, + KC_BSPC, KC_EXECUTE, KC_DEL, + KC_LPRN, KC_RPRN, KC_PEQL, KC_PENT, + KC_TAB, KC_NLCK + ), + + +[mouse] = LAYOUT_numpad_4x4( + KC_WH_D, KC_MS_U, KC_WH_U, LT(extra, KC_PPLS), + KC_MS_L, KC_MS_D, KC_MS_R, + KC_BTN1, KC_BTN2, KC_BTN3, KC_PENT, + KC_TRNS, KC_DOT + ) + + + + +}; + diff --git a/keyboards/sweet16/keymaps/dlaroe/readme.md b/keyboards/sweet16/keymaps/dlaroe/readme.md new file mode 100644 index 00000000..aabcf82c --- /dev/null +++ b/keyboards/sweet16/keymaps/dlaroe/readme.md @@ -0,0 +1,3 @@ +# Dale's keymap for the Sweet16 + +I wanted to reuse a standard numpad keyset and have the full functionality of an larger numpad with a nod to Excel functionality. diff --git a/keyboards/sweet16/sweet16.h b/keyboards/sweet16/sweet16.h index 23d411a8..879f51fa 100644 --- a/keyboards/sweet16/sweet16.h +++ b/keyboards/sweet16/sweet16.h @@ -3,6 +3,8 @@ #include "quantum.h" +// Any changes to the layout names and/or definitions must also be made to info.json + #define LAYOUT_ortho_4x4( \ K00, K01, K02, K03, \ K10, K11, K12, K13, \ @@ -22,9 +24,9 @@ K31, K32 \ ) { \ { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ + { K10, K11, K12, KC_NO }, \ { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 } \ + { KC_NO, K31, K32, KC_NO } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tada68/info.json b/keyboards/tada68/info.json new file mode 100644 index 00000000..ec222ec2 --- /dev/null +++ b/keyboards/tada68/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Tada68", + "manufacturer": "", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 16, + "height": 5, + "layouts": { + "KEYMAP_ANSI": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/tada68/keymaps/iso-uk/config.h b/keyboards/tada68/keymaps/iso-uk/config.h new file mode 100644 index 00000000..1e1005ae --- /dev/null +++ b/keyboards/tada68/keymaps/iso-uk/config.h @@ -0,0 +1,4 @@ +#include "../../config.h" + +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 \ No newline at end of file diff --git a/keyboards/tada68/keymaps/iso-uk/keymap.c b/keyboards/tada68/keymaps/iso-uk/keymap.c new file mode 100644 index 00000000..185e2938 --- /dev/null +++ b/keyboards/tada68/keymaps/iso-uk/keymap.c @@ -0,0 +1,49 @@ +#include "tada68.h" + +#define _BL 0 +#define _FL 1 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del | + * |------------------------------------------------------- -----| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgUp| + * |----------------------------------------------------------------| + * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_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_GRV, \ + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NUHS,KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,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_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL1: Function Layer 1 + * ,----------------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete| Ins| + + * |----------------------------------------------------------------| + * | | | ↑ | | | | | | | | | | | |Home| + * |------------------------------------------------------- -----| + * | | ← | ↓ | → | | | | | | | | | | | End| + * |----------------------------------------------------------------| + * | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|Up|MsBn| + * |----------------------------------------------------------------| + * | | | | | | | | Lt| Dn| Rt | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ISO( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, \ + _______,_______, KC_UP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_HOME, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_END, \ + _______,_______,_______, _______, BL_DEC,BL_TOGG, BL_INC,_______,KC_VOLU,KC_VOLD,KC_MUTE,_______,KC_BTN1, KC_MS_U,KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L, KC_MS_D,KC_MS_R), +}; diff --git a/keyboards/tada68/keymaps/iso-uk/readme.md b/keyboards/tada68/keymaps/iso-uk/readme.md new file mode 100644 index 00000000..03e67691 --- /dev/null +++ b/keyboards/tada68/keymaps/iso-uk/readme.md @@ -0,0 +1,19 @@ +# TADA68 layout for ISO UK + +This layout has been tested on a TADA68 purchased from kbdfans in March 2018. The physical key layout includes the "double height" iso Enter key and the "short" Left Shift along side the iso Backslash key. [See this keyboard-layout-editor.com Gist](http://www.keyboard-layout-editor.com/#/gists/acf0f32f7ea0d0ed35c901663ca47919) + +The Base Layer and Function layer defined here match the layout defined by the kbdfans keyboard layout tool found at http://123.57.250.164:3000/tada68 + +## Special mention for the ISO Hash key + +When viewing tada68.h in this directory, KEYMAP_ISO does not define a key at location *k2c* (it's missing) even though this is where the ISO Hash key (KC_NUHS) physically appears on your keyboard. For some reason we have to map the KC_NUHS to key location *k1d* which is above the Enter key. + +In an attempt to clarify this anomaly, the ascii image comments in keymap.c depicts the physical layout, but the definition in *[_BL] = KEYMAP_ISO* depicts the layout that the firmware operates on. + +## Installation + +Please see the [tada68 readme](../../readme.md) using the following command + +``` +make tada68:iso-uk:bin +``` \ No newline at end of file diff --git a/keyboards/tada68/keymaps/iso-uk/rules.mk b/keyboards/tada68/keymaps/iso-uk/rules.mk new file mode 100644 index 00000000..4deca710 --- /dev/null +++ b/keyboards/tada68/keymaps/iso-uk/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/iso-uk/tada68.h b/keyboards/tada68/keymaps/iso-uk/tada68.h new file mode 100644 index 00000000..07bdc77e --- /dev/null +++ b/keyboards/tada68/keymaps/iso-uk/tada68.h @@ -0,0 +1,74 @@ +#ifndef TADA68_H +#define TADA68_H + +#include "quantum.h" + +// readability +#define XXX KC_NO + +/* TADA68 ANSI layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e | + * |----------------------------------------------------------------| + * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define KEYMAP_ANSI( \ + 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, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k45, 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, XXX, k2d, k2e}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} + +/* TADA68 ISO layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e | + * |----------------------------------------------------------------| + * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define KEYMAP_ISO( \ + 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, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k45, 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, XXX, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); + +#endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/mlechner/keymap.c b/keyboards/tada68/keymaps/mlechner/keymap.c new file mode 100755 index 00000000..79d82b63 --- /dev/null +++ b/keyboards/tada68/keymaps/mlechner/keymap.c @@ -0,0 +1,95 @@ +#include "tada68.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 + +#define _______ KC_TRNS + +enum custom_keycodes { + MAC_AE = SAFE_RANGE, + MAC_OE, + MAC_SS, + MAC_UE, + MAC_SHFT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |FN | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |Win | Space |Win|Alt |Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_ANSI( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS,KC_DEL, \ + MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_CAPS, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * | | | | | | | | Ü | | Ö | | | | |Hme | + * |----------------------------------------------------------------| + * | | Ä | ß | | | | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + _______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS , \ + _______,_______,_______,_______,_______, _______,_______,MAC_UE,_______,MAC_OE,_______,_______,_______, _______,KC_HOME, \ + _______,MAC_AE , MAC_SS,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_END, \ + _______ ,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case MAC_UE: + if(keyboard_report->mods & MOD_BIT(KC_LSFT)) { + clear_keyboard(); + SEND_STRING(SS_LALT("u") SS_LSFT("u")); + } else { + SEND_STRING(SS_LALT("u")"u"); + } + return false; + case MAC_AE: + if(keyboard_report->mods & MOD_BIT(KC_LSFT)) { + clear_keyboard(); + SEND_STRING(SS_LALT("u") SS_LSFT("a")); + } else { + SEND_STRING(SS_LALT("u")"a"); + } + return false; + case MAC_OE: + if(keyboard_report->mods & MOD_BIT(KC_LSFT)) { + clear_keyboard(); + SEND_STRING(SS_LALT("u") SS_LSFT("o")); + } else { + SEND_STRING(SS_LALT("u")"o"); + } + return false; + case MAC_SS: + SEND_STRING(SS_LALT("s")); + return false; + } + } + return true; +}; diff --git a/keyboards/tada68/keymaps/mlechner/readme.md b/keyboards/tada68/keymaps/mlechner/readme.md new file mode 100755 index 00000000..c35a19bb --- /dev/null +++ b/keyboards/tada68/keymaps/mlechner/readme.md @@ -0,0 +1,3 @@ +# mlechner's TADA68 layout + +The layout is Mac style with Caps Lock remapped to FN and German Umlaute on the function layer. diff --git a/keyboards/tada68/keymaps/mlechner/rules.mk b/keyboards/tada68/keymaps/mlechner/rules.mk new file mode 100644 index 00000000..2a7ff277 --- /dev/null +++ b/keyboards/tada68/keymaps/mlechner/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tv44/info.json b/keyboards/tv44/info.json new file mode 100644 index 00000000..9065f2c2 --- /dev/null +++ b/keyboards/tv44/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "tv44", + "manufacturer": "The Van Keyboards", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 12.75, + "height": 4, + "layouts": { + "KEYMAP": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":2.75, "y":3, "w":1.25}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"label":"Alt", "x":8.25, "y":3, "w":1.25}, {"label":"Win", "x":9.5, "y":3, "w":1.5}, {"label":"Menu", "x":11, "y":3, "w":1.75}] + }, + + "KEYMAP_ARROW": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":2.75, "y":3, "w":1.25}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3}, {"label":"Win", "x":10.75, "y":3}, {"label":"Menu", "x":11.75, "y":3}] + }, + + "KEYMAP_COMMAND": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Win", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3, "w":1.5}, {"label":"Win", "x":11.25, "y":3, "w":1.5}] + }, + + "KEYMAP_ARROW_COMMAND": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"|", "x":11, "y":0, "w":1.75}, {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.5}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"x":11.75, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Win", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2.25}, {"x":6.25, "y":3, "w":2}, {"x":8.25, "y":3, "w":1.5}, {"label":"Alt", "x":9.75, "y":3}, {"label":"Win", "x":10.75, "y":3}, {"label":"Menu", "x":11.75, "y":3}] + } + } +} diff --git a/keyboards/tv44/keymaps/budi/config.h b/keyboards/tv44/keymaps/budi/config.h index e6f23c93..67bcf354 100644 --- a/keyboards/tv44/keymaps/budi/config.h +++ b/keyboards/tv44/keymaps/budi/config.h @@ -4,6 +4,9 @@ #include "../../config.h" // place overrides here +#ifdef DEBOUNCING_DELAY +#undef DEBOUNCING_DELAY +#endif #define DEBOUNCING_DELAY 2 #define MOUSEKEY_INTERVAL 10 #define MOUSEKEY_DELAY 0 diff --git a/keyboards/uk78/keymaps/rask/README.md b/keyboards/uk78/keymaps/rask/README.md index 1fabd4d4..c9740c9f 100644 --- a/keyboards/uk78/keymaps/rask/README.md +++ b/keyboards/uk78/keymaps/rask/README.md @@ -2,6 +2,11 @@ ![UK78 Layout](https://i.imgur.com/46trAbD.png) +### Update 2018-03-10 + +Added `RGB_MOD` key on layer two to the `F` key location, allows +shuffling between underglow animation modes. + ## Flashing Plug the keyboard in and press the reset button, then in the main diff --git a/keyboards/uk78/keymaps/rask/keymap.c b/keyboards/uk78/keymaps/rask/keymap.c index 7482c194..f29a0923 100644 --- a/keyboards/uk78/keymaps/rask/keymap.c +++ b/keyboards/uk78/keymaps/rask/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------------------------------------------------------------------------------| * | | | | |RST| | | | |Prv|Ply|Nxt| | | | | | | * |-------------------------------------------------------------------------------| - * |Caps | | | |Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | | + * |Caps | | |uln|Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | | * |-------------------------------------------------------------------------------| * | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+|Stp| | | | | | | | * |-------------------------------------------------------------------------------| @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, 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, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, KC_APP, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), diff --git a/keyboards/unloved_bastard/config.h b/keyboards/unloved_bastard/config.h new file mode 100644 index 00000000..d89e8586 --- /dev/null +++ b/keyboards/unloved_bastard/config.h @@ -0,0 +1,168 @@ +/* +Copyright 2018 Alexander Fougner + +This 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 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER BathroomEpiphanies +#define PRODUCT Unloved Bastard +#define DESCRIPTION Unloved Bastard controller for CM Masterkeys S + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 18 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/unloved_bastard/keymaps/default/config.h b/keyboards/unloved_bastard/keymaps/default/config.h new file mode 100644 index 00000000..c55f7f9f --- /dev/null +++ b/keyboards/unloved_bastard/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Alexander Fougner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/unloved_bastard/keymaps/default/keymap.c b/keyboards/unloved_bastard/keymaps/default/keymap.c new file mode 100644 index 00000000..f4dedc79 --- /dev/null +++ b/keyboards/unloved_bastard/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2018 Alexander Fougner + * + * This 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 "unloved_bastard.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/unloved_bastard/keymaps/default/readme.md b/keyboards/unloved_bastard/keymaps/default/readme.md new file mode 100644 index 00000000..a2b5f119 --- /dev/null +++ b/keyboards/unloved_bastard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for unloved_bastard diff --git a/keyboards/unloved_bastard/matrix.c b/keyboards/unloved_bastard/matrix.c new file mode 100644 index 00000000..65773879 --- /dev/null +++ b/keyboards/unloved_bastard/matrix.c @@ -0,0 +1,138 @@ +/* + Copyright 2017 Gabriel Young + Copyright 2018 Alexander Fougner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif +static uint8_t debouncing = DEBOUNCING_DELAY; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t scan_col(void) { + return ( + (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) | + (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<1)) | + (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<2)) | + (PINB&(1<<0) ? 0 : ((matrix_row_t)1<<3)) | + (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<4)) | + (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<5)) | + (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<6)) | + (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<7)) + ); +} + +static void select_col(uint8_t col) { + switch (col) { + case 0: PORTD = (PORTD & ~0b00111111) | 0b00110011; break; + case 1: PORTD = (PORTD & ~0b00111111) | 0b00100011; break; + case 2: PORTD = (PORTD & ~0b00111111) | 0b00010111; break; + case 3: PORTD = (PORTD & ~0b00111111) | 0b00110011; break; + case 4: PORTD = (PORTD & ~0b00111111) | 0b00010011; break; + case 5: PORTD = (PORTD & ~0b00111111) | 0b00011011; break; + case 6: PORTD = (PORTD & ~0b00111111) | 0b00110100; break; + case 7: PORTD = (PORTD & ~0b00111111) | 0b00111010; break; + case 8: PORTD = (PORTD & ~0b00111111) | 0b00111000; break; + case 9: PORTD = (PORTD & ~0b00111111) | 0b00111100; break; + case 10: PORTD = (PORTD & ~0b00111111) | 0b00110010; break; + case 11: PORTD = (PORTD & ~0b00111111) | 0b00011111; break; + case 12: PORTD = (PORTD & ~0b00111111) | 0b00001111; break; + case 13: PORTD = (PORTD & ~0b00111111) | 0b00100111; break; + case 14: PORTD = (PORTD & ~0b00111111) | 0b00000111; break; + case 15: PORTD = (PORTD & ~0b00111111) | 0b00110110; break; + case 16: PORTD = (PORTD & ~0b00111111) | 0b00001011; break; + case 17: PORTD = (PORTD & ~0b00111111) | 0b00000011; break; + } +} + +void matrix_init(void) { + /* Row output pins */ + DDRD |= 0b00111111; + /* Column input pins */ + DDRC &= ~0b10000000; + DDRB &= ~0b01111111; + PORTC |= 0b10000000; + PORTB |= 0b01111111; + + for (uint8_t i=0; i < MATRIX_ROWS; i++) + matrix[i] = matrix_debouncing[i] = 0; + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + _delay_us(3); + matrix_row_t col_scan = scan_col(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)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 . + */ +#include "unloved_bastard.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + led_init_ports(); + 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); +} + +// C5 left +// C6 middle led +// B7 right led +void led_init_ports(void) { + DDRB |= (1<<7); + DDRC |= (1<<5); + DDRC |= (1<<6); + + PORTB |= (1<<7); + PORTC |= (1<<5); + PORTC |= (1<<6); +} + + +void led_set_kb(uint8_t usb_led) { + + if (usb_led & (1<. + */ +#ifndef UNLOVED_BASTARD_H +#define UNLOVED_BASTARD_H + +#include "quantum.h" + +#define KEYMAP( \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) \ +{ \ +/* Columns and rows need to be swapped in the below definition */ \ +/* A B C D E F G H I J K L M N O P Q R */ \ +/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ +/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ +/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ +/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ +/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ +/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ +/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ +/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ +} + +#endif diff --git a/keyboards/v60_type_r/info.json b/keyboards/v60_type_r/info.json index e73cb02f..cd88d6ae 100644 --- a/keyboards/v60_type_r/info.json +++ b/keyboards/v60_type_r/info.json @@ -1,13 +1,20 @@ { - "keyboard_name": "V60 Type R", - "manufacturer": "KBParadise", - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "width": 15, - "height": 5, - "layouts": { - "KEYMAP": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":14, "y":0, "w":2}, {"x":0.5, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":14, "y":1, "w":1.5}, {"x":0.75, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":14, "y":2, "w":2.25}, {"x":1.25, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":14, "y":3, "w":2.75}, {"x":0.25, "y":4, "w":1.25}, {"x":1.5, "y":4, "w":1.25}, {"x":2.75, "y":4, "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "w":1.25}, {"x":11.5, "y":4, "w":1.25}, {"x":12.75, "y":4, "w":1.25}, {"x":14, "y":4, "w":1.25}] + "keyboard_name": "V60 Type R", + "manufacturer": "KBParadise", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } - } + } } diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index e277254b..254b3aa2 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -/* This is the default layout provided by the KBP V60 Type R +/* This is the default ANSI layout provided by the KBP V60 Type R * as depicted in their manual and on the stock keycaps. */ #include "v60_type_r.h" @@ -34,11 +34,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Fn0 |Gui |App|Ctrl| * `-----------------------------------------------------------' */ - [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_NO, KC_BSPC, \ + [0] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_APP, KC_RCTL), /* Keymap 1: FN Layer @@ -54,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [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_NO, KC_DEL, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_INS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_NO, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS), + [1] = LAYOUT_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_INS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 1dd9f7ea..3deaae98 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space/L3 |Gui |Alt |Ctrl|Fn1| * `-----------------------------------------------------------' */ - [0] = KEYMAP( + [0] = KEYMAP_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXX, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ LT(1, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [1] = KEYMAP( + [1] = KEYMAP_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _____, KC_DEL, \ _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, \ _____, _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_PGUP, _____, \ @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [2] = KEYMAP( + [2] = KEYMAP_ALL( _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, \ _____, _____, _____, _____, _____, _____, _____, KC_MS_WH_UP, KC_MS_WH_DOWN, _____, _____, _____, _____, _____, \ _____, _____, _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, _____, _____, _____, \ @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | * `-----------------------------------------------------------' */ - [3] = KEYMAP( + [3] = KEYMAP_ALL( _____, BL_TOGG, BL_STEP, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, _____, _____, _____, _____, _____, _____, _____, _____, \ _____, RGB_RI, RGB_GI, RGB_BI, RGB_HUI, RGB_SAI, RGB_VAI, _____, _____, _____, _____, _____, _____, _____, \ _____, RGB_RD, RGB_GD, RGB_BD, RGB_HUD, RGB_SAD, RGB_VAD, _____, _____, _____, _____, _____, _____, \ diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index 180294d7..37d0a573 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -39,7 +39,7 @@ enum my_keycodes { // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -/* Default layout +/* LAYOUT_all * ,-----------------------------------------------------------------------------------------. * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K0E | * |-----------------------------------------------------------------------------------------+ @@ -53,7 +53,9 @@ enum my_keycodes { * `-----------------------------------------------------------------------------------------' */ -#define KEYMAP( \ +// KBP V60 Type R with ALL possible layouts + +#define KEYMAP_ALL( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ @@ -70,4 +72,41 @@ enum my_keycodes { { k40, k41, k42, k43, k44, k45, k46, k47 } \ } + +/* LAYOUT_ansi + * ,-----------------------------------------------------------------------------------------. + * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0E | + * |-----------------------------------------------------------------------------------------+ + * | K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | + * |-----------------------------------------------------------------------------------------+ + * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B | K2C | + * |-----------------------------------------------------------------------------------------+ + * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | + * |-----------------------------------------------------------------------------------------+ + * | K40 | K41 | K42 | K43 | K44 | K45 | K46 | K47 | + * `-----------------------------------------------------------------------------------------' + */ + + // KBP V60 Type R with ANSI layout + + #define KEYMAP_ANSI( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ + ) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k08, k09, k0a, k0b, k0c, KC_NO, k0e, k10 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k19, k1a, k1b, k1c, k1d, k20, k21, k22 }, \ + { k23, k24, k25, k26, k27, k28, k29, k2a }, \ + { k2b, k2c, k30, KC_NO, k32, k33, k34, k35 }, \ + { k36, k37, k38, k39, k3a, k3b, k3c, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 } \ + } + +#define LAYOUT_all KEYMAP_ALL +#define LAYOUT_ansi KEYMAP_ANSI + #endif diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/viterbi/keymaps/drashna/config.h index 8fabe72f..cc87e813 100644 --- a/keyboards/viterbi/keymaps/drashna/config.h +++ b/keyboards/viterbi/keymaps/drashna/config.h @@ -33,28 +33,19 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 - #endif // RGBLIGHT_ENABLE -#define TAPPING_TOGGLE 1 - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define STARTUP_SONG SONG(IMPERIAL_MARCH) -#define GOODBYE_SONG SONG(SONIC_RING) -#endif #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE #ifndef NO_DEBUG #define NO_DEBUG -#endif // NO_DEBUG - -/* disable print */ +#endif // !NO_DEBUG #ifndef NO_PRINT #define NO_PRINT -#endif // NO_PRINT +#endif // !NO_PRINT + /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING @@ -66,8 +57,13 @@ along with this program. If not, see . #define PRODUCT Drashnas Viterbi Macro Pad #define USE_I2C + +#ifdef AUDIO_ENABLE +#define C6_AUDIO #define NO_MUSIC_MODE -#define half_KEYMAP( \ +#endif + +#define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ L20, L21, L22, L23, L24, L25, L26, \ @@ -81,4 +77,5 @@ along with this program. If not, see . L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ ) + #endif diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index 58569524..b5a7c18f 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -26,52 +26,52 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_NUMLOCK] = half_KEYMAP( - LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, \ - MEDIA, KC_CALC, COVECUBE,KC_P7, KC_P8, KC_P9, KC_PAST, \ - KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, \ - KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, \ - KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT \ + [_NUMLOCK] = LAYOUT_ortho_5x7( + LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, + MEDIA, KC_CALC, COVECUBE,KC_P7, KC_P8, KC_P9, KC_PAST, + KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_COLN, KC_PENT ), - [_DIABLO] = half_KEYMAP( - KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, \ - KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, \ - KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, \ - KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR, \ - KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE) \ + [_DIABLO] = LAYOUT_ortho_5x7( + KC_ESC, DIABLO, KC_V, KC_D, XXXXXXX, XXXXXXX, KC_L, + KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_J, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_F, + KC_LCTL, KC_D3_3, KC_D3_3, KC_D3_3, KC_D3_3, KC_Z, KC_DIABLO_CLEAR, + KC_LALT, KC_F4, KC_F5, KC_F8, KC_F9, KC_F10, SFT_T(KC_SPACE) ), - [_GAMEPAD] = half_KEYMAP( // Game pad layout designed primarily for Overwatch - LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, \ - MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ - KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, \ - KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ - KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V \ + [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch + LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, + MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V ), - [_MACROS] = half_KEYMAP( - LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, XXXXXXX \ + [_MACROS] = LAYOUT_ortho_5x7( + LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT ), - [_COVECUBE] = half_KEYMAP( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, COVECUBE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + [_COVECUBE] = LAYOUT_ortho_5x7( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, COVECUBE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - [_MEDIA] = half_KEYMAP( - KC_MAKE, KC_RESET,MU_TOG, AUD_ON, AUD_OFF, KC_FXCL, RGB_SAD, \ - MEDIA, XXXXXXX, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, \ - RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, \ - KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, \ - KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI \ + [_MEDIA] = LAYOUT_ortho_5x7( + KC_MAKE, KC_RESET,MU_TOG, AUD_ON, AUD_OFF, KC_FXCL, RGB_SAD, + MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, + RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD, + KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI, + KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI ) diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/viterbi/keymaps/drashna/rules.mk index 83c37115..4dc6bbda 100644 --- a/keyboards/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/viterbi/keymaps/drashna/rules.mk @@ -9,3 +9,4 @@ AUDIO_ENABLE = yes NKRO_ENABLE = yes CUSTOM_MATRIX = no +LAYOUTS = ortho_5x7 diff --git a/keyboards/whitefox/info.json b/keyboards/whitefox/info.json new file mode 100644 index 00000000..f8cbbfb2 --- /dev/null +++ b/keyboards/whitefox/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Whitefox", + "manufacturer": "Input Club", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "", + "bootloader": "", + "width": 16, + "height": 5, + "layouts": { + "KEYMAP": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "KEYMAP_TRUEFOX": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json new file mode 100644 index 00000000..fa8bce47 --- /dev/null +++ b/keyboards/xd60/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "XD60", + "manufacturer": "", + "identifier": "", + "url": "", + "maintainer": "qmk", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ALL": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/xd60/keymaps/Jos/keymap.c b/keyboards/xd60/keymaps/Jos/keymap.c index 1c530ed9..5c5f9362 100644 --- a/keyboards/xd60/keymaps/Jos/keymap.c +++ b/keyboards/xd60/keymaps/Jos/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, TD(0), KC_LALT, KC_SPC , KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function 1 Layers - KEYMAP( + LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \ KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS, \ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), // 2: GUI/Function 2 Layer - KEYMAP( + LAYOUT_ALL( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \ KC_TRNS, KC_TRNS, AC_G_W, AC_G_E, KC_TRNS, AC_G_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, AC_G_S, AC_G_D, KC_TRNS, KC_TRNS, AC_G_H, KC_TRNS, KC_TRNS, AC_G_L, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, AC_G_SPC, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), // 3: NumPad/Function 3 Toggle Layer - KEYMAP( + LAYOUT_ALL( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PSLS, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_NO, KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_4, KC_5, KC_6, KC_PAST, KC_NO, KC_NO, KC_NO, \ KC_TRNS, KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_1, KC_2, KC_3, KC_PMNS, KC_PENT, KC_NO, KC_TRNS, \ @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_PENT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS) , // TRaNSparent layer for reference -/* KEYMAP( +/* LAYOUT_ALL( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ diff --git a/keyboards/xd60/keymaps/birkir/keymap.c b/keyboards/xd60/keymaps/birkir/keymap.c new file mode 100644 index 00000000..1f3b04e5 --- /dev/null +++ b/keyboards/xd60/keymaps/birkir/keymap.c @@ -0,0 +1,90 @@ +#include "xd60.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_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT, KC_UP, TG(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + // 1: Function Layer + KEYMAP( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, BL_DEC, BL_INC, KC_F13, KC_F14, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END + ), + + // 2: Cool Layer + KEYMAP( + RESET, BL_DEC, BL_INC, BL_ON, BL_OFF, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_MODE_PLAIN, KC_TRNS, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ + 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 +}; + +bool edit = false; +uint32_t mode; +uint16_t hue; +uint8_t sat; +uint8_t val; + +uint32_t layer_state_set_user(uint32_t state) { + + if (state == 0 && edit == true) { + mode = rgblight_get_mode(); + hue = rgblight_get_hue(); + sat = rgblight_get_sat(); + val = rgblight_get_val(); + edit = false; + } + + switch (biton32(state)) { + case 1: + rgblight_mode(1); + rgblight_setrgb(0xD3, 0x7F, 0xED); + break; + case 2: + rgblight_mode(1); + rgblight_setrgb(0xFF, 0x00, 0x00); + edit = true; + break; + default: + rgblight_mode(mode); + rgblight_sethsv(hue, sat, val); + break; + } + return state; +} diff --git a/keyboards/xd60/keymaps/birkir/readme.md b/keyboards/xd60/keymaps/birkir/readme.md new file mode 100644 index 00000000..670b6bb3 --- /dev/null +++ b/keyboards/xd60/keymaps/birkir/readme.md @@ -0,0 +1,45 @@ +# Birkir's Keymap for XIUDI's 60% XD60 PCB + +Custom layout with some custom layers. Mac friendly. + +## Layout +![Birkir's Layout](https://i.imgur.com/I69AYG1.png) + +### Layer 0 +Base layer as shown on layout above + +### Layer 1 +Active while pressing and holding `MENU` + +RGB is purple while active + +- `ESC` is `~` + +### Layer 2 +Toggled on and off with `FN` + +RGB is red while active + +RGB settings are persisted for layer 0 when done. + + - `1` Backlight DEC + - `2` Backlight INC + - `3` Backlight OFF + - `4` Backlight ON + - `5` RGB Toggle + - `6` RGB Mode + - `7` RGB Hue DEC (-) + - `8` RGB Hue INC (+) + - `9` RGB Saturation DEC (-) + - `0` RGB Saturation INC (+) + - `-/_` RGB Brightness DEC (-) + - `+/=` RGB Brightness INC (+) + - `BACKSPACE` RGB Mode set to PLAIN + +## TODO + +- Mac shortcuts on Layer 1 +- More dynamic keyboard configuration on Layer 2 + +## Build +To build the default keymap, simply run `make xd60:birkir`. diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c index 25919a41..5032d0fc 100644 --- a/keyboards/xd60/keymaps/cheese/keymap.c +++ b/keyboards/xd60/keymaps/cheese/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right| * `-----------------------------------------------------------' */ - [_BL] = KEYMAP( + [_BL] = LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), // Function Layer - [_FL] = KEYMAP( + [_FL] = LAYOUT_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END), // Left Shift Layer - [_LS] = KEYMAP( + [_LS] = LAYOUT_ALL( KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), // Right Shift Layer - [_RS] = KEYMAP( + [_RS] = LAYOUT_ALL( KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index 784088d5..95dea16b 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - KEYMAP( + LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index c036d99f..2d882401 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [_BL] = KEYMAP( + [_BL] = LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - [_FL] = KEYMAP( + [_FL] = LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \ KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xd60/keymaps/kmontag42/keymap.c index 4831a548..78f70299 100644 --- a/keyboards/xd60/keymaps/kmontag42/keymap.c +++ b/keyboards/xd60/keymaps/kmontag42/keymap.c @@ -5,7 +5,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_LEAD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DOT, KC_ENT, \ @@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), // 1: Function Layer - KEYMAP( + LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c index 71f6e3c2..95a3e3fa 100644 --- a/keyboards/xd60/keymaps/krusli/keymap.c +++ b/keyboards/xd60/keymaps/krusli/keymap.c @@ -6,7 +6,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | **** | **** | ******************** | **** | **** | |------+------+----------------------+------+------+ */ - KEYMAP( + LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/petesmom/keymap.c b/keyboards/xd60/keymaps/petesmom/keymap.c index 71bb7fb8..f89db54b 100644 --- a/keyboards/xd60/keymaps/petesmom/keymap.c +++ b/keyboards/xd60/keymaps/petesmom/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [BASE] = KEYMAP( + [BASE] = LAYOUT_ALL( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CTL_SLSH, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(FN), KC_LEFT, KC_DOWN, KC_RIGHT ), // 1: Function Layer - [FN] = KEYMAP( + [FN] = LAYOUT_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ KC_TRNS, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MRWD, KC_MFFD, KC_MSTP, \ KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c index 4b7b03e6..3083d420 100644 --- a/keyboards/xd60/keymaps/rooski/keymap.c +++ b/keyboards/xd60/keymaps/rooski/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ // 0: Base Layer - [_BL] = KEYMAP( + [_BL] = LAYOUT_ALL( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - [_FL] = KEYMAP( + [_FL] = LAYOUT_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_LK), _______, KC_HOME, _______, KC_END), // 2: Lighting Keys - [_LK] = KEYMAP( + [_LK] = LAYOUT_ALL( TO(_BL), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \ RESET , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c index 2cd67738..100edaa7 100644 --- a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c +++ b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, \ @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_CAPS, KC_RSFT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - KEYMAP( + LAYOUT_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ KC_TRNS, BL_TOGG, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_DEL, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c index feb2cd1b..675c4c5a 100644 --- a/keyboards/xd60/keymaps/stanleylai/keymap.c +++ b/keyboards/xd60/keymaps/stanleylai/keymap.c @@ -4,7 +4,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - KEYMAP( + LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer - KEYMAP( + LAYOUT_ALL( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END), // 2: RGB Layer - KEYMAP( + LAYOUT_ALL( KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ diff --git a/keyboards/xd60/keymaps/supercoffee/keymap.c b/keyboards/xd60/keymaps/supercoffee/keymap.c new file mode 100644 index 00000000..22c4fbd8 --- /dev/null +++ b/keyboards/xd60/keymaps/supercoffee/keymap.c @@ -0,0 +1,46 @@ +#include "xd60.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + LAYOUT_ALL( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSHIFT, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + + // 1: Function Layer + LAYOUT_ALL( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \ + KC_NO, KC_NO, KC_UP, KC_END, KC_NO, KC_NO, KC_CALC, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_DEL, BL_STEP,KC_NO, KC_NO, KC_VOLD, KC_VOLU,KC_MUTE, KC_NO, KC_PGDN, KC_RSFT, KC_NO, KC_NO, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; + } + + return MACRO_NONE; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/xd60/keymaps/supercoffee/readme.md b/keyboards/xd60/keymaps/supercoffee/readme.md new file mode 100644 index 00000000..ccfdca8b --- /dev/null +++ b/keyboards/xd60/keymaps/supercoffee/readme.md @@ -0,0 +1,9 @@ +# Supercoffee Keymap for DeskCandy 60% XD60 PCB + +![Supercoffee Keymap for XD60](https://i.imgur.com/SPg4wXw.jpg) + +## Additional Notes +60% Keymap for XD60 with GH60 ANSI layout. Arrow keys mapped to WASD in function layer. + +## Build +To build the default keymap, simply run `make xd60:supercoffee`. diff --git a/keyboards/xd60/keymaps/yuuki/keymap.c b/keyboards/xd60/keymaps/yuuki/keymap.c index 9adb5b11..31309464 100644 --- a/keyboards/xd60/keymaps/yuuki/keymap.c +++ b/keyboards/xd60/keymaps/yuuki/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer - [BASE] = KEYMAP( + [BASE] = LAYOUT_ALL( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ CTL_SLSH, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), // 1: Function Layer - [FN] = KEYMAP( + [FN] = LAYOUT_ALL( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ KC_TRNS, RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, \ KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \ diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index dd5f63c0..8dc0d7ee 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -20,7 +20,7 @@ inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } /* XD60 Keymap Definition Macro */ -#define KEYMAP( \ +#define LAYOUT_ALL( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ diff --git a/keyboards/xd75/keymaps/adi/config.h b/keyboards/xd75/keymaps/adi/config.h new file mode 100644 index 00000000..244c75c7 --- /dev/null +++ b/keyboards/xd75/keymaps/adi/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// Disable backlight +#undef BACKLIGHT_ENABLE + +#endif diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c new file mode 100644 index 00000000..d96a2150 --- /dev/null +++ b/keyboards/xd75/keymaps/adi/keymap.c @@ -0,0 +1,205 @@ +/* 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 _LW 1 +#define _RS 2 +#define _FN 3 +#define _ENTFN 4 +#define _MEDIA 5 +#define _MOUSE 6 + +#define M_BACK 0 +#define M_FWRD 1 +#define M_PTAB 2 +#define M_NTAB 3 +#define M_ZOUT 4 +#define M_ZOIN 5 +#define M_ENTR 6 +#define M_SCRN 7 +#define M_NSPC 8 +#define M_PSPC 9 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = { /* QWERTY */ + { KC_GRAVE,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_INSERT }, + { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOUSE, KC_SCLN), LT(_MEDIA, KC_QUOT), LT(_ENTFN, KC_ENT), LT(_ENTFN, KC_ENT), KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { KC_LCTL, MO(_FN), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), LT(_ENTFN, KC_ENT), KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* LOWERED + */ + + [_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, KC_DEL, KC_DEL }, + { _______, 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___, KC_PGUP, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END }, + }, + +/* RAISED + */ + + [_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, KC_DEL, KC_DEL }, + { _______, 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___, KC_PGUP, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END }, + }, + +/* FUNCTION + */ + + [_FN] = { /* FUNCTION */ + { RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL }, + { 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, _______ }, + { 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_PGUP, KC_WH_D }, + { _______ , _______, AG_SWAP, AG_NORM, _______, KC_BTN1, KC_BTN1, _______, AG_NORM, AG_SWAP, _______, _______, KC_HOME, KC_PGDN, KC_END }, + }, + + [_ENTFN] = { /* Enter FN */ + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, M(M_PTAB), M(M_NTAB), M(M_PSPC), M(M_NSPC), _______, _______, _______, _______, M(M_ZOUT), M(M_ZOIN), _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, _______ }, + { _______, M(M_BACK), M(M_FWRD), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_MEDIA] = { /* Media */ + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, KC_VOLU, _______, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, _______, _______, _______, _______, _______ }, + { _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_MOUSE] = { /* Mouse */ + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, 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 + keyevent_t event = record->event; + + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. + // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: + // quantum/quantum.c + if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { + use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. + } + switch(id) { + case M_BACK: + /* Command + [ or previous page */ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), T(LBRC), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LALT), T(LEFT), U(LALT), END ) : MACRO(END)); + } + case M_FWRD: + /* Command + ] or next page */ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), T(RBRC), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LALT), T(RIGHT), U(LALT), END ) : MACRO(END)); + } + case M_PTAB: + /* Command + { or prev tab. */ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), D(RSFT), T(LBRC), U(RSFT), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LCTRL), D(RSFT), T(TAB), U(RSFT), U(LCTRL), END ) : MACRO(END)); + } + case M_NTAB: + /* Command + } or next tab*/ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), D(RSFT), T(RBRC), U(RSFT), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LCTRL), T(TAB), U(LCTRL), END ) : MACRO(END)); + } + case M_ZOUT: + /* Command + - or Ctrl + -*/ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), T(MINS), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LCTRL), T(MINS), U(LCTRL), END ) : MACRO(END)); + } + break; + case M_ZOIN: + /* Command + = or Ctrl + =*/ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), T(EQL), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LCTRL), T(EQL), U(LCTRL), END ) : MACRO(END)); + } + break; + case M_ENTR: + /* Command + Enter or Ctrl + Enter*/ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), T(ENT), U(LGUI), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LCTRL), T(ENT), U(LCTRL), END ) : MACRO(END)); + } + case M_SCRN: + /* Command + Enter or Ctrl + Enter*/ + if (use_cmd) { + return (event.pressed ? MACRO( D(LGUI), D(LCTRL), D(LSFT), T(4), U(LSFT), U(LGUI), U(LCTRL), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( T(PSCR) ) : MACRO(END)); + } + case M_NSPC: + /* Next space / desktop */ + if (use_cmd) { + return (event.pressed ? MACRO( D(LCTRL), T(RIGHT), U(LCTRL), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LGUI), T(RIGHT), U(LGUI), END ) : MACRO(END)); + } + break; + case M_PSPC: + /* Previous space / desktop */ + if (use_cmd) { + return (event.pressed ? MACRO( D(LCTRL), T(LEFT), U(LCTRL), END ) : MACRO(END)); + } else { + return (event.pressed ? MACRO( D(LGUI), T(LEFT), U(LGUI), END ) : MACRO(END)); + } + default: + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/adi/readme.md b/keyboards/xd75/keymaps/adi/readme.md new file mode 100644 index 00000000..0d481fa5 --- /dev/null +++ b/keyboards/xd75/keymaps/adi/readme.md @@ -0,0 +1,21 @@ +# Adi's XD75re Keymap + +This is my own (@adiron) keymap. It was originally made for the Planck. Since then a modified layout has expanded to encompass the XD75re as well, which I mostly use. + +Below is a summary of the important functions in the keymap. For more, consult the keymap file. + +## Multi-use keys + +Enter (thumb key) - HJKL become left, down, up, right (VIM movement keys). Q and W become previous and next tab, E and R switch spaces in macOS, A and Z go back and and forward in the browser. + +Semicolon - VIM movement keys become mouse. U left click. I right click. + +Quote key - JKL are back, pause/play and forward. AZ are volume up and down, Q and W are brightness down and up. + +## Misc + +Lower + Quote - a Hebrew maqaf (־) in macOS + +## AG swap + +Macros refer to AG_SWAP to check whether to send the macOS or the Windows shortcut. Very useful to me since I alternate between the two. diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk new file mode 100644 index 00000000..d4e08cfb --- /dev/null +++ b/keyboards/xd75/keymaps/adi/rules.mk @@ -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/skewwhiffy/keymap.c b/keyboards/xd75/keymaps/skewwhiffy/keymap.c index 887fbed7..f2a8418f 100644 --- a/keyboards/xd75/keymaps/skewwhiffy/keymap.c +++ b/keyboards/xd75/keymaps/skewwhiffy/keymap.c @@ -17,115 +17,126 @@ #include "keymap_uk.h" // Fillers to make layering more clear #define _______ KC_TRNS -#define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _CM 0 // Colemak #define _NB 1 // Numbers -#define _FN 2 // Function -#define _SYL 3 // Symbols left -#define _SYR 4 // Symbols right -#define _NAV 5 // Navigation +#define _SYL 2 // Symbols left +#define _SYR 3 // Symbols right +#define _NAV 4 // Navigation + +// Layer buttons +#define _Z_SFT SFT_T(UK_Z) +#define _SLSH SFT_T(UK_SLSH) +#define _X_NB LT(_NB, UK_X) +#define _DOT_NB LT(_NB, UK_DOT) +#define _C_SY LT(_SYL, UK_C) +#define _COM_SY LT(_SYR, UK_COMM) +#define _B_NAV LT(_NAV, UK_B) +#define _K_NAV LT(_NAV, UK_K) +#define _F1_NB LT(_NB, UK_F1) +#define _3_NB LT(_NB, UK_3) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for Cmder or iTerm +#define _S_TAB S(UK_TAB) +#define _C_LEFT LCTL(UK_LEFT) +#define _C_RGHT LCTL(UK_RGHT) +#define _A_LEFT LALT(UK_LEFT) +#define _A_RGHT LALT(UK_RGHT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak _CM - * .------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------| - * | | Q | W | F | P | G | | | | J | L | U | Y | ; | | - * |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------| - * | | A | R | S | T | D | | | | H | N | E | I | O | RETURN | - * |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------| - * | | sft or Z | nb or X | sym or C | V | nav or B | | | | nav or K | M | sym or , | nb or . | sft or / | | - * |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------| - * | LSHIFT | LCTRL | LALT | LGUI | CTRL ' | SPACE | LCTRL | DEL | LALT | BACKSP | RGUI | RGUI | RALT | RCTRL | RSHIFT | - * '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------' + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | | Q | W | F | P | G | | | | J | L | U | Y | ; | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | | A | R | S | T | D | | | | H | N | E | I | O | ENT | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | | Z | X | C | V | B | | | | K | M | , | . | / | | + * | | SHIFT | NUMBER | SYMBOL | | NAV | | | | NAV | | SYMBOL | FUNC | SHIFT | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | LSHIFT | LCTRL | LALT | LGUI | TERM | SPACE | LCTRL | DEL | LALT | BACKSP | RGUI | RGUI | RALT | RCTRL | RSHIFT | + * |--------------------------------------------------------------------------------------------------------------------------------------| */ [_CM] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______ }, - { _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, - { _______, SFT_T(KC_Z), LT(_NB, KC_X), LT(_SYL, KC_C), KC_V, LT(_NAV, KC_B), _______, _______, _______, LT(_NAV, KC_K), KC_M, LT(_SYR, KC_COMM), LT(_FN, KC_DOT), SFT_T(KC_SLSH), _______ }, - { KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, _______ }, + { _______, UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, UK_ENT }, + { _______, _Z_SFT, _X_NB, _C_SY, UK_V, _B_NAV, _______, _______, _______, _K_NAV, UK_M, _COM_SY, _DOT_NB, _SLSH, _______ }, + { UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, _TERM, UK_SPC, UK_LCTL, UK_DEL , UK_LALT, UK_BSPC, UK_RGUI, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT }, }, -/* Numbers _NB / Functions _FN - * .----------------------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------+--------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+----------------+-----------------| - * | | | F7 | F8 | F9 | F10 | | | | | 7 | 8 | 9 | | | - * |--------+--------+--------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+----------------+--------+--------| - * | | | F4 | F5 | F6 | F11 | | | | | 4 | 5 | 6 | | | - * |--------+--------+--------------+--------+--------+--------+--------+--------+--------+--------+--------+----------------------------------+--------| - * | | | F1 | F2 | F3 | F12 | | | | | 1 | 2 | 3 | | | - * |--------+--------+--------------+--------+--------+--------+--------+--------+--------+--------+--------+-------------------------+--------+--------| - * | | | | | | | | | | | 0 | 0 | . | | | - * '----------------------------------------------------------------------------------------------------------------------------------------------------' +/* Numbers _NB + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | F7 | F8 | F9 | F10 | | | | | 7 | 8 | 9 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | F4 | F5 | F6 | F11 | | | | | 4 | 5 | 6 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | F1 | F2 | F3 | F12 | | | | | 1 | 2 | 3 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | 0 | 0 | . | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_NB] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______ }, - { _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______ }, - { _______, _______, LT(_NB, KC_X), KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______ }, - }, - [_FN] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______ }, - { _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, KC_5, KC_5, KC_6, _______, _______ }, - { _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, KC_1, KC_2, LT(_FN, KC_DOT), _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, _______ }, + { _______, _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, _______ }, + { _______, _______, _F1_NB, UK_F2, UK_F3, UK_F12, _______, _______, _______, _______, UK_1, UK_2, _3_NB, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UK_0, UK_0, UK_DOT, _______, _______ }, }, -/* Symbols _SYL and _SYR - * .-------------------------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------| - * | | ! | £ | _ | - | ~ | | | | \ | { | } | / | # | | - * |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------| - * | | $ | % | + | = | | | | | " | ( | ) | ' | @ | | - * |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------| - * | | ^ | & | * | | | | | | | < | [ | ] | > | ` | | - * |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * '-------------------------------------------------------------------------------------------------------------------------------------------------------' +/* Symbols _SYL and _SYR - For some reason, combining this into the same layer causes problems. + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | ! | £ | _ | - | ~ | | | | \ | { | } | / | # | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | $ | % | + | = | | | | | " | ( | ) | ' | @ | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | ^ | & | * | | | | | | | < | [ | ] | > | ` | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_SYL] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, UK_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ }, - { _______, KC_DLR, KC_PERC, KC_PLUS, KC_EQL, _______, _______, _______, _______, UK_QUOT, KC_LPRN, KC_RPRN, KC_QUOT, UK_AT, _______ }, - { _______, KC_CIRC, KC_AMPR, LT(_SYL, KC_C), UK_PIPE, _______, _______, _______, _______, KC_LABK, KC_LBRC, KC_RBRC, KC_RABK, KC_GRV, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, _______ }, + { _______, UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, _______ }, + { _______, UK_CIRC, UK_AMPR, _C_SY, UK_PIPE, _______, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, }, [_SYR] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, KC_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ }, - { _______, KC_DLR, KC_PERC, KC_PLUS, KC_EQL, _______, _______, _______, _______, UK_QUOT, KC_LPRN, KC_RPRN, KC_QUOT, UK_AT, _______ }, - { _______, KC_CIRC, KC_AMPR, KC_ASTR, UK_PIPE, _______, _______, _______, _______, KC_LABK, KC_LBRC, LT(_SYR, KC_COMM), KC_RABK, KC_GRV, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, _______ }, + { _______, UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, _______ }, + { _______, UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, _______, UK_LABK, UK_LBRC, _COM_SY, UK_RABK, UK_GRV, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, }, /* * Navigation - * .------------------------------------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+----------+--------------+--------+--------------+---------------+--------+--------+--------+---------------+--------+--------+--------+--------+--------| - * | | Esc | Ctrl L | Up | Ctrl R | | | | | | PtSn | ScLk | Pause | | | - * |--------+----------+--------------+--------+--------------+---------------+--------+--------+--------+---------------+--------+--------+--------+--------+--------| - * | | Tab | Left | Down | Right | | | | | | Insert | Home | PgUp | | | - * |--------+----------+--------------+--------+--------------+---------------+--------+--------+--------+---------------+--------+--------+--------+--------+--------| - * | | ShTab | | | | | | | | | ScLk | End | PgDn | | | - * |--------+----------+--------------+--------+--------------+---------------+--------+--------+--------+---------------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | RESET | - * '------------------------------------------------------------------------------------------------------------------------------------------------------------------' + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Esc | Ctrl L | Up | Ctrl R | | | | | | PtSn | ScLk | Pause | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Tab | Left | Down | Right | | | | | | Insert | Home | PgUp | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | ShTab | Alt L | | Alt R | | | | | | ScLk | End | PgDn | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | RESET | + * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_NAV] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_ESC, LCTL(KC_LEFT), KC_UP , LCTL(KC_RGHT), _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______ }, - { _______, KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______ }, - { _______, S(KC_TAB), _______, _______, _______, LT(_NAV, KC_B), _______, _______, _______, LT(_NAV, KC_K), KC_SLCK, KC_END, KC_PGDN, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, UK_ESC, _C_LEFT, UK_UP , _C_RGHT, _______, _______, _______, _______, _______, UK_PSCR, UK_SLCK, UK_PAUS, _______, _______ }, + { _______, UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, _______, _______, _______, _______, _______, UK_INS, UK_HOME, UK_PGUP, _______, _______ }, + { _______, _S_TAB, _A_LEFT, _______, _A_RGHT, _B_NAV, _______, _______, _______, _K_NAV, UK_SLCK, UK_END, UK_PGDN, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }, }, }; diff --git a/keyboards/ymd96/keymaps/JJ50/keymap.c b/keyboards/ymd96/keymaps/JJ50/keymap.c new file mode 100644 index 00000000..f59950d4 --- /dev/null +++ b/keyboards/ymd96/keymaps/JJ50/keymap.c @@ -0,0 +1,96 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see . +*/ + +#include "ymd96.h" +#include "action_layer.h" +#include "rgblight.h" + +#define ______ KC_TRNS +#define _DEFLT 0 +#define _RAISE 1 +#define _LOWER 2 + +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 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DEFLT] = KEYMAP_JJ50( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + 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_LALT, KC_LGUI, MO(_LOWER), KC_SPC,KC_SPC, MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |ISO # |ISO / | PUP | PDN | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = KEYMAP_JJ50( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |ISO ~ |ISO | | HOM | END | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = KEYMAP_JJ50( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) + +}; diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index 8a420ab5..541ebeb1 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -41,6 +41,19 @@ along with this program. If not, see . { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ } +#define KEYMAP_JJ50( \ +K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ +K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ +K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \ +K311, K310, K309, K308, K304, K305, K306, K307, K303, K302, K301, K300, \ +K411, K410, K409, K408, K404, K405, K406, K407, K403, K402, K401, K400 \ +) { \ +{ K100, K001, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, }, \ +{ K200, K101, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, }, \ +{ K000, K201, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, }, \ +{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, }, \ +{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ +} #endif diff --git a/layouts/community/ergodox/berfarah/keymap.c b/layouts/community/ergodox/berfarah/keymap.c index bc639b18..a0a10778 100644 --- a/layouts/community/ergodox/berfarah/keymap.c +++ b/layouts/community/ergodox/berfarah/keymap.c @@ -183,6 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +#ifdef RGBLIGHT_ENABLE /* * Led Configuration */ @@ -222,6 +223,7 @@ static inline void mod_layer_with_rgb(keyrecord_t *record, uint8_t layer) { bf_set_led(currentLayer); }; }; +#endif /* * Custom keycodes @@ -240,12 +242,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(" "); } return false; break; + #ifdef RGBLIGHT_ENABLE case BF_NUMS: mod_layer_with_rgb(record, NUMS); return false; break; case BF_MOVE: mod_layer_with_rgb(record, MOVE); return false; break; + #endif } return true; @@ -255,7 +259,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { * Active Routines */ void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE bf_set_led(QWERTY); +#endif }; // Runs constantly in the background, in a loop. diff --git a/layouts/community/ergodox/berfarah/rules.mk b/layouts/community/ergodox/berfarah/rules.mk index 7153c6ad..a8732503 100644 --- a/layouts/community/ergodox/berfarah/rules.mk +++ b/layouts/community/ergodox/berfarah/rules.mk @@ -6,8 +6,9 @@ DEBUG_ENABLE = no CONSOLE_ENABLE = no TAP_DANCE_ENABLE = no MOUSEKEY_ENABLE = no -RGBLIGHT_ENABLE = yes +ifdef RGBLIGHT_ENABLE RGBLIGHT_ANIMATION = yes +endif ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO diff --git a/layouts/community/ergodox/choromanski/keymap.c b/layouts/community/ergodox/choromanski/keymap.c new file mode 100644 index 00000000..8be3c7ea --- /dev/null +++ b/layouts/community/ergodox/choromanski/keymap.c @@ -0,0 +1,284 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Colemak + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | BSPACE | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | F | P | G | | | | J | L | U | Y | ; : | \ | | + * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + * | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' " | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | Shift |CTR(Z)|GUI(X)|ALT(C)| V | B | [ | | ] | K | M | , < |ALT(.)|CTR(/)| Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |OSL(3)| TG(2)| TO(5)| TO(1)| CAPS | | LEFT | DOWN | UP |RIGHT |TG(4)| + * `----------------------------------' `---------------------------------' + * ,--------------. ,--------------. + * | LCTR | LALT | | RALT | RCTR | + * ,------|------|-------| |------+-------+------. + * | | | MUTE | |SCROLU| | | + * |BSPACE|DELETE|-------| |------| ENTER |SPACE | + * | | | GUI | |SCROLD| | | + * `---------------------' `---------------------' + */ + [0] = LAYOUT_ergodox( + 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, KC_LPRN, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, CTL_T(KC_Z), GUI_T(KC_X), ALT_T(KC_C), KC_V, KC_B, KC_LBRC, + OSL(3), TG(2), TO(5), TO(1), KC_CAPS, + KC_LCTL, KC_LALT, + KC_MUTE, + KC_BSPC, KC_DEL, KC_LGUI, + + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_RPRN, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_RBRC, KC_K, KC_M, KC_COMM, ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TG(4), + KC_RALT, KC_RCTL, + KC_WH_U, + KC_WH_D, KC_ENT, KC_SPC + ), + +/* Keymap 1: QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CAPS | A | S | D | F | G |------| |------| H | J | K | L | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |CTL(Z)|GUI(X)|ALT(C)| V | B | | | | N | M | , < |ALT(.)|CTL(/)| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |OSL(3)| TG(2)| TO(5)| TO(0)| | | | | | | TG(4)| + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | | | | | | + * ,------|------|------| |------+-------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `---------------------' + */ + [1] = LAYOUT_ergodox( + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_TRNS, CTL_T(KC_Z), GUI_T(KC_X), ALT_T(KC_C), KC_V, KC_B, KC_TRNS, + OSL(3), TG(2), TO(5), TO(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_ESC, + KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRNS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS, + KC_RBRC, KC_N, KC_M, KC_COMM, ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(4), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* Keymap 2: Function Row + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | | | | | | + * ,------|------|------| |------+-------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `---------------------' + */ + [2] = 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* Keymap 3: Symbols + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | + | < | > | # | | | | ~ | ( | ) | \ | : | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ! | - | = | % | @ |------| |------| _ | { | } | / | ? | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | * | & | / | $ | ^ | | | | | | [ | ] | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | | | | | | + * ,------|------|------| |------+-------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `---------------------' + */ + [3] = LAYOUT_ergodox( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_PIPE, KC_PLUS, KC_LABK, KC_RABK, KC_HASH, KC_TRNS, + KC_TRNS, KC_EXLM, KC_MINS, KC_EQL, KC_PERC, KC_AT, + KC_TRNS, KC_ASTR, KC_AMPR, KC_SLSH, KC_DLR, KC_CIRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, + + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TILD, KC_LPRN, KC_RPRN, KC_BSLS, KC_COLN, KC_TRNS, + KC_UNDS, KC_LCBR, KC_RCBR, KC_SLSH, KC_QUES, KC_TRNS, + KC_TRNS, KC_PIPE, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* Keymap 4: Numlock + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | POWER |SLEEP | |MOUSE3| | | RESET| |RESET |SCROL | NUML | / | * | - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | |MOUSE1|MOUSEU|MOUSE2|SCROLU| | | | | 7 | 8 | 9 | + | ACCEL0 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MOUSEL|MOUSED|MOUSER|SCROLD|------| |------| | 4 | 5 | 6 | + | ACCEL1 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |ACCEL0|ACCEL1|ACCEL2| | | | | | 1 | 2 | 3 |ENTER | ACCEL2 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | 0 | . |ENTER | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | VOL+ | VOL- | |MEDIA<|MEDIA>| + * ,------|------|------| |------+------+------. + * | | | MUTE | |Pause | | | + * | | |------| |------| | | + * | | |FILES | | CALC | | | + * `--------------------' `--------------------' + */ + [4] = LAYOUT_ergodox( + KC_PWR, KC_SLEP, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLD, KC_VOLU, + KC_MUTE, + KC_TRNS, KC_TRNS, KC_MYCM, + + RESET, KC_SLCK, KC_NLCK, KC_SLSH, KC_ASTR, KC_MINS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_PLUS, KC_ACL2, + KC_TRNS, KC_4, KC_5, KC_6, KC_PLUS, KC_ACL1, + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_ENT, KC_ACL0, + KC_0, KC_0, KC_DOT, KC_ENT, KC_TRNS, + KC_MPRV, KC_MNXT, + KC_MPLY, + KC_CALC, KC_TRNS, KC_TRNS + ), + +/* Keymap 5: Gaming + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | | | | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| + * | LCTR | A | S | D | F | G |------| |------| H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------| MEDIA| | } |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | P/P | | ] | K | M | UP | . > | / ? | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCTR |ALTTAB| TO(0)| ALT | SPACE| | LEFT | DOWN | RIGHT| , < |TO(0) | + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * |MEDIA<| MEDIA>| | RALT | RCTR | + * ,------|------|-------| |------+-------+------. + * | | | VOL+ | | PGUP | | | + * |SPACE |ENTER |-------| |------|BSPACE |DELETE| + * | | | VOL- | | PGDWN| | | + * `---------------------' `---------------------' + */ + [5] = LAYOUT_ergodox( + 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_TRNS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MPLY, + KC_LCTL, LALT(KC_TAB), TO(0), KC_LALT, KC_SPC, + KC_MPRV, KC_MNXT, + KC_VOLU, + KC_SPC, KC_ENT, KC_VOLD, + + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_ESC, + KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, + KC_TRNS, KC_N, KC_M, KC_UP, KC_DOT, KC_SLSH, KC_LSFT, + KC_LEFT, KC_DOWN, KC_RGHT, KC_COMM, TO(0), + KC_LALT, KC_LCTL, + KC_PGUP, + KC_PGDOWN, KC_BSPC, KC_DEL + ), +}; + +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; + default: + break; + } + +}; diff --git a/layouts/community/ergodox/choromanski/readme.md b/layouts/community/ergodox/choromanski/readme.md new file mode 100644 index 00000000..848a6670 --- /dev/null +++ b/layouts/community/ergodox/choromanski/readme.md @@ -0,0 +1,138 @@ +# Choromanski + +## Features +* Colemak +* Qwerty +* Toggable function row +* Symbol layer programmer friendly +* Numpad/Mouse layer with media controls +* Gaming friendly layer + +## Layers + +### 0 Colemak +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | BSPACE | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| TAB | Q | W | F | P | G | | | | J | L | U | Y | ; : | \ | | +|--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| +| ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' " | +|--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| +| Shift |CTR(Z)|GUI(X)|ALT(C)| V | B | [ | | ] | K | M | , < |ALT(.)|CTR(/)| Shift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |OSL(3)| TG(2)| TO(5)| TO(1)| CAPS | | LEFT | DOWN | UP |RIGHT |TG(4)| + `----------------------------------' `---------------------------------' + ,--------------. ,--------------. + | LCTR | LALT | | RALT | RCTR | + ,------|------|-------| |------+-------+------. + | | | MUTE | |SCROLU| | | + |BSPACE|DELETE|-------| |------| ENTER |SPACE | + | | | GUI | |SCROLD| | | + `---------------------' `---------------------' +``` +### 1 Qwerty +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | ESC | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | Q | W | E | R | T | | | | Y | U | I | O | P | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| CAPS | A | S | D | F | G |------| |------| H | J | K | L | ; | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| |CTL(Z)|GUI(X)|ALT(C)| V | B | | | | N | M | , < |ALT(.)|CTL(/)| | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |OSL(3)| TG(2)| TO(5)| TO(0)| | | | | | | TG(4)| + `----------------------------------' `----------------------------------' + ,-------------. ,--------------. + | | | | | | + ,------|------|------| |------+-------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `---------------------' +``` +### 2 Function Lock +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | |------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,--------------. + | | | | | | + ,------|------|------| |------+-------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `---------------------' +``` +### 3 Symbols +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | + | < | > | # | | | | ~ | ( | ) | \ | : | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ! | - | = | % | @ |------| |------| _ | { | } | / | ? | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | * | & | / | $ | ^ | | | | | | [ | ] | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,--------------. + | | | | | | + ,------|------|------| |------+-------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `---------------------' +``` +### 4 Numpad/Mouse with Media Controls +``` +,--------------------------------------------------. ,--------------------------------------------------. +| POWER |SLEEP | |MOUSE3| | | RESET| |RESET |SCROL | NUML | / | | - | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | |MOUSE1|MOUSEU|MOUSE2|SCROLU| | | | | 7 | 8 | 9 | + | ACCEL0 | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | |MOUSEL|MOUSED|MOUSER|SCROLD|------| |------| | 4 | 5 | 6 | + | ACCEL1 | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | |ACCEL0|ACCEL1|ACCEL2| | | | | | 1 | 2 | 3 |ENTER | ACCEL2 | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | 0 | 0 | . |ENTER | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | VOL+ | VOL- | |MEDIA<|MEDIA>| + ,------|------|------| |------+------+------. + | | | MUTE | |Pause | | | + | | |------| |------| | | + | | |FILES | | CALC | | | + `--------------------' `--------------------' +``` +### 5 Gaming +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ` ~ | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | | 7 & | 8 * | 9 ( | 0 ) | - _ | = + | ESC | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| TAB | Q | W | E | R | T | | | | Y | U | I | O | P | \ | | +|--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| +| LCTR | A | S | D | F | G |------| |------| H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------| MEDIA| | } |------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | P/P | | ] | K | M | UP | . > | / ? | Shift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | LCTR |ALTTAB| TO(0)| ALT | SPACE| | LEFT | DOWN | RIGHT| , < |TO(0) | + `----------------------------------' `----------------------------------' + ,--------------. ,--------------. + |MEDIA<| MEDIA>| | RALT | RCTR | + ,------|------|-------| |------+-------+------. + | | | VOL+ | | PGUP | | | + |SPACE |ENTER |-------| |------|BSPACE |DELETE| + | | | VOL- | | PGDWN| | | + `---------------------' `---------------------' +``` \ No newline at end of file diff --git a/layouts/community/ergodox/choromanski/visualizer.c b/layouts/community/ergodox/choromanski/visualizer.c new file mode 100644 index 00000000..e207c668 --- /dev/null +++ b/layouts/community/ergodox/choromanski/visualizer.c @@ -0,0 +1,62 @@ +/* +Copyright 2017 Fred Sundvik + +This 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 "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) { + + if (state->status.layer & 0x20) { + //GREEN + state->target_lcd_color = LCD_COLOR(85, 255, 128); + state->layer_text = "Gaming"; + } + else if (state->status.layer & 0x10) { + //ORANGE + state->target_lcd_color = LCD_COLOR(28, 255, 230); + state->layer_text = "Numpad & Mouse"; + } + else if (state->status.layer & 0x8) { + //YELLOW + state->target_lcd_color = LCD_COLOR(38, 255, 230); + state->layer_text = "Symbols"; + } + else if (state->status.layer & 0x4) { + //RED + state->target_lcd_color = LCD_COLOR(0, 255, 95); + if (state->status.layer & 0x2){ + state->layer_text = "Qwerty - Fn"; + }else{ + state->layer_text = "Colemak - Fn"; + } + } + else if (state->status.layer & 0x2) { + //BLUE + state->target_lcd_color = LCD_COLOR(149, 255, 192); + state->layer_text = "Qwerty"; + } + else { + //PURPLE + state->target_lcd_color = LCD_COLOR(200, 255, 192); + state->layer_text = "Colemak"; + } +} + diff --git a/keyboards/ergodox_ez/keymaps/drashna/README.md b/layouts/community/ergodox/drashna/README.md similarity index 100% rename from keyboards/ergodox_ez/keymaps/drashna/README.md rename to layouts/community/ergodox/drashna/README.md diff --git a/keyboards/ergodox_ez/keymaps/drashna/config.h b/layouts/community/ergodox/drashna/config.h similarity index 50% rename from keyboards/ergodox_ez/keymaps/drashna/config.h rename to layouts/community/ergodox/drashna/config.h index d543379a..27124dbe 100644 --- a/keyboards/ergodox_ez/keymaps/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_CONFIG_H - #ifdef RGBLIGHT_ENABLE #undef RGBLIGHT_SAT_STEP #define RGBLIGHT_SAT_STEP 12 @@ -12,13 +11,6 @@ #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 #endif // RGBLIGHT_ENABLE -#ifdef TAPPING_TERM -#undef TAPPING_TERM -#endif -#define TAPPING_TERM 175 -#undef PERMISSIVE_HOLD -#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.) -#define ONESHOT_TAP_TOGGLE 2 #undef PRODUCT #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine diff --git a/keyboards/ergodox_ez/keymaps/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c similarity index 60% rename from keyboards/ergodox_ez/keymaps/drashna/keymap.c rename to layouts/community/ergodox/drashna/keymap.c index aeadbb1f..f29c57f2 100644 --- a/keyboards/ergodox_ez/keymaps/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -30,9 +30,9 @@ bool skip_leds = false; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * +/* Keymap 0: QWERTY Layer + * + * * ,--------------------------------------------------. ,--------------------------------------------------. * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | + * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | * `----------------------------------' `----------------------------------' * ,--------------. ,--------------. * |Alt/Ap| Win | | Alt |Ctl/Esc| @@ -52,27 +52,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | End | | PgDn | | | * `---------------------' `---------------------' */ - [_QWERTY] = LAYOUT_ergodox_wrapper( - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), - KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), - KC_BSPC, _________________QWERTY_L2_________________, - KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, - - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPACE,KC_BSPC, KC_END, - - OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, - _________________QWERTY_R2_________________, GUI_T(KC_QUOT), - TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, - ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), - KC_RGUI, CTL_T(KC_ESCAPE), - KC_PGUP, - KC_PGDOWN, KC_DELETE, KC_ENTER + [_QWERTY] = LAYOUT_ergodox_pretty_wrapper( + // left hand // right hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS, + TG(_MODS), _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, GUI_T(KC_QUOT), + KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF, + LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), + KC_HOME, KC_PGUP, + KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER + + ), -/* Keymap 0: Basic layer +/* Keymap 0: COLEMAK layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | @@ -83,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | LGui | | Alt |Ctrl/Esc| @@ -95,27 +88,18 @@ 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] = LAYOUT_ergodox_wrapper( - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), - KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), - KC_BSPC, _________________COLEMAK_L2________________, - KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPACE,KC_BSPC, KC_END, - // right hand - OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, - _________________COLEMAK_R2________________, GUI_T(KC_QUOT), - TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, - ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), - KC_RGUI, CTL_T(KC_ESCAPE), - KC_PGUP, - KC_PGDOWN, KC_DELETE, KC_ENTER + [_COLEMAK] = LAYOUT_ergodox_pretty_wrapper( + // left hand // right hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS, + TG(_MODS), _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, GUI_T(KC_QUOT), + KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF, + LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), + KC_HOME, KC_PGUP, + KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER ), -/* Keymap 0: Basic layer +/* Keymap 0: DVORAK Layout * * ,--------------------------------------------------. ,--------------------------------------------------. * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | @@ -126,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | LGui | | Alt |Ctrl/Esc| @@ -138,27 +122,18 @@ 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_* -[_DVORAK] = LAYOUT_ergodox_wrapper( - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), - KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), - KC_BSPC, _________________DVORAK_L2_________________, - KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPACE,KC_BSPC, KC_END, - // right hand - OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, - TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, - _________________DVORAK_R2_________________, GUI_T(KC_MINS), - TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, - ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), - KC_RGUI, CTL_T(KC_ESCAPE), - KC_PGUP, - KC_PGDOWN, KC_DELETE, KC_ENTER + [_DVORAK] = LAYOUT_ergodox_pretty_wrapper( + // left hand // right hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH, + TG(_MODS), _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, GUI_T(KC_MINS), + KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF, + LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), + KC_HOME, KC_PGUP, + KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER ), -/* Keymap 0: Basic layer +/* Keymap 0: WORKMAN layer * * ,--------------------------------------------------. ,--------------------------------------------------. * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | @@ -169,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | LGui | | Alt |Ctrl/Esc| @@ -181,45 +156,28 @@ 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_* -[_WORKMAN] = LAYOUT_ergodox_wrapper( + [_WORKMAN] = LAYOUT_ergodox_pretty_wrapper( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), - KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), - KC_BSPC, _________________WORKMAN_L2________________, - KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), - LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPACE,KC_BSPC, KC_END, - // right hand - OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, - _________________WORKMAN_R2________________, GUI_T(KC_QUOT), - TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, - ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), - KC_RGUI, CTL_T(KC_ESCAPE), - KC_PGUP, - KC_PGDOWN, KC_DELETE, KC_ENTER + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, OSL(_MOUS), OSL(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS, + TG(_MODS), _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, GUI_T(KC_QUOT), + KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF, + LT(_SYMB,KC_GRV), ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, TT(_SYMB), + ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), + KC_HOME, KC_PGUP, + KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER ), - [_MODS] = 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, - KC_LSFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS +// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) + [_MODS] = LAYOUT_ergodox_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), /* Keymap 3: Symbol Layer @@ -227,11 +185,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| -* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 | +* | RESET | ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| -* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE | +* | VRSN | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT | * `----------------------------------' `----------------------------------' @@ -243,24 +201,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | DARK |BRITE | BLUE | | | | | * `--------------------' `--------------------' */ - [_SYMB] = LAYOUT_ergodox( - EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, TG(_MODS), - KC_RESET, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN, - KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, - VRSN, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK, - KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, - RGB_SMOD, KC_RGB_T, - RGB_HUI, - RGB_M_R, RGB_M_SW, RGB_HUD, - - KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_DVORAK, 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_COLEMAK, 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_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_KP_DOT, KC_KP_0, KC_KP_ENTER + [_SYMB] = LAYOUT_ergodox_pretty( + EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_QWERTY, KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_RST, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_WORKMAN, KC_DVORAK, KC_PPLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, KC_F12, + KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, KC_PSCREEN, + VRSN, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_COLEMAK, KC_COLEMAK, KC_NLCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, KC_PAUSE, + KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCLN, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_TRNS, + RGB_SMOD, KC_RGB_T, KC_TRNS, KC_TRNS, + RGB_HUI, KC_TRNS, + RGB_M_R, RGB_M_SW, RGB_HUD, KC_PDOT, KC_KP_0, KC_PENT ), /* Keymap 4: Customized Overwatch Layout @@ -284,24 +233,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | H | | | | | * `--------------------' `--------------------' */ - [_GAMEPAD] = LAYOUT_ergodox( - KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), - 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_V, KC_TRNS, - KC_G, KC_U, KC_I, KC_Y, KC_T, - KC_O, KC_P, - KC_LGUI, - KC_V, KC_SPACE, KC_H, - - KC_TRNS, 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_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, - TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, - KC_HYPR, MAGIC_TOGGLE_NKRO, - KC_NO, - KC_PGDOWN, KC_DELETE, KC_ENTER + [_GAMEPAD] = LAYOUT_ergodox_pretty( + KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_G, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO, + KC_LGUI, KC_NO, + KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER ), /* Keymap 3: @@ -325,26 +265,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | SHIFT| ALT | 0MAC | | | | | * `--------------------' `--------------------' */ - [_DIABLO] = LAYOUT_ergodox( - 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_TRNS, - KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, - KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_L, KC_J, - KC_F, - SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, - - - - KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, 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_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_NO, - KC_PGDOWN, KC_DELETE, KC_ENTER + [_DIABLO] = LAYOUT_ergodox_pretty( + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_NO, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_L, KC_J, KC_NO, KC_NO, + KC_F, KC_NO, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, KC_PGDN, KC_DEL, KC_ENT ), /* Keymap 4: Media and mouse keys @@ -368,24 +297,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | MWDn | | Mclk | | | * `--------------------' `--------------------' */ - [_MOUS] = LAYOUT_ergodox( - KC_NO, KC_SECRET_1,KC_SECRET_2,KC_SECRET_3,KC_SECRET_4,KC_SECRET_5,KC_TRNS, - KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, - KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, - KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_WH_U, - KC_BTN1, KC_BTN2, KC_WH_D, - - KC_TRNS, 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_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO,KC_NO, - KC_NO, - KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5 + [_MOUS] = LAYOUT_ergodox_pretty( + KC_NO, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, + KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, + KC_WH_U, KC_NO, + KC_BTN1, KC_BTN2, KC_WH_D, KC_BTN3, KC_BTN4, KC_BTN5 ), }; @@ -415,6 +335,8 @@ void matrix_init_keymap(void) { // Runs boot tasks for keyboard void matrix_scan_keymap(void) { // runs frequently to update info uint8_t modifiders = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); if (!skip_leds) { ergodox_board_led_off(); @@ -424,15 +346,18 @@ void matrix_scan_keymap(void) { // runs frequently to update info // Since we're not using the LEDs here for layer indication anymore, // then lets use them for modifier indicators. Shame we don't have 4... - // Also, no "else", since we want to know each, independantly. - if (modifiders & MODS_SHIFT_MASK) { + // Also, no "else", since we want to know each, independently. + if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1<event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + 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) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/layouts/community/ergodox/haegin/readme.md b/layouts/community/ergodox/haegin/readme.md new file mode 100644 index 00000000..15e7f244 --- /dev/null +++ b/layouts/community/ergodox/haegin/readme.md @@ -0,0 +1,5 @@ +# Haegin's Ergodox Firmware + +Mostly uses keys available on the Minidox, with some extras that are nice +to have when they're available, provided they're in a roughly similar place on +the Model 01. diff --git a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md index 42cb1957..3bae0797 100644 --- a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md +++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/readme.md @@ -1,10 +1,10 @@ # The extra special ergodox build for MacOS Sierra caps lock users -###Do you +### Do you - Hate the OSX / MacOS caps lock delay? - Have an ergodox? -###Then this might just be for you! +### Then this might just be for you! [This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard) and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/) @@ -30,7 +30,7 @@ however there is one known issue: I have only tested this on an original Ergodox with a Teensy 2.0. -####Some other small tweaks +#### Some other small tweaks - Layer 0 board light is off - Layer 1 board light is on solid - Layer 2 board light blinks at speed controlled by BLINK_BASE diff --git a/layouts/community/ergodox/twey/keymap.c b/layouts/community/ergodox/twey/keymap.c index 70152864..9ee318a5 100644 --- a/layouts/community/ergodox/twey/keymap.c +++ b/layouts/community/ergodox/twey/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" -#include "keymap_plover.h" +#include "keymap_steno.h" #define BASE 0 // default layer #define SYMB 1 // symbols @@ -35,14 +35,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(0), + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(STEN), KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, MO(SYMB), KC_NO, KC_GRV, KC_LEFT,KC_RGHT, KC_PGUP,KC_PGDN, KC_NO, - KC_LALT,KC_ENT ,KC_LGUI, + KC_LALT,KC_ENT ,M(0), // right hand KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_CAPS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, @@ -96,37 +96,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), +/* Keymap 2: Steno for Plover + * + * ,---------------------------------------------------. ,---------------------------------------------------. + * | | | # | # | # | # | | | | # | # | # | # | # | | + * |--------+------+------+------+-------+-------------| |-------+------+------+------+------+------+--------| + * | | | S | T | P | H | * | | * | F | P | L | T | D | | + * |--------+------+------+------+-------+------| | | |------+------+------+------+------+--------| + * | | | S | K | W | R |------| |-------| R | B | G | S | Z | | + * |--------+------+------+------+-------+------| * | | * |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+-------+-------------' `--------------+------+------+------+------+--------' + * | L1 | | | Left | Right | | Up | Down | | | L1 | + * `-----------------------------------' `----------------------------------' + * ,--------------. ,---------------. + * | | | | | | + * ,------|-------|------| |-------+-------+------. + * | | | | | | | | + * | A | O |------| |-------| E | U | + * | | | | | | | | + * `---------------------' `----------------------' + */ + + [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, - KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, - KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_TRNS, + KC_NO, KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, STN_ST2, KC_TRNS,KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, - PV_A, PV_O, KC_NO, + STN_A, STN_O, KC_TRNS, // right hand - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - PV_STAR, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, - PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, - PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, + KC_NO, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, KC_NO, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, KC_NO, + STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, KC_NO, + STN_ST4, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, - KC_TRNS,PV_E, PV_U + KC_TRNS, STN_E, STN_U ), /* Keymap 3: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | | | | | | STEN | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | Back | | Frwd | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | Prev | Play | Next | | | + * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Mclk | Rclk | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | Prev | Play | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -144,15 +167,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, 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_WBAK, KC_TRNS, KC_WFWD, KC_TRNS, KC_TRNS, - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -164,43 +187,34 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN1 - Momentary Layer 3 (Media) }; -void toggle_steno(int pressed) +// press `key`, but deactivate `layer` whilst it's held +void press_without(int pressed, int key, uint8_t layer) { - uint8_t layer = biton32(layer_state); - + static bool was_on; if (pressed) { - if (layer != STEN) layer_on(STEN); else layer_off(STEN); - - register_code(PV_LP); - register_code(PV_LH); - register_code(PV_LR); - register_code(PV_O); - register_code(PV_RL); - register_code(PV_RG); + was_on = layer_state_is(layer); + layer_off(layer); + register_code(key); } else { - unregister_code(PV_LP); - unregister_code(PV_LH); - unregister_code(PV_LR); - unregister_code(PV_O); - unregister_code(PV_RL); - unregister_code(PV_RG); + if (was_on) layer_on(layer); + unregister_code(key); } } 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: - toggle_steno(record->event.pressed); - break; - } - return MACRO_NONE; + switch(id) { + case 0: + press_without(record->event.pressed, KC_LGUI, STEN); + break; + } + return MACRO_NONE; }; // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + steno_set_mode(STENO_MODE_BOLT); }; // Runs constantly in the background, in a loop. @@ -209,7 +223,7 @@ void matrix_scan_user(void) { uint32_t layer0 = layer_state & (1UL << 0), layer1 = layer_state & (1UL << 1), layer2 = layer_state & (1UL << 2), - layer3 = layer_state & (1UL << 3); + layer3 = layer_state & (1UL << 3); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/layouts/community/ergodox/twey/readme.md b/layouts/community/ergodox/twey/readme.md index 979e4261..52190cb1 100644 --- a/layouts/community/ergodox/twey/readme.md +++ b/layouts/community/ergodox/twey/readme.md @@ -6,12 +6,9 @@ - Layer 2: Plover-oriented stenography layer. - Layer 3: Extended media/mouse layout. -## Unusual features -The Plover key (top right key on the left half) also sends my Plover -‘toggle’ chord (SH-FT) when pressed, as well as toggling the steno -layer, so you can toggle between steno and typing modes with a single -keypress. - -If you want to use this feature, you'll need to add the -`commands.json` dictionary to your Plover dictionaries, or define the -toggle stroke (`PHROLG`) yourself. +## Hardware notes +The default Ergodox EZ keycaps are delightfully staggered, which seems +like it would make them terrible for steno, but in fact flipping the +top row (`QWERTYUIOP`) and the middle thumb keys upside down brings +them close enough together to give a rather pleasant steno experience, +without interfering much with standard Dvorak typing. diff --git a/layouts/community/ergodox/twey/rules.mk b/layouts/community/ergodox/twey/rules.mk new file mode 100644 index 00000000..87af2f76 --- /dev/null +++ b/layouts/community/ergodox/twey/rules.mk @@ -0,0 +1,4 @@ +VIRTSER_ENABLE = yes +STENO_ENABLE = yes +MOUSEKEY_ENABLE = no +FORCE_NKRO = yes diff --git a/layouts/community/ortho_4x12/crs/config.h b/layouts/community/ortho_4x12/crs/config.h new file mode 100644 index 00000000..3c3d9b88 --- /dev/null +++ b/layouts/community/ortho_4x12/crs/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/crs/keymap.c b/layouts/community/ortho_4x12/crs/keymap.c new file mode 100644 index 00000000..f9c72f25 --- /dev/null +++ b/layouts/community/ortho_4x12/crs/keymap.c @@ -0,0 +1,257 @@ +// Can't Remember Sh*t Keymap for 4x12 ortho +// http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7 + +#include QMK_KEYBOARD_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 _ARROW 1 +#define _GAME 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ARROW, + GAME, + LOWER, + RAISE, + BACKLIT, + PLOVER, + 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 + * ,-----------------------------------------------------------------------------------. + * | 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] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, 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) \ +), + +/* Arrow + * ,-----------------------------------------------------------------------------------. + * | 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| Space|Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ARROW] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* 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] = LAYOUT_ortho_4x12( \ + 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 | . | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | | | | | 0 | | | | KP_+ | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + 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 | | - | = | [ | ] | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | App | | | | | Ins | | Home | PGDN | PGUP | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______, \ + _______, KC_APP, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* 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] = LAYOUT_ortho_4x12 ( \ + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , \ + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | C-A-I|Qwerty| | |Reset |Macro0| | | | |PLOVER|C-A-D | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | Arrow| |Aud on|Audoff| Game |AGswap|AGnorm| PrtSc|ScrLck| Break| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| Prev | Next | Mute | VolDn| VolUp| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | | | | Play/Pause | | BL_T |BL_DEC|BL_INC|BL_ST | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL)), \ + KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, 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_qwerty[][2] = SONG(QWERTY_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_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) { + +} diff --git a/layouts/community/ortho_4x12/crs/readme.md b/layouts/community/ortho_4x12/crs/readme.md new file mode 100644 index 00000000..66b03cfd --- /dev/null +++ b/layouts/community/ortho_4x12/crs/readme.md @@ -0,0 +1,15 @@ +# CRS 4x12 Ortholinear Layout + +Since I started with a Planck and a 2u space, it's not as optimal on a split or grid but it's what I'm used to using. + +Goals: + +* Maximum compatibility with standard keyboards + * I have to work on other staggered Qwerty keyboards all the time so I wanted to keep essentially the same layout instead of optimizing too much. +* Trying to fit as many characters as possible on the default layer + * its easier for me to remember logical functions than characters + * Using the extra punctuation caps in place of arrows frees up some Row 4 caps + * however, I'm trying out an arrows layout with the other punctuation on the Raise layer and it is quite nice too +* A number pad AND a number row + +[Here is the layout in easily readable KLE form.](http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7) diff --git a/layouts/default/60_ansi/default_60_ansi/keymap.c b/layouts/default/60_ansi/default_60_ansi/keymap.c index 6da2d25e..ec98612f 100644 --- a/layouts/default/60_ansi/default_60_ansi/keymap.c +++ b/layouts/default/60_ansi/default_60_ansi/keymap.c @@ -1,11 +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 - ) + [0] = LAYOUT_60_ansi( + 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_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_BSLS , + KC_CAPS , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT , + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT , + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , KC_APP , KC_RCTL + ) }; diff --git a/layouts/default/60_ansi_split_bs_rshift/default_60_ansi_split_bs_rshift/keymap.c b/layouts/default/60_ansi_split_bs_rshift/default_60_ansi_split_bs_rshift/keymap.c index 8cddf696..efb6fbcf 100644 --- a/layouts/default/60_ansi_split_bs_rshift/default_60_ansi_split_bs_rshift/keymap.c +++ b/layouts/default/60_ansi_split_bs_rshift/default_60_ansi_split_bs_rshift/keymap.c @@ -1,13 +1,13 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi_split_bs_rshift( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ) + [0] = LAYOUT_60_ansi_split_bs_rshift( + 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_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_RSFT, + KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , KC_APP , KC_RCTL + ) }; // Runs just one time when the keyboard initializes. diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index d52f45d1..a66c4d86 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -188,7 +188,14 @@ Q__NOTE(_B5 ), \ Q__NOTE(_CS6), \ Q__NOTE(_D6 ), \ - Q__NOTE(_E6 ), + Q__NOTE(_E6 ), + +#define MINOR_SOUND \ + Q__NOTE(_A5 ), \ + Q__NOTE(_B5 ), \ + Q__NOTE(_C6 ), \ + Q__NOTE(_D6 ), \ + Q__NOTE(_E6 ), #define GUITAR_SOUND \ Q__NOTE(_E5 ), \ @@ -272,12 +279,142 @@ HD_NOTE(_C6), #define ZELDA_TREASURE \ - Q__NOTE(_A4), \ + Q__NOTE(_A4 ), \ Q__NOTE(_AS4), \ - Q__NOTE(_B4), \ - HD_NOTE(_C5), \ + Q__NOTE(_B4 ), \ + HD_NOTE(_C5 ), \ #define TERMINAL_SOUND \ E__NOTE(_C5 ) +#define OVERWATCH_THEME \ + HD_NOTE(_A4 ), \ + Q__NOTE(_E4 ), \ + Q__NOTE(_A4 ), \ + HD_NOTE(_B4 ), \ + Q__NOTE(_E4 ), \ + Q__NOTE(_B4 ), \ + W__NOTE(_CS5), + +#define MARIO_THEME \ + Q__NOTE(_E5), \ + H__NOTE(_E5), \ + H__NOTE(_E5), \ + Q__NOTE(_C5), \ + H__NOTE(_E5), \ + W__NOTE(_G5), \ + Q__NOTE(_G4), + +#define MARIO_GAMEOVER \ + HD_NOTE(_C5 ), \ + HD_NOTE(_G4 ), \ + H__NOTE(_E4 ), \ + H__NOTE(_A4 ), \ + H__NOTE(_B4 ), \ + H__NOTE(_A4 ), \ + H__NOTE(_AF4), \ + H__NOTE(_BF4), \ + H__NOTE(_AF4), \ + WD_NOTE(_G4 ), + +#define E1M1_DOOM \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_D4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_C4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_BF3), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_B3 ), \ + Q__NOTE(_C4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_D4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_C4 ), \ + Q__NOTE(_E3 ), \ + Q__NOTE(_E3 ), \ + H__NOTE(_BF3), + +#define DISNEY_SONG \ + H__NOTE(_G3 ), \ + H__NOTE(_G4 ), \ + H__NOTE(_F4 ), \ + H__NOTE(_E4 ), \ + H__NOTE(_CS4), \ + H__NOTE(_D4 ), \ + W__NOTE(_A4 ), \ + H__NOTE(_B3 ), \ + H__NOTE(_B4 ), \ + H__NOTE(_A4 ), \ + H__NOTE(_G4 ), \ + H__NOTE(_FS4), \ + H__NOTE(_G4 ), \ + W__NOTE(_C5 ), \ + H__NOTE(_D5 ), \ + H__NOTE(_C5 ), \ + H__NOTE(_B4 ), \ + H__NOTE(_A4 ), \ + H__NOTE(_G4 ), \ + H__NOTE(_F4 ), \ + H__NOTE(_E4 ), \ + H__NOTE(_D4 ), \ + W__NOTE(_A4 ), \ + W__NOTE(_B3 ), \ + W__NOTE(_C4 ), + +#define NUMBER_ONE \ + HD_NOTE(_F4 ), \ + Q__NOTE(_C5 ), \ + E__NOTE(_B4 ), \ + E__NOTE(_C5 ), \ + E__NOTE(_B4 ), \ + E__NOTE(_C5 ), \ + Q__NOTE(_B4 ), \ + Q__NOTE(_C5 ), \ + H__NOTE(_AF4), \ + HD_NOTE(_F4 ), \ + Q__NOTE(_F4 ), \ + Q__NOTE(_AF4), \ + Q__NOTE(_C5 ), \ + H__NOTE(_DF5), \ + H__NOTE(_AF4), \ + H__NOTE(_DF5), \ + H__NOTE(_EF5), \ + Q__NOTE(_C5 ), \ + Q__NOTE(_DF5), \ + Q__NOTE(_C5 ), \ + Q__NOTE(_DF5), \ + H__NOTE(_C5 ), + +#define CABBAGE_SONG \ + H__NOTE(_C4), \ + H__NOTE(_A4), \ + H__NOTE(_B4), \ + H__NOTE(_B4), \ + H__NOTE(_A4), \ + H__NOTE(_G4), \ + H__NOTE(_E4), + +#define OLD_SPICE \ + Q__NOTE(_A4 ), \ + Q__NOTE(_A4 ), \ + H__NOTE(_B4 ), \ + H__NOTE(_D5 ), \ + H__NOTE(_CS5), \ + Q__NOTE(_E5 ), \ + H__NOTE(_FS5), \ + H__NOTE(_D5 ), \ + #endif diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index eb39c8fe..0dc5105d 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -90,7 +90,6 @@ uint16_t keycode_config(uint16_t keycode) { } uint8_t mod_config(uint8_t mod) { - keymap_config.raw = eeconfig_read_keymap(); if (keymap_config.swap_lalt_lgui) { if ((mod & MOD_RGUI) == MOD_LGUI) { mod &= ~MOD_LGUI; @@ -115,4 +114,4 @@ uint8_t mod_config(uint8_t mod) { } return mod; -} \ No newline at end of file +} diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index a0d4c1dd..9a412b66 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -122,6 +122,11 @@ action_t action_for_key(uint8_t layer, keypos_t key) case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); break; + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: + mod = keycode & 0xF; + action_layer = (keycode >> 4) & 0xF; + action.code = ACTION_LAYER_MODS(action_layer, mod); + break; case QK_MOD_TAP ... QK_MOD_TAP_MAX: mod = mod_config((keycode >> 0x8) & 0x1F); action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF); @@ -146,6 +151,12 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = ACTION_BACKLIGHT_STEP(); break; #endif + #ifdef SWAP_HANDS_ENABLE + case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: + action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff); + break; + #endif + default: action.code = ACTION_NO; break; diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h new file mode 100644 index 00000000..0ff6ce87 --- /dev/null +++ b/quantum/keymap_extras/keymap_italian.h @@ -0,0 +1,122 @@ +/* Copyright 2015-2016 Matthias Schmidtt + * + * This 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_ITALIAN +#define KEYMAP_ITALIAN + +#include "keymap.h" + +// Alt gr +#define ALGR(kc) RALT(kc) +#define IT_ALGR KC_RALT + +// normal characters + + + +#define IT_A KC_A +#define IT_B KC_B +#define IT_C KC_C +#define IT_D KC_D +#define IT_E KC_E +#define IT_F KC_F +#define IT_G KC_G +#define IT_H KC_H +#define IT_I KC_I +#define IT_J KC_J +#define IT_K KC_K +#define IT_L KC_L +#define IT_M KC_M +#define IT_N KC_N +#define IT_O KC_O +#define IT_P KC_P +#define IT_Q KC_Q +#define IT_R KC_R +#define IT_S KC_S +#define IT_T KC_T +#define IT_U KC_U +#define IT_V KC_V +#define IT_W KC_W +#define IT_X KC_X +#define IT_Y KC_Y +#define IT_Z KC_Z + +#define IT_0 KC_0 +#define IT_1 KC_1 +#define IT_2 KC_2 +#define IT_3 KC_3 +#define IT_4 KC_4 +#define IT_5 KC_5 +#define IT_6 KC_6 +#define IT_7 KC_7 +#define IT_8 KC_8 +#define IT_9 KC_9 + +#define IT_DOT KC_DOT +#define IT_COMM KC_COMM + +#define IT_EACC KC_LBRC // è, é, [, { +#define IT_PLUS KC_RBRC // +, *, ], } +#define IT_OACC KC_SCLN // ò, ç, @, +#define IT_AACC KC_QUOT // à, °, #, +#define IT_UACC KC_BSLS // ù, §, , +#define IT_IACC KC_EQL // ì, ^, , + +#define IT_APOS KC_MINS // ', ?, , + + + +#define IT_BKSL KC_GRAVE // backslash \, | + + +#define IT_ACUT // accent acute ´ and grave ` + +#define IT_LESS KC_NUBS // < and > and | +#define IT_MINS KC_SLSH // - and _ + +// shifted characters +#define IT_PIPE LSFT(IT_BKSL) // ° +#define IT_EXLM LSFT(KC_1) // ! +#define IT_DQOT LSFT(KC_2) // " +#define IT_STRL LSFT(KC_3) // £ +#define IT_DLR LSFT(KC_4) // $ +#define IT_PERC LSFT(KC_5) // % +#define IT_AMPR LSFT(KC_6) // & +#define IT_SLSH LSFT(KC_7) // / +#define IT_LPRN LSFT(KC_8) // ( +#define IT_RPRN LSFT(KC_9) // ) +#define IT_EQL LSFT(KC_0) // = +#define IT_QST LSFT(IT_APOS) // ? +#define IT_CRC LSFT(IT_IACC) // ^ +#define IT_ASTR LSFT(IT_PLUS) // * +#define IT_MORE LSFT(IT_LESS) // > +#define IT_COLN LSFT(IT_DOT) // : +#define IT_SCLN LSFT(IT_COMM) // ; +#define IT_UNDS LSFT(IT_MINS) // _ + +// Alt Gr-ed characters +#define IT_LCBR ALGR(KC_7) // { +#define IT_LBRC ALGR(IT_EACC) // [ +#define IT_RBRC ALGR(IT_PLUS) // ] +#define IT_RCBR ALGR(KC_0) // } +#define IT_AT ALGR(IT_OACC) // @ +#define IT_EURO ALGR(KC_E) // € +#define IT_PIPE LSFT(IT_BKSL) // | +#define IT_SHRP ALGR(IT_AACC) // # + +#define IT_X_PLUS X_RBRACKET // # + +#endif diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index 9d02efe0..1d1969a6 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -24,28 +24,139 @@ // Normal characters #define UK_HASH KC_NUHS - #define UK_BSLS KC_NUBS // Shifted characters #define UK_NOT LSFT(KC_GRV) -#define UK_QUOT LSFT(KC_2) +#define UK_DQUO LSFT(KC_2) #define UK_PND LSFT(KC_3) - #define UK_AT LSFT(KC_QUOT) #define UK_TILD LSFT(KC_NUHS) - #define UK_PIPE LSFT(KC_NUBS) // Alt Gr-ed characters #define UK_BRKP ALGR(KC_GRV) #define UK_EURO ALGR(KC_4) - #define UK_EACT ALGR(KC_E) #define UK_UACT ALGR(KC_U) #define UK_IACT ALGR(KC_I) #define UK_OACT ALGR(KC_O) - #define UK_AACT ALGR(KC_A) +// Duplicate US keyboard so that we don't have to use it +#define UK_A KC_A +#define UK_B KC_B +#define UK_C KC_C +#define UK_D KC_D +#define UK_E KC_E +#define UK_F KC_F +#define UK_G KC_G +#define UK_H KC_H +#define UK_I KC_I +#define UK_J KC_J +#define UK_K KC_K +#define UK_L KC_L +#define UK_M KC_M +#define UK_N KC_N +#define UK_O KC_O +#define UK_P KC_P +#define UK_Q KC_Q +#define UK_R KC_R +#define UK_S KC_S +#define UK_T KC_T +#define UK_U KC_U +#define UK_V KC_V +#define UK_W KC_W +#define UK_X KC_X +#define UK_Y KC_Y +#define UK_Z KC_Z + +#define UK_1 KC_1 +#define UK_2 KC_2 +#define UK_3 KC_3 +#define UK_4 KC_4 +#define UK_5 KC_5 +#define UK_6 KC_6 +#define UK_7 KC_7 +#define UK_8 KC_8 +#define UK_9 KC_9 +#define UK_0 KC_0 + +#define UK_F1 KC_F1 +#define UK_F2 KC_F2 +#define UK_F3 KC_F3 +#define UK_F4 KC_F4 +#define UK_F5 KC_F5 +#define UK_F6 KC_F6 +#define UK_F7 KC_F7 +#define UK_F8 KC_F8 +#define UK_F9 KC_F9 +#define UK_F10 KC_F10 +#define UK_F11 KC_F11 +#define UK_F12 KC_F12 +#define UK_F13 KC_F13 +#define UK_F14 KC_F14 +#define UK_F15 KC_F15 +#define UK_F16 KC_F16 +#define UK_F17 KC_F17 +#define UK_F18 KC_F18 +#define UK_F19 KC_F19 +#define UK_F20 KC_F20 +#define UK_F21 KC_F21 +#define UK_F22 KC_F22 +#define UK_F23 KC_F23 +#define UK_F24 KC_F24 + +#define UK_SCLN KC_SCLN +#define UK_COMM KC_COMM +#define UK_DOT KC_DOT +#define UK_SLSH KC_SLSH +#define UK_EXLM KC_EXLM +#define UK_UNDS KC_UNDS +#define UK_MINS KC_MINS +#define UK_LCBR KC_LCBR +#define UK_RCBR KC_RCBR +#define UK_DLR KC_DLR +#define UK_PERC KC_PERC +#define UK_PLUS KC_PLUS +#define UK_EQL KC_EQL +#define UK_LPRN KC_LPRN +#define UK_RPRN KC_RPRN +#define UK_CIRC KC_CIRC +#define UK_AMPR KC_AMPR +#define UK_LABK KC_LABK +#define UK_LBRC KC_LBRC +#define UK_RBRC KC_RBRC +#define UK_RABK KC_RABK +#define UK_GRV KC_GRV +#define UK_ASTR KC_ASTR +#define UK_QUOT KC_QUOT + +#define UK_TAB KC_TAB +#define UK_ENT KC_ENT +#define UK_LSFT KC_LSFT +#define UK_LCTL KC_LCTL +#define UK_LALT KC_LALT +#define UK_LGUI KC_LGUI +#define UK_SPC KC_SPC +#define UK_DEL KC_DEL +#define UK_BSPC KC_BSPC +#define UK_RSFT KC_RSFT +#define UK_RCTL KC_RCTL +#define UK_RALT KC_RALT +#define UK_RGUI KC_RGUI +#define UK_ESC KC_ESC +#define UK_PSCR KC_PSCR +#define UK_SLCK KC_SLCK +#define UK_PAUS KC_PAUS +#define UK_INS KC_INS +#define UK_HOME KC_HOME +#define UK_PGUP KC_PGUP +#define UK_END KC_END +#define UK_PGDN KC_PGDN +#define UK_LEFT KC_LEFT +#define UK_RGHT KC_RGHT +#define UK_UP KC_UP +#define UK_DOWN KC_DOWN + #endif diff --git a/quantum/keymap_extras/keymap_workman.h b/quantum/keymap_extras/keymap_workman.h new file mode 100644 index 00000000..97927bf5 --- /dev/null +++ b/quantum/keymap_extras/keymap_workman.h @@ -0,0 +1,83 @@ +/* Copyright 2018 Jacob Jerrell + * + * This 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_WORKMAN_H +#define KEYMAP_WORKMAN_H + +#include "keymap.h" +// For software implementation of workman +#define WK_Q KC_Q +#define WK_D KC_W +#define WK_R KC_E +#define WK_W KC_R +#define WK_B KC_T +#define WK_J KC_Y +#define WK_F KC_U +#define WK_U KC_I +#define WK_P KC_O +#define WK_SCLN KC_P + +#define WK_A KC_A +#define WK_S KC_S +#define WK_H KC_D +#define WK_T KC_F +#define WK_G KC_G +#define WK_Y KC_H +#define WK_N KC_J +#define WK_E KC_K +#define WK_O KC_L +#define WK_I KC_SCLN + +#define WK_Z KC_Z +#define WK_X KC_X +#define WK_M KC_C +#define WK_C KC_V +#define WK_V KC_B +#define WK_K KC_N +#define WK_L KC_M + +// Make it easy to support these in macros +// TODO: change macro implementation so these aren't needed +#define KC_WK_Q WK_Q +#define KC_WK_D WK_D +#define KC_WK_R WK_R +#define KC_WK_W WK_W +#define KC_WK_B WK_B +#define KC_WK_J WK_J +#define KC_WK_F WK_F +#define KC_WK_U WK_U +#define KC_WK_P WK_P +#define KC_WK_SCLN WK_SCLN + +#define KC_WK_A WK_A +#define KC_WK_S WK_S +#define KC_WK_H WK_H +#define KC_WK_T WK_T +#define KC_WK_G WK_G +#define KC_WK_Y WK_Y +#define KC_WK_N WK_N +#define KC_WK_E WK_E +#define KC_WK_O WK_O +#define KC_WK_I WK_I + +#define KC_WK_Z WK_Z +#define KC_WK_X WK_X +#define KC_WK_M WK_M +#define KC_WK_C WK_C +#define KC_WK_V WK_V +#define KC_WK_K WK_K +#define KC_WK_L WK_L + +#endif diff --git a/quantum/keymap_extras/sendstring_spanish.h b/quantum/keymap_extras/sendstring_spanish.h new file mode 100644 index 00000000..71944592 --- /dev/null +++ b/quantum/keymap_extras/sendstring_spanish.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Daniel Rodríguez + * + * This 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 . + */ +/* Sendstring definitions for the Spanish layout */ +#ifndef SENDSTRING_SPANISH +#define SENDSTRING_SPANISH + +#include "keymap_spanish.h" + +const bool ascii_to_shift_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +/* Until an ALT table/functionality is added, the following symbols will not work: + # @ [ ] { } | ~ +*/ +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, +/* , ! " # $ % & ' */ + KC_SPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, ES_APOS, +/* ( ) * + , - . / */ + KC_8, KC_9, ES_PLUS, ES_PLUS, KC_COMM, ES_MINS, KC_DOT, KC_7, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, +/* 8 9 : ; < = > ? */ + KC_8, KC_9, KC_DOT, KC_COMM, KC_NUBS, KC_0, KC_NUBS, ES_APOS, +/* @ A B C D E F G */ + KC_2, 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, +/* X Y Z [ \ ] ^ _ */ + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, ES_GRV, ES_MINS, + ES_GRV, 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_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; + +#endif diff --git a/quantum/keymap_extras/sendstring_workman.h b/quantum/keymap_extras/sendstring_workman.h new file mode 100644 index 00000000..a8571839 --- /dev/null +++ b/quantum/keymap_extras/sendstring_workman.h @@ -0,0 +1,41 @@ +/* Copyright 2018 Jacob Jerrell + * + * This 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 . + */ +/* Sendstring definitions for the Workman layout */ +#ifndef SENDSTRING_WORKMAN +#define SENDSTRING_WORKMAN + +#include "keymap_workman.h" + +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, + KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_2, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + KC_GRV, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + WK_X, WK_Y, WK_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; + +#endif \ No newline at end of file diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index fcce9184..01d99445 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -92,7 +92,9 @@ bool autoshift_state(void) { } bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { +#ifndef AUTO_SHIFT_MODIFIERS static uint8_t any_mod_pressed; +#endif if (record->event.pressed) { switch (keycode) { @@ -170,11 +172,13 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { case KC_COMM: case KC_DOT: case KC_SLSH: + case KC_GRAVE: #endif autoshift_flush(); if (!autoshift_enabled) return true; +#ifndef AUTO_SHIFT_MODIFIERS any_mod_pressed = get_mods() & ( MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)| MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)| @@ -185,6 +189,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { if (any_mod_pressed) { return true; } +#endif autoshift_on(keycode); return false; diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 1addd72e..6e9c28e4 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -22,7 +22,7 @@ __attribute__ ((weak)) -combo_t key_combos[] = { +combo_t key_combos[COMBO_COUNT] = { }; diff --git a/quantum/quantum.h b/quantum/quantum.h index e6d76015..b9424d5c 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -122,6 +122,8 @@ extern uint32_t default_layer_state; #define SS_LCTRL(string) SS_DOWN(X_LCTRL) string SS_UP(X_LCTRL) #define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI) +#define SS_LCMD(string) SS_LGUI(string) +#define SS_LWIN(string) SS_LGUI(string) #define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT) #define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT) #define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index a4ee4d6b..8122bfe7 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -71,11 +71,17 @@ enum quantum_keycodes { QK_TAP_DANCE_MAX = 0x57FF, QK_LAYER_TAP_TOGGLE = 0x5800, QK_LAYER_TAP_TOGGLE_MAX = 0x58FF, + QK_LAYER_MOD = 0x5900, + QK_LAYER_MOD_MAX = 0x59FF, #ifdef STENO_ENABLE QK_STENO = 0x5A00, QK_STENO_BOLT = 0x5A30, QK_STENO_GEMINI = 0x5A31, QK_STENO_MAX = 0x5A3F, +#endif +#ifdef SWAP_HANDS_ENABLE + QK_SWAP_HANDS = 0x5B00, + QK_SWAP_HANDS_MAX = 0x5BFF, #endif QK_MOD_TAP = 0x6000, QK_MOD_TAP_MAX = 0x7FFF, @@ -445,10 +451,14 @@ enum quantum_keycodes { #define LSFT(kc) (kc | QK_LSFT) #define LALT(kc) (kc | QK_LALT) #define LGUI(kc) (kc | QK_LGUI) +#define LCMD(kc) LGUI(kc) +#define LWIN(kc) LGUI(kc) #define RCTL(kc) (kc | QK_RCTL) #define RSFT(kc) (kc | QK_RSFT) #define RALT(kc) (kc | QK_RALT) #define RGUI(kc) (kc | QK_RGUI) +#define RCMD(kc) RGUI(kc) +#define RWIN(kc) RGUI(kc) #define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) #define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) @@ -589,6 +599,9 @@ enum quantum_keycodes { // One-shot layer - 256 layer max #define OSL(layer) (layer | QK_ONE_SHOT_LAYER) +// L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only +#define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 4) | ((mod) & 0xF)) + // One-shot mod #define OSM(mod) ((mod) | QK_ONE_SHOT_MOD) @@ -612,8 +625,14 @@ enum quantum_keycodes { #define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR #define GUI_T(kc) MT(MOD_LGUI, kc) +#define CMD_T(kc) GUI_T(kc) +#define WIN_T(kc) GUI_T(kc) #define LGUI_T(kc) MT(MOD_LGUI, kc) +#define LCMD_T(kc) LGUI_T(kc) +#define LWIN_T(kc) LGUI_T(kc) #define RGUI_T(kc) MT(MOD_RGUI, kc) +#define RCMD_T(kc) RGUI_T(kc) +#define RWIN_T(kc) RGUI_T(kc) #define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal #define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl @@ -641,4 +660,14 @@ enum quantum_keycodes { #define X(n) (n | QK_UNICODE_MAP) #endif +#ifdef SWAP_HANDS_ENABLE + #define SH_T(key) (QK_SWAP_HANDS | key) + #define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE) + #define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE) + #define SH_MON (QK_SWAP_HANDS | OP_SH_ON_OFF) + #define SH_MOFF (QK_SWAP_HANDS | OP_SH_OFF_ON) + #define SH_ON (QK_SWAP_HANDS | OP_SH_ON) + #define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF) +#endif + #endif // QUANTUM_KEYCODES_H diff --git a/quantum/rgblight.c b/quantum/rgblight.c index cc49cdf6..ae183440 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -23,6 +23,10 @@ #include "debug.h" #include "led_tables.h" +#ifndef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 +#endif + __attribute__ ((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; __attribute__ ((weak)) @@ -46,11 +50,9 @@ bool rgblight_timer_enabled = false; void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { uint8_t r = 0, g = 0, b = 0, base, color; - #ifdef RGBLIGHT_LIMIT_VAL - if (val > RGBLIGHT_LIMIT_VAL) { + if (val > RGBLIGHT_LIMIT_VAL) { val=RGBLIGHT_LIMIT_VAL; // limit the val - } - #endif + } if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. r = val; @@ -119,7 +121,7 @@ void eeconfig_update_rgblight_default(void) { rgblight_config.mode = 1; rgblight_config.hue = 0; rgblight_config.sat = 255; - rgblight_config.val = 255; + rgblight_config.val = RGBLIGHT_LIMIT_VAL; eeconfig_update_rgblight(rgblight_config.raw); } void eeconfig_debug_rgblight(void) { @@ -313,8 +315,8 @@ void rgblight_decrease_sat(void) { } void rgblight_increase_val(void) { uint8_t val; - if (rgblight_config.val + RGBLIGHT_VAL_STEP > 255) { - val = 255; + if (rgblight_config.val + RGBLIGHT_VAL_STEP > RGBLIGHT_LIMIT_VAL) { + val = RGBLIGHT_LIMIT_VAL; } else { val = rgblight_config.val + RGBLIGHT_VAL_STEP; } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 73dd8994..8c33f1a8 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -74,6 +74,7 @@ #include "ws2812.h" #endif #include "rgblight_types.h" +#include "rgblight_list.h" extern LED_TYPE led[RGBLED_NUM]; diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h new file mode 100644 index 00000000..5dd480b6 --- /dev/null +++ b/quantum/rgblight_list.h @@ -0,0 +1,59 @@ +/* Copyright 2018 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef RGBLIGHT_LIST_H +#define RGBLIGHT_LIST_H + +/* SET RGB List */ +#define rgblight_setrgb_white() rgblight_setrgb (0xFF, 0xFF, 0xFF) +#define rgblight_setrgb_red() rgblight_setrgb (0xFF, 0x00, 0x00) +#define rgblight_setrgb_coral() rgblight_setrgb (0xFF, 0x7C, 0x4D) +#define rgblight_setrgb_orange() rgblight_setrgb (0xFF, 0x80, 0x00) +#define rgblight_setrgb_goldenrod() rgblight_setrgb (0xD9, 0xA5, 0x21) +#define rgblight_setrgb_gold() rgblight_setrgb (0xFF, 0xD9, 0x00) +#define rgblight_setrgb_yellow() rgblight_setrgb (0xFF, 0xFF, 0x00) +#define rgblight_setrgb_chartreuse() rgblight_setrgb (0x80, 0xFF, 0x00) +#define rgblight_setrgb_green() rgblight_setrgb (0x00, 0xFF, 0x00) +#define rgblight_setrgb_springgreen() rgblight_setrgb (0x00, 0xFF, 0x80) +#define rgblight_setrgb_turquoise() rgblight_setrgb (0x47, 0x6E, 0x6A) +#define rgblight_setrgb_teal() rgblight_setrgb (0x00, 0x80, 0x80) +#define rgblight_setrgb_cyan() rgblight_setrgb (0x00, 0xFF, 0xFF) +#define rgblight_setrgb_azure() rgblight_setrgb (0x99, 0xf5, 0xFF) +#define rgblight_setrgb_blue() rgblight_setrgb (0x00, 0x00, 0xFF) +#define rgblight_setrgb_purple() rgblight_setrgb (0x7A, 0x00, 0xFF) +#define rgblight_setrgb_magenta() rgblight_setrgb (0xFF, 0x00, 0xFF) +#define rgblight_setrgb_pink() rgblight_setrgb (0xFF, 0x80, 0xBF) + +/* SET HSV List */ +#define rgblight_sethsv_white() rgblight_sethsv ( 0, 0, 255) +#define rgblight_sethsv_red() rgblight_sethsv ( 0, 255, 255) +#define rgblight_sethsv_coral() rgblight_sethsv ( 16, 176, 255) +#define rgblight_sethsv_orange() rgblight_sethsv ( 39, 255, 255) +#define rgblight_sethsv_goldenrod() rgblight_sethsv ( 43, 218, 218) +#define rgblight_sethsv_gold() rgblight_sethsv ( 51, 255, 255) +#define rgblight_sethsv_yellow() rgblight_sethsv ( 60, 255, 255) +#define rgblight_sethsv_chartreuse() rgblight_sethsv ( 90, 255, 255) +#define rgblight_sethsv_green() rgblight_sethsv (120, 255, 255) +#define rgblight_sethsv_springgreen() rgblight_sethsv (150, 255, 255) +#define rgblight_sethsv_turquoise() rgblight_sethsv (174, 90, 112) +#define rgblight_sethsv_teal() rgblight_sethsv (180, 255, 128) +#define rgblight_sethsv_cyan() rgblight_sethsv (180, 255, 255) +#define rgblight_sethsv_azure() rgblight_sethsv (186, 102, 255) +#define rgblight_sethsv_blue() rgblight_sethsv (240, 255, 255) +#define rgblight_sethsv_purple() rgblight_sethsv (270, 255, 255) +#define rgblight_sethsv_magenta() rgblight_sethsv (300, 255, 255) +#define rgblight_sethsv_pink() rgblight_sethsv (330, 128, 255) + +#endif diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 853b8f02..bd58bd28 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -9,7 +9,7 @@ SIZE = avr-size AR = avr-ar rcs NM = avr-nm HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature -EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) +EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) BIN = COMMON_VPATH += $(DRIVER_PATH)/avr @@ -124,24 +124,25 @@ qmk: $(BUILD_DIR)/$(TARGET).hex program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size $(PROGRAM_CMD) -teensy: $(BUILD_DIR)/$(TARGET).hex check-size +teensy: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex - -BATCHISP ?= batchisp + +BATCHISP ?= batchisp flip: $(BUILD_DIR)/$(TARGET).hex check-size $(BATCHISP) -hardware usb -device $(MCU) -operation erase f $(BATCHISP) -hardware usb -device $(MCU) -operation loadbuffer $(BUILD_DIR)/$(TARGET).hex program $(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0 - + DFU_PROGRAMMER ?= dfu-programmer +GREP ?= grep dfu: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\ echo "Error: Bootloader not found. Trying again in 5s." ;\ sleep 5 ;\ done - if $(DFU_PROGRAMMER) --version 2>&1 | grep -q 0.7 ; then\ + if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ $(DFU_PROGRAMMER) $(MCU) erase --force;\ else\ $(DFU_PROGRAMMER) $(MCU) erase;\ @@ -161,15 +162,15 @@ flip-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep $(REMOVE) $(BUILD_DIR)/$(TARGET)eep.hex dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep - if $(DFU_PROGRAMMER) --version 2>&1 | grep -q 0.7 ; then\ + if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep;\ else\ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ fi $(DFU_PROGRAMMER) $(MCU) reset -avrdude: $(BUILD_DIR)/$(TARGET).hex check-size - if grep -q -s Microsoft /proc/version; then \ +avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + if $(GREP) -q -s Microsoft /proc/version; then \ echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \ else \ printf "Detecting USB port, reset your controller now."; \ @@ -178,12 +179,12 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size sleep 0.5; \ printf "."; \ ls /dev/tty* > /tmp/2; \ - USB=`comm -13 /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + USB=`comm -13 /tmp/1 /tmp/2 | $(GREP) -o '/dev/tty.*'`; \ mv /tmp/2 /tmp/1; \ done; \ echo ""; \ echo "Detected controller on USB port at $$USB"; \ - if grep -q -s 'MINGW\|MSYS' /proc/version; then \ + if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \ USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ echo "Remapped MSYS2 USB port to $$USB"; \ fi; \ @@ -198,7 +199,7 @@ bin: $(BUILD_DIR)/$(TARGET).hex # copy bin to FLASH.bin flashbin: bin - $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin; + $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin; # Generate avr-gdb config/init file which does the following: # define the reset signal, load the target file, connect to target, and set @@ -249,21 +250,21 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof -bootloader: +bootloader: make -C lib/lufa/Bootloaders/DFU/ clean - echo "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n" > lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "MANUFACTURER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "PRODUCT" $(ALL_CONFIGS) -h | tail -1` Bootloader >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "QMK_ESC_OUTPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "QMK_ESC_INPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "QMK_LED" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo `grep "QMK_SPEAKER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h - echo "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n" > lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "MANUFACTURER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "PRODUCT" $(ALL_CONFIGS) -h | tail -1` Bootloader >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "QMK_ESC_OUTPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "QMK_ESC_INPUT" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "QMK_LED" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e `$(GREP) "QMK_SPEAKER" $(ALL_CONFIGS) -h | tail -1` >> lib/lufa/Bootloaders/DFU/Keyboard.h + echo -e "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h make -C lib/lufa/Bootloaders/DFU/ - echo "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex" + echo -e "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex" cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex -production: $(BUILD_DIR)/$(TARGET).hex bootloader +production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex echo "File sizes:" diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 75b810d9..3e407f15 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -25,11 +25,14 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ ifeq ($(PLATFORM),AVR) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S -endif +endif ifeq ($(PLATFORM),CHIBIOS) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) + TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c + endif endif ifeq ($(PLATFORM),TEST) @@ -124,7 +127,10 @@ ifeq ($(strip $(BLUETOOTH)), RN42) endif ifeq ($(strip $(ONEHAND_ENABLE)), yes) - TMK_COMMON_DEFS += -DONEHAND_ENABLE + SWAP_HANDS_ENABLE = yes # backwards compatibility +endif +ifeq ($(strip $(SWAP_HANDS_ENABLE)), yes) + TMK_COMMON_DEFS += -DSWAP_HANDS_ENABLE endif ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index dd3a5b3e..fff83479 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -44,6 +44,10 @@ int retro_tapping_counter = 0; #include #endif +/** \brief Called to execute an action. + * + * FIXME: Needs documentation. + */ void action_exec(keyevent_t event) { if (!IS_NOEVENT(event)) { @@ -64,7 +68,7 @@ void action_exec(keyevent_t event) fauxclicky_check(); #endif -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE if (!IS_NOEVENT(event)) { process_hand_swap(&event); } @@ -91,9 +95,14 @@ void action_exec(keyevent_t event) #endif } -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE bool swap_hands = false; +bool swap_held = false; +/** \brief Process Hand Swap + * + * FIXME: Needs documentation. + */ void process_hand_swap(keyevent_t *event) { static swap_state_row_t swap_state[MATRIX_ROWS]; @@ -132,6 +141,34 @@ bool process_record_quantum(keyrecord_t *record) { return true; } +#ifndef NO_ACTION_TAPPING +/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. + * + * FIXME: Needs documentation. + */ +void process_record_tap_hint(keyrecord_t *record) +{ + action_t action = layer_switch_get_action(record->event.key); + + switch (action.kind.id) { +#ifdef SWAP_HANDS_ENABLE + case ACT_SWAP_HANDS: + switch (action.swap.code) { + case OP_SH_TAP_TOGGLE: + default: + swap_hands = !swap_hands; + swap_held = true; + } + break; +#endif + } +} +#endif + +/** \brief Take a key event (key press or key release) and processes it. + * + * FIXME: Needs documentation. + */ void process_record(keyrecord_t *record) { if (IS_NOEVENT(record->event)) { return; } @@ -150,6 +187,10 @@ void process_record(keyrecord_t *record) process_action(record, action); } +/** \brief Take an action and processes it. + * + * FIXME: Needs documentation. + */ void process_action(keyrecord_t *record, action_t action) { keyevent_t event = record->event; @@ -524,7 +565,7 @@ void process_action(keyrecord_t *record, action_t action) #endif case ACT_COMMAND: break; -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE case ACT_SWAP_HANDS: switch (action.swap.code) { case OP_SH_TOGGLE: @@ -551,23 +592,37 @@ void process_action(keyrecord_t *record, action_t action) #ifndef NO_ACTION_TAPPING case OP_SH_TAP_TOGGLE: /* tap toggle */ - if (tap_count > 0) { - if (!event.pressed) { + + if (event.pressed) { + if (swap_held) { + swap_held = false; + } else { swap_hands = !swap_hands; } } else { - swap_hands = event.pressed; + if (tap_count < TAPPING_TOGGLE) { + swap_hands = !swap_hands; + } } break; default: + /* tap key */ if (tap_count > 0) { + if (swap_held) { + swap_hands = !swap_hands; // undo hold set up in _tap_hint + swap_held = false; + } if (event.pressed) { register_code(action.swap.code); } else { unregister_code(action.swap.code); + *record = (keyrecord_t){}; // hack: reset tap mode } } else { - swap_hands = event.pressed; + if (swap_held && !event.pressed) { + swap_hands = !swap_hands; // undo hold set up in _tap_hint + swap_held = false; + } } #endif } @@ -638,8 +693,9 @@ void process_action(keyrecord_t *record, action_t action) -/* - * Utilities for actions. +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. */ void register_code(uint8_t code) { @@ -719,6 +775,10 @@ void register_code(uint8_t code) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void unregister_code(uint8_t code) { if (code == KC_NO) { @@ -774,6 +834,10 @@ void unregister_code(uint8_t code) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void register_mods(uint8_t mods) { if (mods) { @@ -782,6 +846,10 @@ void register_mods(uint8_t mods) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void unregister_mods(uint8_t mods) { if (mods) { @@ -790,12 +858,20 @@ void unregister_mods(uint8_t mods) } } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void clear_keyboard(void) { clear_mods(); clear_keyboard_but_mods(); } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void clear_keyboard_but_mods(void) { clear_weak_mods(); @@ -812,6 +888,10 @@ void clear_keyboard_but_mods(void) #endif } +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ bool is_tap_key(keypos_t key) { action_t action = layer_switch_get_action(key); @@ -844,14 +924,19 @@ bool is_tap_key(keypos_t key) } -/* - * debug print +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. */ void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row<<8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void debug_record(keyrecord_t record) { debug_event(record.event); @@ -860,6 +945,10 @@ void debug_record(keyrecord_t record) #endif } +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ void debug_action(action_t action) { switch (action.kind.id) { diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index b9bdfe64..acc55c7d 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -67,7 +67,7 @@ extern bool disable_action_cache; #endif /* Code for handling one-handed key modifiers. */ -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE extern bool swap_hands; extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; #if (MATRIX_COLS <= 8) @@ -96,6 +96,10 @@ void clear_keyboard_but_mods(void); void layer_switch(uint8_t new_layer); bool is_tap_key(keypos_t key); +#ifndef NO_ACTION_TAPPING +void process_record_tap_hint(keyrecord_t *record); +#endif + /* debug */ void debug_event(keyevent_t event); void debug_record(keyrecord_t record); diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 05bc8457..d836b7a8 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -17,10 +17,9 @@ along with this program. If not, see . #ifndef ACTION_CODE_H #define ACTION_CODE_H -/* Action codes - * ============ - * 16bit code: action_kind(4bit) + action_parameter(12bit) +/** \brief Action codes * + * 16bit code: action_kind(4bit) + action_parameter(12bit) * * Key Actions(00xx) * ----------------- @@ -38,7 +37,6 @@ along with this program. If not, see . * 001r|mods|0000 00xx (reserved) * 001r|mods| keycode Modifiers with Tap Key(Dual role) * - * * Other Keys(01xx) * ---------------- * ACT_USAGE(0100): TODO: Not needed? @@ -47,17 +45,14 @@ along with this program. If not, see . * 0100|10| usage(10) (reserved) * 0100|11| usage(10) (reserved) * - * * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? * 0101|xxxx| keycode Mouse key * * ACT_SWAP_HANDS(0110): * 0110|xxxx| keycode Swap hands (keycode on tap, or options) * - * * 0111|xxxx xxxx xxxx (reserved) * - * * Layer Actions(10xx) * ------------------- * ACT_LAYER(1000): @@ -84,7 +79,6 @@ along with this program. If not, see . * 101E|LLLL|1111 xxxx Reserved (0xF5-FF) * ELLLL: layer 0-31(E: extra bit for layer 16-31) * - * * Extensions(11xx) * ---------------- * ACT_MACRO(1100): @@ -126,7 +120,7 @@ enum action_kind_id { }; -/* Action Code Struct +/** \brief Action Code Struct * * NOTE: * In avr-gcc bit field seems to be assigned from LSB(bit0) to MSB(bit15). @@ -186,7 +180,7 @@ typedef union { } func; struct action_swap { uint8_t code :8; - uint8_t opt :4; + uint8_t opt :4; uint8_t kind :4; } swap; } action_t; @@ -198,10 +192,9 @@ typedef union { #define ACTION(kind, param) ((kind)<<12 | (param)) -/* - * Key Actions - */ -/* Mod bits: 43210 +/** \brief Key Actions + * + * Mod bits: 43210 * bit 0 ||||+- Control * bit 1 |||+-- Shift * bit 2 ||+--- Alt @@ -230,8 +223,7 @@ enum mods_codes { #define ACTION_MODS_TAP_TOGGLE(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_TAP_TOGGLE) -/* - * Other Keys +/** \brief Other Keys */ enum usage_pages { PAGE_SYSTEM, @@ -243,21 +235,26 @@ enum usage_pages { -/* - * Layer Actions +/** \brief Layer Actions */ enum layer_param_on { ON_PRESS = 1, ON_RELEASE = 2, ON_BOTH = 3, }; + +/** \brief Layer Actions + */ enum layer_param_bit_op { OP_BIT_AND = 0, OP_BIT_OR = 1, OP_BIT_XOR = 2, OP_BIT_SET = 3, }; -enum layer_pram_tap_op { + +/** \brief Layer Actions + */ +enum layer_param_tap_op { OP_TAP_TOGGLE = 0xF0, OP_ON_OFF, OP_OFF_ON, @@ -296,8 +293,7 @@ enum layer_pram_tap_op { #define ACTION_DEFAULT_LAYER_BIT_SET(part, bits) ACTION_LAYER_BITOP(OP_BIT_SET, (part), (bits), 0) -/* - * Extensions +/** \brief Extensions */ enum backlight_opt { BACKLIGHT_INCREASE = 0, @@ -329,7 +325,7 @@ enum function_opts { #define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | (id)) #define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | (id)) /* OneHand Support */ -enum swap_hands_pram_tap_op { +enum swap_hands_param_tap_op { OP_SH_TOGGLE = 0xF0, OP_SH_TAP_TOGGLE, OP_SH_ON_OFF, diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 22331376..f3cd381a 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -11,16 +11,23 @@ #endif -/* - * Default Layer State +/** \brief Default Layer State */ uint32_t default_layer_state = 0; +/** \brief Default Layer State Set At Keyboard Level + * + * FIXME: Needs docs + */ __attribute__((weak)) uint32_t default_layer_state_set_kb(uint32_t state) { return state; } +/** \brief Default Layer State Set + * + * FIXME: Needs docs + */ static void default_layer_state_set(uint32_t state) { state = default_layer_state_set_kb(state); @@ -31,25 +38,45 @@ static void default_layer_state_set(uint32_t state) clear_keyboard_but_mods(); // To avoid stuck keys } +/** \brief Default Layer Print + * + * FIXME: Needs docs + */ void default_layer_debug(void) { dprintf("%08lX(%u)", default_layer_state, biton32(default_layer_state)); } +/** \brief Default Layer Set + * + * FIXME: Needs docs + */ void default_layer_set(uint32_t state) { default_layer_state_set(state); } #ifndef NO_ACTION_LAYER +/** \brief Default Layer Or + * + * FIXME: Needs docs + */ void default_layer_or(uint32_t state) { default_layer_state_set(default_layer_state | state); } +/** \brief Default Layer And + * + * FIXME: Needs docs + */ void default_layer_and(uint32_t state) { default_layer_state_set(default_layer_state & state); } +/** \brief Default Layer Xor + * + * FIXME: Needs docs + */ void default_layer_xor(uint32_t state) { default_layer_state_set(default_layer_state ^ state); @@ -58,21 +85,32 @@ void default_layer_xor(uint32_t state) #ifndef NO_ACTION_LAYER -/* - * Keymap Layer State +/** \brief Keymap Layer State */ uint32_t layer_state = 0; +/** \brief Layer state set user + * + * FIXME: Needs docs + */ __attribute__((weak)) uint32_t layer_state_set_user(uint32_t state) { return state; } +/** \brief Layer state set keyboard + * + * FIXME: Needs docs + */ __attribute__((weak)) uint32_t layer_state_set_kb(uint32_t state) { return layer_state_set_user(state); } +/** \brief Layer state set + * + * FIXME: Needs docs + */ void layer_state_set(uint32_t state) { state = layer_state_set_kb(state); @@ -83,54 +121,98 @@ void layer_state_set(uint32_t state) clear_keyboard_but_mods(); // To avoid stuck keys } +/** \brief Layer clear + * + * FIXME: Needs docs + */ void layer_clear(void) { layer_state_set(0); } +/** \brief Layer state is + * + * FIXME: Needs docs + */ bool layer_state_is(uint8_t layer) { return layer_state_cmp(layer_state, layer); } +/** \brief Layer state compare + * + * FIXME: Needs docs + */ bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { if (!cmp_layer_state) { return layer == 0; } return (cmp_layer_state & (1UL<. #ifndef NO_ACTION_MACRO #define MACRO_READ() (macro = MACRO_GET(macro_p++)) +/** \brief Action Macro Play + * + * FIXME: Needs doc + */ void action_macro_play(const macro_t *macro_p) { macro_t macro = END; diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index 531a3ca3..8adf013e 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -36,6 +36,10 @@ static void debug_tapping_key(void); static void debug_waiting_buffer(void); +/** \brief Action Tapping Process + * + * FIXME: Needs doc + */ void action_tapping_process(keyrecord_t record) { if (process_tapping(&record)) { @@ -70,7 +74,7 @@ void action_tapping_process(keyrecord_t record) } -/* Tapping +/** \brief Tapping * * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. * (without interfering by typing other key) @@ -263,7 +267,7 @@ bool process_tapping(keyrecord_t *keyp) return true; } } else { - // FIX: process_aciton here? + // FIX: process_action here? // timeout. no sequential tap. debug("Tapping: End(Timeout after releasing last tap): "); debug_event(event); debug("\n"); @@ -277,6 +281,7 @@ bool process_tapping(keyrecord_t *keyp) if (event.pressed && is_tap_key(event.key)) { debug("Tapping: Start(Press tap key).\n"); tapping_key = *keyp; + process_record_tap_hint(&tapping_key); waiting_buffer_scan_tap(); debug_tapping_key(); return true; @@ -288,8 +293,9 @@ bool process_tapping(keyrecord_t *keyp) } -/* - * Waiting buffer +/** \brief Waiting buffer enq + * + * FIXME: Needs docs */ bool waiting_buffer_enq(keyrecord_t record) { @@ -309,12 +315,20 @@ bool waiting_buffer_enq(keyrecord_t record) return true; } +/** \brief Waiting buffer clear + * + * FIXME: Needs docs + */ void waiting_buffer_clear(void) { waiting_buffer_head = 0; waiting_buffer_tail = 0; } +/** \brief Waiting buffer typed + * + * FIXME: Needs docs + */ bool waiting_buffer_typed(keyevent_t event) { for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { @@ -325,6 +339,10 @@ bool waiting_buffer_typed(keyevent_t event) return false; } +/** \brief Waiting buffer has anykey pressed + * + * FIXME: Needs docs + */ __attribute__((unused)) bool waiting_buffer_has_anykey_pressed(void) { @@ -334,7 +352,10 @@ bool waiting_buffer_has_anykey_pressed(void) return false; } -/* scan buffer for tapping */ +/** \brief Scan buffer for tapping + * + * FIXME: Needs docs + */ void waiting_buffer_scan_tap(void) { // tapping already is settled @@ -358,14 +379,19 @@ void waiting_buffer_scan_tap(void) } -/* - * debug print +/** \brief Tapping key debug print + * + * FIXME: Needs docs */ static void debug_tapping_key(void) { debug("TAPPING_KEY="); debug_record(tapping_key); debug("\n"); } +/** \brief Waiting buffer debug print + * + * FIXME: Needs docs + */ static void debug_waiting_buffer(void) { debug("{ "); diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c index 148162a5..afd4ae8b 100644 --- a/tmk_core/common/action_util.c +++ b/tmk_core/common/action_util.c @@ -67,12 +67,12 @@ bool has_oneshot_mods_timed_out(void) { /* oneshot layer */ #ifndef NO_ACTION_ONESHOT -/* oneshot_layer_data bits -* LLLL LSSS -* where: -* L => are layer bits -* S => oneshot state bits -*/ +/** \brief oneshot_layer_data bits + * LLLL LSSS + * where: + * L => are layer bits + * S => oneshot state bits + */ static int8_t oneshot_layer_data = 0; inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; } @@ -86,7 +86,10 @@ inline bool has_oneshot_layer_timed_out() { } #endif -/* Oneshot layer */ +/** \brief Set oneshot layer + * + * FIXME: needs doc + */ void set_oneshot_layer(uint8_t layer, uint8_t state) { oneshot_layer_data = layer << 3 | state; @@ -95,12 +98,20 @@ void set_oneshot_layer(uint8_t layer, uint8_t state) oneshot_layer_time = timer_read(); #endif } +/** \brief Reset oneshot layer + * + * FIXME: needs doc + */ void reset_oneshot_layer(void) { oneshot_layer_data = 0; #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) oneshot_layer_time = 0; #endif } +/** \brief Clear oneshot layer + * + * FIXME: needs doc + */ void clear_oneshot_layer_state(oneshot_fullfillment_t state) { uint8_t start_state = oneshot_layer_data; @@ -112,12 +123,20 @@ void clear_oneshot_layer_state(oneshot_fullfillment_t state) #endif } } +/** \brief Is oneshot layer active + * + * FIXME: needs doc + */ bool is_oneshot_layer_active(void) { return get_oneshot_layer_state(); } #endif +/** \brief Send keyboard report + * + * FIXME: needs doc + */ void send_keyboard_report(void) { keyboard_report->mods = real_mods; keyboard_report->mods |= weak_mods; @@ -140,29 +159,90 @@ void send_keyboard_report(void) { host_keyboard_send(keyboard_report); } -/* modifier */ +/** \brief Get mods + * + * FIXME: needs doc + */ uint8_t get_mods(void) { return real_mods; } +/** \brief add mods + * + * FIXME: needs doc + */ void add_mods(uint8_t mods) { real_mods |= mods; } +/** \brief del mods + * + * FIXME: needs doc + */ void del_mods(uint8_t mods) { real_mods &= ~mods; } +/** \brief set mods + * + * FIXME: needs doc + */ void set_mods(uint8_t mods) { real_mods = mods; } +/** \brief clear mods + * + * FIXME: needs doc + */ void clear_mods(void) { real_mods = 0; } -/* weak modifier */ +/** \brief get weak mods + * + * FIXME: needs doc + */ uint8_t get_weak_mods(void) { return weak_mods; } +/** \brief add weak mods + * + * FIXME: needs doc + */ void add_weak_mods(uint8_t mods) { weak_mods |= mods; } +/** \brief del weak mods + * + * FIXME: needs doc + */ void del_weak_mods(uint8_t mods) { weak_mods &= ~mods; } +/** \brief set weak mods + * + * FIXME: needs doc + */ void set_weak_mods(uint8_t mods) { weak_mods = mods; } +/** \brief clear weak mods + * + * FIXME: needs doc + */ void clear_weak_mods(void) { weak_mods = 0; } /* macro modifier */ +/** \brief get macro mods + * + * FIXME: needs doc + */ uint8_t get_macro_mods(void) { return macro_mods; } +/** \brief add macro mods + * + * FIXME: needs doc + */ void add_macro_mods(uint8_t mods) { macro_mods |= mods; } +/** \brief del macro mods + * + * FIXME: needs doc + */ void del_macro_mods(uint8_t mods) { macro_mods &= ~mods; } +/** \brief set macro mods + * + * FIXME: needs doc + */ void set_macro_mods(uint8_t mods) { macro_mods = mods; } +/** \brief clear macro mods + * + * FIXME: needs doc + */ void clear_macro_mods(void) { macro_mods = 0; } -/* Oneshot modifier */ #ifndef NO_ACTION_ONESHOT +/** \brief set oneshot mods + * + * FIXME: needs doc + */ void set_oneshot_mods(uint8_t mods) { oneshot_mods = mods; @@ -170,6 +250,10 @@ void set_oneshot_mods(uint8_t mods) oneshot_time = timer_read(); #endif } +/** \brief clear oneshot mods + * + * FIXME: needs doc + */ void clear_oneshot_mods(void) { oneshot_mods = 0; @@ -177,14 +261,19 @@ void clear_oneshot_mods(void) oneshot_time = 0; #endif } +/** \brief get oneshot mods + * + * FIXME: needs doc + */ uint8_t get_oneshot_mods(void) { return oneshot_mods; } #endif -/* - * inspect keyboard state +/** \brief inspect keyboard state + * + * FIXME: needs doc */ uint8_t has_anymod(void) { diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index ee150817..d89c8d76 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -13,12 +13,11 @@ #endif -/* Bootloader Size in *bytes* +/** \brief Bootloader Size in *bytes* * * 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'. * - * * Size of Bootloaders in bytes: * Atmel DFU loader(ATmega32U4) 4096 * Atmel DFU loader(AT90USB128) 8192 @@ -28,10 +27,8 @@ * Teensy halfKay(ATmega32U4) 512 * Teensy++ halfKay(AT90USB128) 1024 * - * * AVR Boot section is located at the end of Flash memory like the followings. * - * * byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB128) * 0x0000 +---------------+ 0x00000 +---------------+ * | | | | @@ -57,7 +54,6 @@ * | Bootloader | 512B | Bootloader | 1KB * 0x7FFF +---------------+ 0x1FFFF +---------------+ */ - #define FLASH_SIZE (FLASHEND + 1L) #if !defined(BOOTLOADER_SIZE) @@ -69,14 +65,17 @@ #define BOOT_SIZE_1024 0b010 #define BOOT_SIZE_2048 0b000 -/* - * Entering the Bootloader via Software +/** \brief Entering the Bootloader via Software + * * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html */ #define BOOTLOADER_RESET_KEY 0xB007B007 uint32_t reset_key __attribute__ ((section (".noinit"))); -/* initialize MCU status by watchdog reset */ +/** \brief initialize MCU status by watchdog reset + * + * FIXME: needs doc + */ void bootloader_jump(void) { #if !defined(BOOTLOADER_SIZE) diff --git a/tmk_core/common/avr/sleep_led.c b/tmk_core/common/avr/sleep_led.c index dab3eb0f..0cb774c8 100644 --- a/tmk_core/common/avr/sleep_led.c +++ b/tmk_core/common/avr/sleep_led.c @@ -18,6 +18,10 @@ */ #define SLEEP_LED_TIMER_TOP F_CPU/(256*64) +/** \brief Sleep LED initialization + * + * FIXME: needs doc + */ void sleep_led_init(void) { /* Timer1 setup */ @@ -33,18 +37,30 @@ void sleep_led_init(void) SREG = sreg; } +/** \brief Sleep LED enable + * + * FIXME: needs doc + */ void sleep_led_enable(void) { /* Enable Compare Match Interrupt */ TIMSK1 |= _BV(OCIE1A); } +/** \brief Sleep LED disable + * + * FIXME: needs doc + */ void sleep_led_disable(void) { /* Disable Compare Match Interrupt */ TIMSK1 &= ~_BV(OCIE1A); } +/** \brief Sleep LED toggle + * + * FIXME: needs doc + */ void sleep_led_toggle(void) { /* Disable Compare Match Interrupt */ @@ -52,7 +68,8 @@ void sleep_led_toggle(void) } -/* Breathing Sleep LED brighness(PWM On period) table +/** \brief Breathing Sleep LED brighness(PWM On period) table + * * (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle * * http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63 diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 1c7618ff..81e42664 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -19,6 +19,9 @@ #include "audio.h" #endif /* AUDIO_ENABLE */ +#ifdef RGBLIGHT_SLEEP + #include "rgblight.h" +#endif #define wdt_intr_enable(value) \ @@ -38,6 +41,10 @@ __asm__ __volatile__ ( \ ) +/** \brief Suspend idle + * + * FIXME: needs doc + */ void suspend_idle(uint8_t time) { cli(); @@ -49,7 +56,8 @@ void suspend_idle(uint8_t time) } #ifndef NO_SUSPEND_POWER_DOWN -/* Power down MCU with watchdog timer +/** \brief Power down MCU with watchdog timer + * * wdto: watchdog timer timeout defined in * WDTO_15MS * WDTO_30MS @@ -64,6 +72,10 @@ void suspend_idle(uint8_t time) */ static uint8_t wdt_timeout = 0; +/** \brief Power down + * + * FIXME: needs doc + */ static void power_down(uint8_t wdto) { #ifdef PROTOCOL_LUFA @@ -85,7 +97,12 @@ static void power_down(uint8_t wdto) // This sometimes disables the start-up noise, so it's been disabled // stop_all_notes(); #endif /* AUDIO_ENABLE */ - +#ifdef RGBLIGHT_SLEEP +#ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); +#endif + rgblight_disable(); +#endif // TODO: more power saving // See PicoPower application note // - I/O port input with pullup @@ -103,6 +120,10 @@ static void power_down(uint8_t wdto) } #endif +/** \brief Suspend power down + * + * FIXME: needs doc + */ void suspend_power_down(void) { #ifndef NO_SUSPEND_POWER_DOWN @@ -123,7 +144,10 @@ bool suspend_wakeup_condition(void) return false; } -// run immediately after wakeup +/** \brief run immediately after wakeup + * + * FIXME: needs doc + */ void suspend_wakeup_init(void) { // clear keyboard state @@ -132,6 +156,12 @@ void suspend_wakeup_init(void) backlight_init(); #endif led_set(host_keyboard_leds()); +#ifdef RGBLIGHT_SLEEP + rgblight_enable(); +#ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_enable(); +#endif +#endif } #ifndef NO_SUSPEND_POWER_DOWN diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c index 36901520..b7d4f060 100644 --- a/tmk_core/common/avr/timer.c +++ b/tmk_core/common/avr/timer.c @@ -27,6 +27,10 @@ along with this program. If not, see . // NOTE: union { uint32_t timer32; struct { uint16_t dummy; uint16_t timer16; }} volatile uint32_t timer_count; +/** \brief timer initialization + * + * FIXME: needs doc + */ void timer_init(void) { #if TIMER_PRESCALER == 1 @@ -60,6 +64,10 @@ void timer_init(void) #endif } +/** \brief timer clear + * + * FIXME: needs doc + */ inline void timer_clear(void) { @@ -68,6 +76,10 @@ void timer_clear(void) } } +/** \brief timer read + * + * FIXME: needs doc + */ inline uint16_t timer_read(void) { @@ -80,6 +92,10 @@ uint16_t timer_read(void) return (t & 0xFFFF); } +/** \brief timer read32 + * + * FIXME: needs doc + */ inline uint32_t timer_read32(void) { @@ -92,6 +108,10 @@ uint32_t timer_read32(void) return t; } +/** \brief timer elapsed + * + * FIXME: needs doc + */ inline uint16_t timer_elapsed(uint16_t last) { @@ -104,6 +124,10 @@ uint16_t timer_elapsed(uint16_t last) return TIMER_DIFF_16((t & 0xFFFF), last); } +/** \brief timer elapsed32 + * + * FIXME: needs doc + */ inline uint32_t timer_elapsed32(uint32_t last) { diff --git a/tmk_core/common/backlight.c b/tmk_core/common/backlight.c index 12f75b38..3e29aacc 100644 --- a/tmk_core/common/backlight.c +++ b/tmk_core/common/backlight.c @@ -21,6 +21,10 @@ along with this program. If not, see . backlight_config_t backlight_config; +/** \brief Backlight initialization + * + * FIXME: needs doc + */ void backlight_init(void) { /* check signature */ @@ -34,6 +38,10 @@ void backlight_init(void) backlight_set(backlight_config.enable ? backlight_config.level : 0); } +/** \brief Backlight increase + * + * FIXME: needs doc + */ void backlight_increase(void) { if(backlight_config.level < BACKLIGHT_LEVELS) @@ -46,6 +54,10 @@ void backlight_increase(void) backlight_set(backlight_config.level); } +/** \brief Backlight decrease + * + * FIXME: needs doc + */ void backlight_decrease(void) { if(backlight_config.level > 0) @@ -58,6 +70,10 @@ void backlight_decrease(void) backlight_set(backlight_config.level); } +/** \brief Backlight toggle + * + * FIXME: needs doc + */ void backlight_toggle(void) { backlight_config.enable ^= 1; @@ -68,6 +84,10 @@ void backlight_toggle(void) backlight_set(backlight_config.enable ? backlight_config.level : 0); } +/** \brief Backlight step through levels + * + * FIXME: needs doc + */ void backlight_step(void) { backlight_config.level++; @@ -81,6 +101,10 @@ void backlight_step(void) backlight_set(backlight_config.level); } +/** \brief Backlight set level + * + * FIXME: needs doc + */ void backlight_level(uint8_t level) { if (level > BACKLIGHT_LEVELS) @@ -91,6 +115,10 @@ void backlight_level(uint8_t level) backlight_set(backlight_config.level); } +/** \brief Get backlight level + * + * FIXME: needs doc + */ uint8_t get_backlight_level(void) { return backlight_config.level; diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index 2c6bcbae..9f79fb8e 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -12,6 +12,10 @@ keymap_config_t keymap_config; +/** \brief Bootmagic + * + * FIXME: needs doc + */ void bootmagic(void) { /* check signature */ @@ -102,6 +106,10 @@ void bootmagic(void) } } +/** \brief Scan Keycode + * + * FIXME: needs doc + */ static bool scan_keycode(uint8_t keycode) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { @@ -117,9 +125,13 @@ static bool scan_keycode(uint8_t keycode) return false; } +/** \brief Bootmagic Scan Keycode + * + * FIXME: needs doc + */ bool bootmagic_scan_keycode(uint8_t keycode) { if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false; return scan_keycode(keycode); -} \ No newline at end of file +} diff --git a/tmk_core/common/bootmagic.h b/tmk_core/common/bootmagic.h index 8f6618f4..f3ea6a24 100644 --- a/tmk_core/common/bootmagic.h +++ b/tmk_core/common/bootmagic.h @@ -2,6 +2,8 @@ #define BOOTMAGIC_H +/* FIXME: Add special doxygen comments for defines here. */ + /* bootmagic salt key */ #ifndef BOOTMAGIC_KEY_SALT #define BOOTMAGIC_KEY_SALT KC_SPACE diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 2dd3ade3..f9895237 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -13,11 +13,19 @@ extern uint32_t __ram0_end__; #define MAGIC_ADDR (unsigned long*)(SYMVAL(__ram0_end__) - 4) +/** \brief Jump to the bootloader + * + * FIXME: needs doc + */ void bootloader_jump(void) { *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader NVIC_SystemReset(); } +/** \brief Enter bootloader mode if requested + * + * FIXME: needs doc + */ void enter_bootloader_mode_if_requested(void) { unsigned long* check = MAGIC_ADDR; if(*check == BOOTLOADER_MAGIC) { diff --git a/tmk_core/common/chibios/eeprom.c b/tmk_core/common/chibios/eeprom.c index 5ff8ee86..9061b790 100644 --- a/tmk_core/common/chibios/eeprom.c +++ b/tmk_core/common/chibios/eeprom.c @@ -79,6 +79,10 @@ #define EEESIZE 0x39 #endif +/** \brief eeprom initialization + * + * FIXME: needs doc + */ void eeprom_initialize(void) { uint32_t count=0; @@ -111,6 +115,10 @@ void eeprom_initialize(void) #define FlexRAM ((uint8_t *)0x14000000) +/** \brief eeprom read byte + * + * FIXME: needs doc + */ uint8_t eeprom_read_byte(const uint8_t *addr) { uint32_t offset = (uint32_t)addr; @@ -119,6 +127,10 @@ uint8_t eeprom_read_byte(const uint8_t *addr) return FlexRAM[offset]; } +/** \brief eeprom read word + * + * FIXME: needs doc + */ uint16_t eeprom_read_word(const uint16_t *addr) { uint32_t offset = (uint32_t)addr; @@ -127,6 +139,10 @@ uint16_t eeprom_read_word(const uint16_t *addr) return *(uint16_t *)(&FlexRAM[offset]); } +/** \brief eeprom read dword + * + * FIXME: needs doc + */ uint32_t eeprom_read_dword(const uint32_t *addr) { uint32_t offset = (uint32_t)addr; @@ -135,6 +151,10 @@ uint32_t eeprom_read_dword(const uint32_t *addr) return *(uint32_t *)(&FlexRAM[offset]); } +/** \brief eeprom read block + * + * FIXME: needs doc + */ void eeprom_read_block(void *buf, const void *addr, uint32_t len) { uint32_t offset = (uint32_t)addr; @@ -148,11 +168,19 @@ void eeprom_read_block(void *buf, const void *addr, uint32_t len) } } +/** \brief eeprom is ready + * + * FIXME: needs doc + */ int eeprom_is_ready(void) { return (FTFL->FCNFG & FTFL_FCNFG_EEERDY) ? 1 : 0; } +/** \brief flexram wait + * + * FIXME: needs doc + */ static void flexram_wait(void) { while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) { @@ -160,6 +188,10 @@ static void flexram_wait(void) } } +/** \brief eeprom_write_byte + * + * FIXME: needs doc + */ void eeprom_write_byte(uint8_t *addr, uint8_t value) { uint32_t offset = (uint32_t)addr; @@ -172,6 +204,10 @@ void eeprom_write_byte(uint8_t *addr, uint8_t value) } } +/** \brief eeprom write word + * + * FIXME: needs doc + */ void eeprom_write_word(uint16_t *addr, uint16_t value) { uint32_t offset = (uint32_t)addr; @@ -199,6 +235,10 @@ void eeprom_write_word(uint16_t *addr, uint16_t value) #endif } +/** \brief eeprom write dword + * + * FIXME: needs doc + */ void eeprom_write_dword(uint32_t *addr, uint32_t value) { uint32_t offset = (uint32_t)addr; @@ -242,6 +282,10 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) #endif } +/** \brief eeprom write block + * + * FIXME: needs doc + */ void eeprom_write_block(const void *buf, void *addr, uint32_t len) { uint32_t offset = (uint32_t)addr; diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 7c3c7538..32ef773e 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -12,11 +12,19 @@ #include "suspend.h" #include "wait.h" +/** \brief suspend idle + * + * FIXME: needs doc + */ void suspend_idle(uint8_t time) { // TODO: this is not used anywhere - what units is 'time' in? wait_ms(time); } +/** \brief suspend power down + * + * FIXME: needs doc + */ void suspend_power_down(void) { // TODO: figure out what to power down and how // shouldn't power down TPM/FTM if we want a breathing LED @@ -28,6 +36,10 @@ void suspend_power_down(void) { wait_ms(17); } +/** \brief suspend wakeup condition + * + * FIXME: needs doc + */ __attribute__ ((weak)) void matrix_power_up(void) {} __attribute__ ((weak)) void matrix_power_down(void) {} bool suspend_wakeup_condition(void) @@ -41,7 +53,11 @@ bool suspend_wakeup_condition(void) return false; } -// run immediately after wakeup +/** \brief suspend wakeup condition + * + * run immediately after wakeup + * FIXME: needs doc + */ void suspend_wakeup_init(void) { // clear keyboard state diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index a729e4b1..d9d89ba0 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -18,6 +18,8 @@ along with this program. If not, see . #ifndef COMMAND_H #define COMMAND +/* FIXME: Add doxygen comments for the behavioral defines in here. */ + /* TODO: Refactoring */ typedef enum { ONESHOT, CONSOLE, MOUSEKEY } command_state_t; extern command_state_t command_state; @@ -154,4 +156,4 @@ bool command_proc(uint8_t code); #define XMAGIC_KC(key) KC_##key #define MAGIC_KC(key) XMAGIC_KC(key) -#endif \ No newline at end of file +#endif diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index e2eb4a38..91c18e2e 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -3,6 +3,10 @@ #include "eeprom.h" #include "eeconfig.h" +/** \brief eeconfig initialization + * + * FIXME: needs doc + */ void eeconfig_init(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); @@ -24,36 +28,88 @@ void eeconfig_init(void) #endif } +/** \brief eeconfig enable + * + * FIXME: needs doc + */ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); } +/** \brief eeconfig disable + * + * FIXME: needs doc + */ void eeconfig_disable(void) { eeprom_update_word(EECONFIG_MAGIC, 0xFFFF); } +/** \brief eeconfig is enabled + * + * FIXME: needs doc + */ bool eeconfig_is_enabled(void) { return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); } +/** \brief eeconfig read debug + * + * FIXME: needs doc + */ uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } +/** \brief eeconfig update debug + * + * FIXME: needs doc + */ void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val); } +/** \brief eeconfig read default layer + * + * FIXME: needs doc + */ uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } +/** \brief eeconfig update default layer + * + * FIXME: needs doc + */ void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DEFAULT_LAYER, val); } +/** \brief eeconfig read keymap + * + * FIXME: needs doc + */ uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } +/** \brief eeconfig update keymap + * + * FIXME: needs doc + */ void eeconfig_update_keymap(uint8_t val) { eeprom_update_byte(EECONFIG_KEYMAP, val); } #ifdef BACKLIGHT_ENABLE +/** \brief eeconfig read backlight + * + * FIXME: needs doc + */ uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } +/** \brief eeconfig update backlight + * + * FIXME: needs doc + */ void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); } #endif #ifdef AUDIO_ENABLE +/** \brief eeconfig read audio + * + * FIXME: needs doc + */ uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } +/** \brief eeconfig update audio + * + * FIXME: needs doc + */ void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); } #endif diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 001fb00c..4eff764e 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -117,19 +117,35 @@ static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata) #endif +/** \brief matrix_setup + * + * FIXME: needs doc + */ __attribute__ ((weak)) void matrix_setup(void) { } +/** \brief keyboard_setup + * + * FIXME: needs doc + */ void keyboard_setup(void) { matrix_setup(); } +/** \brief is_keyboard_master + * + * FIXME: needs doc + */ __attribute__((weak)) bool is_keyboard_master(void) { return true; } +/** \brief keyboard_init + * + * FIXME: needs doc + */ void keyboard_init(void) { timer_init(); matrix_init(); @@ -167,8 +183,16 @@ void keyboard_init(void) { #endif } -/* - * Do keyboard routine jobs: scan matrix, light LEDs, ... +/** \brief Keyboard task: Do keyboard routine jobs + * + * Do routine keyboard jobs: + * + * * scan matrix + * * handle mouse movements + * * run visualizer code + * * handle midi commands + * * light LEDs + * * This is repeatedly called as fast as possible. */ void keyboard_task(void) @@ -274,6 +298,10 @@ MATRIX_LOOP_END: } } +/** \brief keyboard set leds + * + * FIXME: needs doc + */ void keyboard_set_leds(uint8_t leds) { if (debug_keyboard) { debug("keyboard_set_led: "); debug_hex8(leds); debug("\n"); } diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index a1e0bc9a..734c9fbf 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -22,6 +22,7 @@ along with this program. If not, see . #ifndef KEYCODE_H #define KEYCODE_H +/* FIXME: Add doxygen comments here */ #define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED) #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) @@ -167,6 +168,11 @@ along with this program. If not, see . /* Transparent */ #define KC_TRANSPARENT 1 #define KC_TRNS KC_TRANSPARENT +/* GUI key aliases */ +#define KC_LCMD KC_LGUI +#define KC_LWIN KC_LGUI +#define KC_RCMD KC_RGUI +#define KC_RWIN KC_RGUI diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index 61c971c1..c1630512 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -19,6 +19,7 @@ along with this program. If not, see . #define LED_H #include "stdint.h" +/* FIXME: Add doxygen comments here. */ /* keyboard LEDs */ #define USB_LED_NUM_LOCK 0 @@ -40,4 +41,4 @@ void led_init_ports(void); } #endif -#endif \ No newline at end of file +#endif diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c index 49617a3d..714acc0f 100644 --- a/tmk_core/common/magic.c +++ b/tmk_core/common/magic.c @@ -14,6 +14,10 @@ keymap_config_t keymap_config; +/** \brief Magic + * + * FIXME: Needs doc + */ void magic(void) { /* check signature */ diff --git a/tmk_core/common/report.c b/tmk_core/common/report.c index 4b25f442..eb3b4431 100644 --- a/tmk_core/common/report.c +++ b/tmk_core/common/report.c @@ -20,6 +20,10 @@ #include "debug.h" #include "util.h" +/** \brief has_anykey + * + * FIXME: Needs doc + */ uint8_t has_anykey(report_keyboard_t* keyboard_report) { uint8_t cnt = 0; @@ -30,6 +34,10 @@ uint8_t has_anykey(report_keyboard_t* keyboard_report) return cnt; } +/** \brief get_first_key + * + * FIXME: Needs doc + */ uint8_t get_first_key(report_keyboard_t* keyboard_report) { #ifdef NKRO_ENABLE @@ -54,6 +62,10 @@ uint8_t get_first_key(report_keyboard_t* keyboard_report) #endif } +/** \brief add key byte + * + * FIXME: Needs doc + */ void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { #ifdef USB_6KRO_ENABLE @@ -120,6 +132,10 @@ void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code) #endif } +/** \brief del key byte + * + * FIXME: Needs doc + */ void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { #ifdef USB_6KRO_ENABLE @@ -157,6 +173,10 @@ void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code) } #ifdef NKRO_ENABLE +/** \brief add key bit + * + * FIXME: Needs doc + */ void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code) { if ((code>>3) < KEYBOARD_REPORT_BITS) { @@ -166,6 +186,10 @@ void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code) } } +/** \brief del key bit + * + * FIXME: Needs doc + */ void del_key_bit(report_keyboard_t* keyboard_report, uint8_t code) { if ((code>>3) < KEYBOARD_REPORT_BITS) { @@ -176,6 +200,10 @@ void del_key_bit(report_keyboard_t* keyboard_report, uint8_t code) } #endif +/** \brief add key to report + * + * FIXME: Needs doc + */ void add_key_to_report(report_keyboard_t* keyboard_report, uint8_t key) { #ifdef NKRO_ENABLE @@ -187,6 +215,10 @@ void add_key_to_report(report_keyboard_t* keyboard_report, uint8_t key) add_key_byte(keyboard_report, key); } +/** \brief del key from report + * + * FIXME: Needs doc + */ void del_key_from_report(report_keyboard_t* keyboard_report, uint8_t key) { #ifdef NKRO_ENABLE @@ -198,6 +230,10 @@ void del_key_from_report(report_keyboard_t* keyboard_report, uint8_t key) del_key_byte(keyboard_report, key); } +/** \brief clear key from report + * + * FIXME: Needs doc + */ void clear_keys_from_report(report_keyboard_t* keyboard_report) { // not clear mods diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index a1cab98a..cb918d3d 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -141,6 +141,10 @@ USB_ClassInfo_CDC_Device_t cdc_device = #ifdef RAW_ENABLE +/** \brief Raw HID Send + * + * FIXME: Needs doc + */ void raw_hid_send( uint8_t *data, uint8_t length ) { // TODO: implement variable size packet @@ -172,6 +176,10 @@ void raw_hid_send( uint8_t *data, uint8_t length ) Endpoint_SelectEndpoint(ep); } +/** \brief Raw HID Receive + * + * FIXME: Needs doc + */ __attribute__ ((weak)) void raw_hid_receive( uint8_t *data, uint8_t length ) { @@ -180,6 +188,10 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) // so users can opt to not handle data coming in. } +/** \brief Raw HID Task + * + * FIXME: Needs doc + */ static void raw_hid_task(void) { // Create a temporary buffer to hold the read in data from the host @@ -218,6 +230,10 @@ static void raw_hid_task(void) * Console ******************************************************************************/ #ifdef CONSOLE_ENABLE +/** \brief Console Task + * + * FIXME: Needs doc + */ static void Console_Task(void) { /* Device must be connected and configured for the task to run */ @@ -282,6 +298,10 @@ static void Console_Task(void) * 2) EVENT_USB_Device_Reset * 3) EVENT_USB_Device_Wake */ +/** \brief Event USB Device Connect + * + * FIXME: Needs doc + */ void EVENT_USB_Device_Connect(void) { print("[C]"); @@ -293,6 +313,10 @@ void EVENT_USB_Device_Connect(void) } } +/** \brief Event USB Device Connect + * + * FIXME: Needs doc + */ void EVENT_USB_Device_Disconnect(void) { print("[D]"); @@ -307,11 +331,19 @@ void EVENT_USB_Device_Disconnect(void) */ } +/** \brief Event USB Device Connect + * + * FIXME: Needs doc + */ void EVENT_USB_Device_Reset(void) { print("[R]"); } +/** \brief Event USB Device Connect + * + * FIXME: Needs doc + */ void EVENT_USB_Device_Suspend() { print("[S]"); @@ -320,6 +352,10 @@ void EVENT_USB_Device_Suspend() #endif } +/** \brief Event USB Device Connect + * + * FIXME: Needs doc + */ void EVENT_USB_Device_WakeUp() { print("[W]"); @@ -342,7 +378,11 @@ static bool console_flush = false; } \ } while (0) -// called every 1ms +/** \brief Event USB Device Start Of Frame + * + * FIXME: Needs doc + * called every 1ms + */ void EVENT_USB_Device_StartOfFrame(void) { static uint8_t count; @@ -356,11 +396,12 @@ void EVENT_USB_Device_StartOfFrame(void) #endif -/** Event handler for the USB_ConfigurationChanged event. +/** \brief Event handler for the USB_ConfigurationChanged event. + * * This is fired when the host sets the current configuration of the USB device after enumeration. * * ATMega32u2 supports dual bank(ping-pong mode) only on endpoint 3 and 4, - * it is safe to use singl bank for all endpoints. + * it is safe to use single bank for all endpoints. */ void EVENT_USB_Device_ConfigurationChanged(void) { @@ -418,7 +459,7 @@ void EVENT_USB_Device_ConfigurationChanged(void) #endif } -/* +/* FIXME: Expose this table in the docs somehow Appendix G: HID Request Support Requirements The following table enumerates the requests that need to be supported by various types of HID class devices. @@ -431,7 +472,8 @@ Boot Keyboard Required Optional Required Required Required Requ Non-Boot Keybrd Required Optional Required Required Optional Optional Other Device Required Optional Optional Optional Optional Optional */ -/** Event handler for the USB_ControlRequest event. +/** \brief Event handler for the USB_ControlRequest event. + * * This is fired before passing along unhandled control requests to the library for processing internally. */ void EVENT_USB_Device_ControlRequest(void) @@ -546,11 +588,19 @@ void EVENT_USB_Device_ControlRequest(void) /******************************************************************************* * Host driver ******************************************************************************/ +/** \brief Keyboard LEDs + * + * FIXME: Needs doc + */ static uint8_t keyboard_leds(void) { return keyboard_led_stats; } +/** \brief Send Keyboard + * + * FIXME: Needs doc + */ static void send_keyboard(report_keyboard_t *report) { uint8_t timeout = 255; @@ -612,7 +662,11 @@ static void send_keyboard(report_keyboard_t *report) keyboard_report_sent = *report; } - + +/** \brief Send Mouse + * + * FIXME: Needs doc + */ static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE @@ -657,6 +711,10 @@ static void send_mouse(report_mouse_t *report) #endif } +/** \brief Send System + * + * FIXME: Needs doc + */ static void send_system(uint16_t data) { uint8_t timeout = 255; @@ -678,6 +736,10 @@ static void send_system(uint16_t data) Endpoint_ClearIN(); } +/** \brief Send Consumer + * + * FIXME: Needs doc + */ static void send_consumer(uint16_t data) { uint8_t timeout = 255; @@ -739,6 +801,10 @@ static void send_consumer(uint16_t data) ******************************************************************************/ #ifdef CONSOLE_ENABLE #define SEND_TIMEOUT 5 +/** \brief Send Char + * + * FIXME: Needs doc + */ int8_t sendchar(uint8_t c) { // Not wait once timeouted. @@ -842,18 +908,30 @@ bool recv_midi_packet(MIDI_EventPacket_t* const event) { ******************************************************************************/ #ifdef VIRTSER_ENABLE +/** \brief Virtual Serial Init + * + * FIXME: Needs doc + */ void virtser_init(void) { cdc_device.State.ControlLineStates.DeviceToHost = CDC_CONTROL_LINE_IN_DSR ; CDC_Device_SendControlLineStateChange(&cdc_device); } +/** \brief Virtual Serial Receive + * + * FIXME: Needs doc + */ void virtser_recv(uint8_t c) __attribute__ ((weak)); void virtser_recv(uint8_t c) { // Ignore by default } +/** \brief Virtual Serial Task + * + * FIXME: Needs doc + */ void virtser_task(void) { uint16_t count = CDC_Device_BytesReceived(&cdc_device); @@ -864,6 +942,10 @@ void virtser_task(void) virtser_recv(ch); } } +/** \brief Virtual Serial Send + * + * FIXME: Needs doc + */ void virtser_send(const uint8_t byte) { uint8_t timeout = 255; @@ -896,6 +978,10 @@ void virtser_send(const uint8_t byte) /******************************************************************************* * main ******************************************************************************/ +/** \brief Setup MCU + * + * FIXME: Needs doc + */ static void setup_mcu(void) { /* Disable watchdog if enabled by bootloader/fuses */ @@ -909,6 +995,10 @@ static void setup_mcu(void) CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); } +/** \brief Setup USB + * + * FIXME: Needs doc + */ static void setup_usb(void) { // Leonardo needs. Without this USB device is not recognized. @@ -921,6 +1011,10 @@ static void setup_usb(void) print_set_sendchar(sendchar); } +/** \brief Main + * + * FIXME: Needs doc + */ int main(void) __attribute__ ((weak)); int main(void) { diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index 0df5d3b7..42de8061 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -20,15 +20,27 @@ along with this program. If not, see . uint8_t desired_output = OUTPUT_DEFAULT; +/** \brief Set Output + * + * FIXME: Needs doc + */ void set_output(uint8_t output) { set_output_user(output); desired_output = output; } +/** \brief Set Output User + * + * FIXME: Needs doc + */ __attribute__((weak)) void set_output_user(uint8_t output) { } +/** \brief Auto Detect Output + * + * FIXME: Needs doc + */ uint8_t auto_detect_output(void) { if (USB_DeviceState == DEVICE_STATE_Configured) { return OUTPUT_USB; @@ -47,6 +59,10 @@ uint8_t auto_detect_output(void) { return OUTPUT_NONE; } +/** \brief Where To Send + * + * FIXME: Needs doc + */ uint8_t where_to_send(void) { if (desired_output == OUTPUT_AUTO) { return auto_detect_output(); diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index ff6af4a8..b556c460 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -370,9 +370,9 @@ show_path: @echo SRC=$(SRC) @echo OBJ=$(OBJ) -ifeq ($(CC),avr-gcc) +ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) check-size: - $(eval MAX_SIZE=$(shell n=`avr-gcc -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'`; echo $$(($$n)) || echo 0)) + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \ diff --git a/users/drashna/config.h b/users/drashna/config.h new file mode 100644 index 00000000..68394ee4 --- /dev/null +++ b/users/drashna/config.h @@ -0,0 +1,65 @@ +#ifndef USERSPACE_CONFIG_H +#define USERSPACE_CONFIG_H + + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(E1M1_DOOM) +#define GOODBYE_SONG SONG(SONIC_RING) +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(OVERWATCH_THEME) \ + } +#endif + +#ifdef RGBLIGHT_ENABLE + #ifndef KEYBOARD_ergodox_ez + #define RGBLIGHT_SLEEP + #endif +#endif // RGBLIGHT_ENABLE + + + +#ifndef ONESHOT_TAP_TOGGLE +#define ONESHOT_TAP_TOGGLE 2 +#endif // !ONESHOT_TAP_TOGGLE + +#ifndef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 3000 +#endif// !ONESHOT_TIMEOUT + +#ifndef QMK_KEYS_PER_SCAN +#define QMK_KEYS_PER_SCAN 4 +#endif // !QMK_KEYS_PER_SCAN + + + +// this makes it possible to do rolling combos (zx) with keys that +// convert to other keys on hold (z becomes ctrl when you hold it, +// and when this option isn't enabled, z rapidly followed by x +// actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD +#undef PREVENT_STUCK_MODIFIERS + +#define FORCE_NKRO + +#ifndef TAPPING_TOGGLE +#define TAPPING_TOGGLE 1 +#endif + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 160 + + +// Disable action_get_macro and fn_actions, since we don't use these +// and it saves on space in the firmware. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + + + +#endif // !USERSPACE_CONFIG_H + diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 67857095..170c320d 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -18,11 +18,11 @@ along with this program. If not, see . #include "drashna.h" #include "version.h" -#if (__has_include("secrets.h")) +#if (__has_include("secrets.h") && !defined(NO_SECRETS)) #include "secrets.h" #else // `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware -// And I'm not familar enough to know which is better or why... +// And I'm not familiar enough to know which is better or why... PROGMEM const char secret[][64] = { "test1", "test2", @@ -32,21 +32,14 @@ PROGMEM const char secret[][64] = { }; #endif -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_workman[][2] = SONG(PLOVER_SOUND); -float tone_hackstartup[][2] = SONG(ONE_UP_SOUND); -#endif #ifdef FAUXCLICKY_ENABLE float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25); float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125); -#else -float fauxclicky_pressed[][2] = SONG(E__NOTE(_A6)); // change to your tastes -float fauxclicky_released[][2] = SONG(E__NOTE(_A6)); // change to your tastes -#endif +#else // FAUXCLICKY_ENABLE +float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to your tastes +float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes +#endif // FAUXCLICKY_ENABLE bool faux_click_enabled = false; bool is_overwatch = false; @@ -134,7 +127,7 @@ void run_diablo_macro_check(void) { } } -#endif +#endif // TAP_DANCE_ENABLE // Add reconfigurable functions here, for keymap customization @@ -171,71 +164,74 @@ void matrix_init_user(void) { if (true) { if (default_layer & (1UL << _COLEMAK)) { - rgblight_set_magenta; + rgblight_sethsv_magenta(); } else if (default_layer & (1UL << _DVORAK)) { - rgblight_set_green; + rgblight_sethsv_green(); } else if (default_layer & (1UL << _WORKMAN)) { - rgblight_set_purple; + rgblight_sethsv_goldenrod(); } else { - rgblight_set_teal; + rgblight_sethsv_teal(); } } else { - rgblight_set_red; + rgblight_setrgb_red(); rgblight_mode(5); } -#endif +#endif // RGBLIGHT_ENABLE + +#if ( defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) ) + set_unicode_input_mode(UC_WINC); +#endif //UNICODE_ENABLE + matrix_init_keymap(); } -// No global matrix scan code, so just run keymap's matix +// No global matrix scan code, so just run keymap's matrix // scan function void matrix_scan_user(void) { #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); -#endif +#endif // TAP_DANCE_ENABLE matrix_scan_keymap(); } // This block is for all of the gaming macros, as they were all doing // the same thing, but with differring text sent. -void send_game_macro(const char *str) { - clear_keyboard(); - register_code(is_overwatch ? KC_BSPC : KC_ENTER); - unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); - wait_ms(50); - send_string(str); - register_code(KC_ENTER); - unregister_code(KC_ENTER); -} - - -// Sent the default layer -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +bool send_game_macro(const char *str, keyrecord_t *record, bool override) { + if (!record->event.pressed || override) { + clear_keyboard(); + register_code(is_overwatch ? KC_BSPC : KC_ENTER); + unregister_code(is_overwatch ? KC_BSPC : KC_ENTER); + wait_ms(50); + send_string(str); + register_code(KC_ENTER); + unregister_code(KC_ENTER); + } + if (override) wait_ms(3000); + return false; } // Defines actions tor my global custom keycodes. Defined in drashna.h file -// Then runs the _keymap's recod handier if not processed here +// Then runs the _keymap's record handier if not processed here bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// If console is enabled, it will print the matrix position and status of each key pressed + // If console is enabled, it will print the matrix position and status of each key pressed #ifdef CONSOLE_ENABLE xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); #endif //CONSOLE_ENABLE -// Run custom faux click code, but only if faux clicky is enabled -#ifdef AUDIO_ENABLE + // Run custom faux click code, but only if faux clicky is enabled +#ifdef AUDIO_ENABLE if ( (faux_click_enabled && keycode != KC_FXCL) || (!faux_click_enabled && keycode == KC_FXCL) ) { if (record->event.pressed) { + stop_all_notes(); PLAY_SONG(fauxclicky_pressed); } else { - stop_note(NOTE_A6); + stop_all_notes(); PLAY_SONG(fauxclicky_released); } } @@ -245,37 +241,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_QWERTY: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); -#endif //AUDIO_ENABLE - persistent_default_layer_set(1UL << _QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case KC_COLEMAK: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); -#endif //AUDIO_ENABLE - persistent_default_layer_set(1UL << _COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case KC_DVORAK: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); -#endif //AUDIO_ENABLE - persistent_default_layer_set(1UL << _DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; case KC_WORKMAN: if (record->event.pressed) { -#ifdef AUDIO_ENABLE - PLAY_SONG(tone_workman); -#endif //AUDIO_ENABLE - persistent_default_layer_set(1UL << _WORKMAN); + set_single_persistent_default_layer(_WORKMAN); } return false; break; @@ -323,22 +307,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ":teensy" #elif defined(BOOTLOADER_CATERINA) ":avrdude" -#endif +#endif // bootloader options SS_TAP(X_ENTER)); } return false; break; - case KC_RESET: // Custom RESET code that setr RGBLights to RED + + + case KC_RESET: // Custom RESET code that sets RGBLights to RED if (!record->event.pressed) { #ifdef RGBLIGHT_ENABLE rgblight_enable(); rgblight_mode(1); - rgblight_setrgb(0xff, 0x00, 0x00); -#endif + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE reset_keyboard(); } return false; break; + + case EPRM: // Resets EEPROM if (record->event.pressed) { eeconfig_init(); @@ -347,11 +335,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case VRSN: // Prints firmware version if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); } return false; break; - case KC_SECRET_1 ... KC_SECRET_5: // Custom + + + case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo if (!record->event.pressed) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); send_string_P(secret[keycode - KC_SECRET_1]); @@ -364,61 +354,42 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Only enables for the viterbi, basically, // to save on firmware space, since it's limited. #if !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez)) - - case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros if (record->event.pressed) { is_overwatch = !is_overwatch; } #ifdef RGBLIGHT_ENABLE is_overwatch ? rgblight_mode(17) : rgblight_mode(18); #endif //RGBLIGHT_ENABLE - return false; - break; - - case KC_SALT: - if (!record->event.pressed) { send_game_macro("Salt, salt, salt..."); } return false; break; + case KC_SALT: + return send_game_macro("Salt, salt, salt...", record, false); case KC_MORESALT: - if (!record->event.pressed) { send_game_macro("Please sir, can I have some more salt?!"); } - return false; break; + return send_game_macro("Please sir, can I have some more salt?!", record, false); case KC_SALTHARD: - if (!record->event.pressed) { send_game_macro("Your salt only makes me harder, and even more aggressive!"); } - return false; break; + return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); case KC_GOODGAME: - if (!record->event.pressed) { send_game_macro("Good game, everyone!"); } - return false; break; + return send_game_macro("Good game, everyone!", record, false); case KC_GLHF: - if (!record->event.pressed) { send_game_macro("Good luck, have fun!!!"); } - return false; break; + return send_game_macro("Good luck, have fun!!!", record, false); case KC_SYMM: - if (!record->event.pressed) { send_game_macro("Left click to win!"); } - return false; break; + return send_game_macro("Left click to win!", record, false); case KC_JUSTGAME: - if (!record->event.pressed) { send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games."); } - return false; break; + return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); case KC_TORB: - if (!record->event.pressed) { send_game_macro("That was positively riveting!"); } - return false; break; + return send_game_macro("That was positively riveting!", record, false); case KC_AIM: - if (!record->event.pressed) { - send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!"); - wait_ms(3000); - send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!"); - } - return false; break; + send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); + return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); case KC_C9: - if (!record->event.pressed) { send_game_macro("OMG!!! C9!!!"); } - return false; break; + return send_game_macro("OMG!!! C9!!!", record, false); case KC_GGEZ: - if (!record->event.pressed) { send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!"); } - return false; break; + return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); #endif // !(defined(KEYBOARD_orthodox_rev1) || defined(KEYBOARD_orthodox_rev3) || defined(KEYBOARD_ergodox_ez)) #ifdef TAP_DANCE_ENABLE - case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them if (record->event.pressed) { uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { diablo_key_time[dtime] = diablo_times[0]; } @@ -437,14 +408,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { rgb_layer_change = !rgb_layer_change; if (rgb_layer_change) { - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks beetter) + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) } } #endif // RGBLIGHT_ENABLE return false; break; #ifdef RGBLIGHT_ENABLE case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { //This disrables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled rgb_layer_change = false; } return true; break; @@ -463,61 +434,61 @@ uint32_t layer_state_set_user(uint32_t state) { if (rgb_layer_change) { switch (biton32(state)) { case _NAV: - rgblight_set_blue; + rgblight_sethsv_blue(); rgblight_mode(1); break; case _SYMB: - rgblight_set_blue; + rgblight_sethsv_blue(); rgblight_mode(2); break; case _MOUS: - rgblight_set_yellow; + rgblight_sethsv_yellow(); rgblight_mode(1); break; case _MACROS: - rgblight_set_orange; + rgblight_sethsv_orange(); is_overwatch ? rgblight_mode(17) : rgblight_mode(18); break; case _MEDIA: - rgblight_set_chartreuse; + rgblight_sethsv_chartreuse(); rgblight_mode(22); break; case _GAMEPAD: - rgblight_set_orange; + rgblight_sethsv_orange(); rgblight_mode(17); break; case _DIABLO: - rgblight_set_red; + rgblight_sethsv_red(); rgblight_mode(5); break; case _RAISE: - rgblight_set_yellow; + rgblight_sethsv_yellow(); rgblight_mode(5); break; case _LOWER: - rgblight_set_orange; + rgblight_sethsv_orange(); rgblight_mode(5); break; case _ADJUST: - rgblight_set_red; + rgblight_sethsv_red(); rgblight_mode(23); break; case _COVECUBE: - rgblight_set_green; + rgblight_sethsv_green(); rgblight_mode(2); break; default: // for any other layers, or the default layer if (default_layer & (1UL << _COLEMAK)) { - rgblight_set_magenta; + rgblight_sethsv_magenta(); } else if (default_layer & (1UL << _DVORAK)) { - rgblight_set_green; + rgblight_sethsv_green(); } else if (default_layer & (1UL << _WORKMAN)) { - rgblight_set_goldenrod; + rgblight_sethsv_goldenrod(); } else { - rgblight_set_teal; + rgblight_sethsv_teal(); } if (biton32(state) == _MODS) { // If the non-OSM layer is enabled, then breathe rgblight_mode(2); @@ -527,14 +498,14 @@ uint32_t layer_state_set_user(uint32_t state) { break; } } -#endif +#endif // RGBLIGHT_ENABLE return layer_state_set_keymap (state); } // Any custom LED code goes here. // So far, I only have keyboard specific code, -// So nothing goes here. +// So nothing goes here. void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 8d32a5f9..1086fa02 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -17,10 +17,9 @@ along with this program. If not, see . #ifndef USERSPACE #define USERSPACE - #include "quantum.h" -// Define layer names +// Define layer names #define _QWERTY 0 #define _NUMLOCK 0 #define _COLEMAK 1 @@ -47,38 +46,8 @@ along with this program. If not, see . #define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#ifndef RGBLIGHT_ANIMATIONS // add "EXTRA_FLADS=-DDRASHNA_SETRGB" to enable this ... but don't -#define rgblight_set_blue rgblight_setrgb (0x00, 0x00, 0xFF); -#define rgblight_set_red rgblight_setrgb (0xFF, 0x00, 0x00); -#define rgblight_set_green rgblight_setrgb (0x00, 0xFF, 0x00); -#define rgblight_set_orange rgblight_setrgb (0xFF, 0x80, 0x00); -#define rgblight_set_teal rgblight_setrgb (0x00, 0xFF, 0xFF); -#define rgblight_set_magenta rgblight_setrgb (0xFF, 0x00, 0xFF); -#define rgblight_set_yellow rgblight_setrgb (0xFF, 0xFF, 0x00); -#define rgblight_set_purple rgblight_setrgb (0x7A, 0x00, 0xFF); -#define rgblight_set_white rgblight_setrgb (0xFF, 0xFF, 0xFF); -#else -#define rgblight_set_white rgblight_sethsv (0, 0x00, 255); -#define rgblight_set_red rgblight_sethsv (0, 255, 255); -#define rgblight_set_coral rgblight_sethsv (16, 176, 255); -#define rgblight_set_orange rgblight_sethsv (39, 255, 255); -#define rgblight_set_goldenrod rgblight_sethsv (43, 218, 218); -#define rgblight_set_gold rgblight_sethsv (51, 255, 255); -#define rgblight_set_yellow rgblight_sethsv (60, 255, 255); -#define rgblight_set_chartreuse rgblight_sethsv (90, 255, 255); -#define rgblight_set_green rgblight_sethsv (120, 255, 255); -#define rgblight_set_springgreen rgblight_sethsv (150, 255, 255); -#define rgblight_set_turquoise rgblight_sethsv (174, 90, 112); -#define rgblight_set_teal rgblight_sethsv (180, 255, 128); -#define rgblight_set_cyan rgblight_sethsv (180, 255, 255); -#define rgblight_set_azure rgblight_sethsv (186, 102, 255); -#define rgblight_set_blue rgblight_sethsv (240, 255, 255); -#define rgblight_set_purple rgblight_sethsv (270, 255, 255); -#define rgblight_set_magenta rgblight_sethsv (300, 255, 255); -#define rgblight_set_pink rgblight_sethsv (330, 128, 255); - -//#define rgblight_set_ rgblight_sethsv (0, 255, 255); -#endif // DRASHNA_SETRGB +// RGB color codes are no longer located here anymore. Instead, you will want to +// head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h extern bool is_overwatch; extern bool rgb_layer_change; @@ -118,6 +87,18 @@ enum userspace_custom_keycodes { NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes }; +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK +#define WORKMAN KC_WORKMAN +#define KC_RST KC_RESET + #ifdef TAP_DANCE_ENABLE enum { TD_D3_1 = 0, @@ -129,8 +110,8 @@ enum { // Custom Keycodes for Diablo 3 layer -// But since TD() doesn't work when tapdance is disabled -// We use custom codes here, so we can substituet the right stuff +// But since TD() doesn't work when tap dance is disabled +// We use custom codes here, so we can substitute the right stuff #ifdef TAP_DANCE_ENABLE #define KC_D3_1 TD(TD_D3_1) #define KC_D3_2 TD(TD_D3_2) @@ -146,26 +127,10 @@ enum { // OSM keycodes, to keep things clean and easy to change #define KC_MLSF OSM(MOD_LSFT) #define KC_MRSF OSM(MOD_RSFT) -#define ONESHOT_TIMEOUT 3000 -#define QMK_KEYS_PER_SCAN 8 -#ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP -#endif // RGBLIGHT_ENABLE -// this makes it possible to do rolling combos (zx) with keys that -// convert to other keys on hold (z becomes ctrl when you hold it, -// and when this option isn't enabled, z rapidly followed by x -// actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT - -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -// If we're still using the official Faux Clicky feature, substituet codes +// If we're still using the official Faux Clicky feature, substitute codes // so that we don't have any unused/blank keys. #ifdef FAUXCLICKY_ENABLE #define AUD_ON FC_ON @@ -177,22 +142,28 @@ enum { -// Since our quirky block definitions are basically a list of comma separated -// arguments, we need a wrapper in order for these definitions to be +// Since our quirky block definitions are basically a list of comma separated +// arguments, we need a wrapper in order for these definitions to be // expanded before being used as arguments to the LAYOUT_xxx macro. +#if (!defined(LAYOUT) && defined(KEYMAP)) +#define LAYOUT KEYMAP +#endif + #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) -#define KEYMAP_wrapper(...) KEYMAP(__VA_ARGS__) +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) // Blocks for each of the four major keyboard layouts // Organized so we can quickly adapt and modify all of them // at once, rather than for each keyboard, one at a time. -// And this allows wor much cleaner blocks in the keymaps. +// And this allows for much cleaner blocks in the keymaps. // For instance Tap/Hold for Control on all of the layouts // NOTE: These are all the same length. If you do a search/replace // then you need to add/remove underscores to keep the -// lengths consistent. +// lengths consistent. #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G @@ -211,6 +182,14 @@ enum { #define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O #define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) +#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B +#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G +#define ______________COLEMAK_MOD_DH_L3____________ CTL_T(KC_Z), KC_X, KC_C, KC_D, KC_V + +#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define ______________COLEMAK_MOD_DH_R2____________ KC_K, KC_N, KC_E, KC_I, KC_O +#define ______________COLEMAK_MOD_DH_R3____________ KC_M, KC_H, KC_COMM, KC_DOT, CTL_T(KC_SLASH) + #define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y #define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I @@ -230,12 +209,21 @@ enum { #define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z) +#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K +#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G +#define _________________NORMAN_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B + +#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN +#define _________________NORMAN_R2_________________ KC_J, KC_N, KC_I, KC_O, KC_U +#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) + + // Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN), // this allows us to quickly modify the bottom row for all of the layouts // so we don't have to alter it 4 times and hope that we haven't missed // anything -#define ___________ERGODOX_BOTTOM_LEFT_____________ KC_QUOT, KC_MEH, KC_LBRC, KC_RBRC +#define ___________ERGODOX_BOTTOM_LEFT_____________ OSM(MOD_MEH), OSM(MOD_LGUI), KC_LBRC, KC_RBRC #define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT diff --git a/users/drashna/readme.md b/users/drashna/readme.md index 92792fb9..c4e305e1 100644 --- a/users/drashna/readme.md +++ b/users/drashna/readme.md @@ -95,7 +95,7 @@ If you would *also* like to take advantage of this feature, you'll first want to Then you can create this file and add your macro strings to it: ###### secrets.h -``` +```c PROGMEM const char secret[][64] = { "secret1", "secret2", @@ -105,11 +105,29 @@ PROGMEM const char secret[][64] = { }; ``` -Replacing the strings with the codes that you need. +Replacing the strings with the codes that you need. + +In the `.c` file, you will want to add this to the top: +```c -These are called in the `process_record_user` function, using this block: +#if (__has_include("secrets.h") && !defined(NO_SECRETS)) +#include "secrets.h" +#else +// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware +// And I'm not familiar enough to know which is better or why... +PROGMEM const char secret[][64] = { + "test1", + "test2", + "test3", + "test4", + "test5" +}; +#endif ``` + +And then, in the `process_record_user` function, you'll want to add this block: +```c case KC_SECRET_1 ... KC_SECRET_5: if (!record->event.pressed) { send_string_P(secret[keycode - KC_SECRET_1]); @@ -118,4 +136,13 @@ These are called in the `process_record_user` function, using this block: break; ``` -And this requires `KC_SECRET_1` through `KC_SECRET_5` to be defined, as well. +And this requires `KC_SECRET_1` through `KC_SECRET_5` to be defined in your `.h` file fo the new macros, as well. + +Additionally, if you want to make sure that you can disable the function without messing with the file, you need to add this to your `/users//rules.mk`, so that it catches the flag: +```c +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif +``` + +Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your `.c` file, rather than reading from your file. diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index ab2ab607..062ecd3c 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -1,3 +1,5 @@ SRC += drashna.c EXTRAFLAGS += -flto + + diff --git a/users/dudeofawesome/dudeofawesome.h b/users/dudeofawesome/dudeofawesome.h index b0387f2a..91557925 100644 --- a/users/dudeofawesome/dudeofawesome.h +++ b/users/dudeofawesome/dudeofawesome.h @@ -1,6 +1,9 @@ #ifndef USERSPACE #define USERSPACE +#ifdef TAPPING_TOGGLE +#undef TAPPING_TOGGLE +#endif #define TAPPING_TOGGLE 2 #ifdef AUDIO_ENABLE @@ -11,6 +14,12 @@ E__NOTE(_A6), \ S__NOTE(_REST), \ ED_NOTE(_GS6), + + #define NUMPAD_ON_SOUND \ + E__NOTE(_C6), \ + ED_NOTE(_BF5), \ + S__NOTE(_C6), \ + ED_NOTE(_BF5), #endif #endif diff --git a/util/generate_internal_docs.sh b/util/generate_internal_docs.sh new file mode 100644 index 00000000..bfee797d --- /dev/null +++ b/util/generate_internal_docs.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -x + +if ! doxygen -v 2>&1 > /dev/null; then + echo "doxygen not found! Please install it!" + exit 1 +elif ! moxygen -V 2>&1 > /dev/null; then + echo -n "moxygen not found! Would you like to install it? [y/n] " + read ANSWER + case $ANSWER in + y|Y|yes|YES|Yes) + npm install -g moxygen + ;; + *) + exit 1 + ;; + esac +fi + +if [ ! -e Doxyfile ]; then + echo "Error: You must run this from the top-level qmk_firmware directory!" + exit 1 +fi + +# Generate the doxygen XML files +rm -rf doxygen +doxygen Doxyfile + +# Generate the moxygen Markdown files +moxygen -a -g -o docs/internals_%s.md doxygen/xml diff --git a/util/macos_install.sh b/util/macos_install.sh index ec850298..f53f2669 100755 --- a/util/macos_install.sh +++ b/util/macos_install.sh @@ -15,7 +15,7 @@ if ! brew --version 2>&1 > /dev/null; then *) echo -n "Would you like to install homebrew now? [y/n] " ;; - esac + esac done fi diff --git a/util/new_project.sh b/util/new_project.sh index 11218440..0c28feb4 100755 --- a/util/new_project.sh +++ b/util/new_project.sh @@ -7,16 +7,23 @@ if [ -z "$1" ]; then exit 1 fi +if [ -e "keyboards/$1" ]; then + echo "Error! keyboards/$1 already exists!" + exit 1 +fi + cd "$(dirname "$0")/.." KEYBOARD=$1 KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}') +KEYBOARD_NAME=$(basename $1) +KEYBOARD_NAME_UPPERCASE=$(echo $KEYBOARD_NAME | awk '{print toupper($0)}') cp -r quantum/template keyboards/$KEYBOARD -mv keyboards/$KEYBOARD/template.c keyboards/$KEYBOARD/$KEYBOARD.c -mv keyboards/$KEYBOARD/template.h keyboards/$KEYBOARD/$KEYBOARD.h -find keyboards/${KEYBOARD} -type f -exec sed -i'' -e "s;%KEYBOARD%;$KEYBOARD;g" {} \; -find keyboards/${KEYBOARD} -type f -exec sed -i'' -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" {} \; +mv keyboards/${KEYBOARD}/template.c keyboards/${KEYBOARD}/${KEYBOARD_NAME}.c +mv keyboards/${KEYBOARD}/template.h keyboards/${KEYBOARD}/${KEYBOARD_NAME}.h +find keyboards/${KEYBOARD} -type f -exec sed -i '' -e "s;%KEYBOARD%;${KEYBOARD_NAME};g" {} \; +find keyboards/${KEYBOARD} -type f -exec sed -i '' -e "s;%KEYBOARD_UPPERCASE%;${KEYBOARD_NAME_UPPERCASE};g" {} \; echo "######################################################" echo "# /keyboards/$KEYBOARD project created. To start" diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index b3554b50..a49908c7 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -38,7 +38,7 @@ increment_version () git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} -NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) +NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | grep -Ev '^(users/)' | grep -Ev '^(layouts/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags @@ -79,4 +79,4 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then fi -fi \ No newline at end of file +fi diff --git a/util/travis_docs.sh b/util/travis_docs.sh new file mode 100644 index 00000000..5cfd6346 --- /dev/null +++ b/util/travis_docs.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +source util/travis_push.sh + +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip docs]"* ]] ; then + if git diff --name-only ${TRAVIS_COMMIT_RANGE} | grep -e '^quantum/' -e '^tmk_core/' -e '^docs/internals_.*'; then + echo "Generating internal docs..." + rm -rf doxygen + doxygen Doxyfile + moxygen -q -a -g -o docs/internals_%s.md doxygen/xml + git add docs/internals_* + git commit -m'autogenerated internal docs for ${TRAVIS_COMMIT_RANGE}' || true + fi +fi diff --git a/util/travis_push.sh b/util/travis_push.sh new file mode 100644 index 00000000..7eea88b1 --- /dev/null +++ b/util/travis_push.sh @@ -0,0 +1,17 @@ +# Use this by sourcing it in your script. + +TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" +TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +git config --global user.name "QMK Bot" +git config --global user.email "hello@qmk.fm" + +openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d +tar xvf secrets.tar + +chmod 600 id_rsa_qmk_firmware +chmod 600 id_rsa_qmk.fm +eval `ssh-agent -s` +ssh-add id_rsa_qmk_firmware